]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Add bigint_montgomery() to perform Montgomery reduction
authorMichael Brown <mcb30@ipxe.org>
Wed, 27 Nov 2024 13:25:18 +0000 (13:25 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 27 Nov 2024 13:25:18 +0000 (13:25 +0000)
commit4f7dd7fbba205d413cf9b989f7cdc928fa02caf2
treeab8254a6e9acf2324523b6ae1f66beb967f92886
parent96f385d7a48ffe259295991043a86b2cefce1891
[crypto] Add bigint_montgomery() to perform Montgomery reduction

Montgomery reduction is substantially faster than direct reduction,
and is better suited for modular exponentiation operations.

Add bigint_montgomery() to perform the Montgomery reduction operation
(often referred to as "REDC"), along with some test vectors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/crypto/bigint.c
src/include/ipxe/bigint.h
src/tests/bigint_test.c