diff options
author | Jack Lloyd <[email protected]> | 2018-06-26 15:49:45 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-06-26 16:18:13 -0400 |
commit | ca847be7d8ae8942001b17a8e1b6f61ef9c4305e (patch) | |
tree | c13fdb5bac9c2884ba96cac8f4db191a7a6f7332 /doc/todo.rst | |
parent | 64e206c4fadc031e514fa368d6f5eb32e7878e8e (diff) |
Avoid useless multiplication in Montgomery exponentiation
When beginning the loop we initialized a value to one (in Montgomery form)
then multiply it by the first element looked up based on the exponent.
But this will always (after Montgomery multiplication) be exactly the
value we looked up in the table. So just assign it directly and avoid
the redundant operation.
Improves RSA verification by 5% or so since the number of multiplications
is so small in that case saving even 1 in useful. For other operations
there is no measurable improvement.
Diffstat (limited to 'doc/todo.rst')
0 files changed, 0 insertions, 0 deletions