diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-11-27 12:56:22 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-11-27 13:16:05 +0000 |
commit | 96f385d7a48ffe259295991043a86b2cefce1891 (patch) | |
tree | f32876fd70a7e1f5b182cc0dd47b28f9a57cb8c0 /COPYING.GPLv2 | |
parent | 7c2e68cc87a552c153e13517b0d0d6827f48e95b (diff) | |
download | ipxe-96f385d7a48ffe259295991043a86b2cefce1891.tar.gz |
[crypto] Use inverse size as effective size for bigint_mod_invert()
Montgomery reduction requires only the least significant element of an
inverse modulo 2^k, which in turn depends upon only the least
significant element of the invertend.
Use the inverse size (rather than the invertend size) as the effective
size for bigint_mod_invert(). This eliminates around 97% of the loop
iterations for a typical 2048-bit RSA modulus.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'COPYING.GPLv2')
0 files changed, 0 insertions, 0 deletions