Scott said >Gee, thanks for putting me on the spot :) Didn't mean to put you on the spot - just seemed like you had the best chance of anyone on the list of saying, well yes, I just did that last week. (Flattery will get one somewhere, sometimes :-)) I think that modulo N multiplication works if you apply it after all calculations OR stage by stage or every now and then or to each component separately and then at the end or to one component and not the otehr and then stage by stage or .... . But I may be wrong. If I'm right then the answer accumulator simply has to be larger than the largest possible single multiplication result and then can be mod'd whnever needed. If it was several bits bigger it could be modded every X multiplications only >I know nothing about the RSA algorithm. It's used in PGP, so perhaps you cam get >the source and see how it's implemented in C. An excellent suggestion. >Unless there's a trick in the >arithmetic, I don't see how any processor can efficiently implement the >algorithm. Perhaps the choice of the P,Q and B are such that the exponentiation >followed by the modulo operation can be simplified. BTW, Eric Smith has >implemented the DES algorithm in a PIC. Also Andrew Warren and someone else have >implemented the TEA algorithm. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics