At 10:08 AM -0700 5/30/03, Major Variola (ret) wrote:
At 07:30 AM 5/24/03 +0100, Adam Back wrote:
Colin Plumb's crypto library bnlib supports multiple word size I believe. On Fri, May 23, 2003 at 11:36:58AM -0700, Major Variola (ret.) wrote:
Anyone know of any open-source modexp code for 8-bit cpus?
Thank you for your response, however (for the record) that code requires
at least a 16bit CPU. From bnlib.doc (an amusing read, BTW):
It is written in C, and should compile on any platform with an ANSI C compiler and 16 and 32-bit unsigned data types
"Small" is defined as less than 65536, the minimum 16-bit word size supported by the library.
I think your best bet for an 8 bit CPU will be an assembly language routine. These processors normally include the carry/borrow out of the high order bit in a status register. An assembly routine can use that bit to efficiently implement multiple precision arithmetic, which can, in turn, be used to implement modexp. Cheers - Bill ------------------------------------------------------------------------- Bill Frantz | Due process for all | Periwinkle -- Consulting (408)356-8506 | used to be the | 16345 Englewood Ave. frantz@pwpconsult.com | American way. | Los Gatos, CA 95032, USA