Implement the Montgomery technique for speeding up modular
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 18 Feb 2011 08:25:38 +0000 (08:25 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 18 Feb 2011 08:25:38 +0000 (08:25 +0000)
commit132c534fe341ccfea930d270e3e01ed9957f4f5a
tree7e45015a4aa9d41075c428b00e592a97c75d7779
parent0c431b2f818d6696270774c88fc48e4b68b9c3fa
Implement the Montgomery technique for speeding up modular
exponentiation by replacing the modulo operation by a cleverly chosen
multiplication. This was not worth doing in the previous state of the
code (because my multiply was about as slow as my modulo), but now
that multiplication has been sped up by the Karatsuba optimisation,
Montgomery becomes worthwhile.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9094 cda61777-01e9-0310-a592-d414129be87e
sshbn.c