]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Add a generic implementation of a Montgomery ladder
authorMichael Brown <mcb30@ipxe.org>
Wed, 22 Jan 2025 12:54:52 +0000 (12:54 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 28 Jan 2025 14:47:52 +0000 (14:47 +0000)
commit66b5d1ec81433d4cbc218ed18f2e4ee04d51aa38
tree8334707b626a69f48af6155977fb12f8120f4225
parentc2f21a21852741e869b5a64d02d6a49ef16a94cd
[crypto] Add a generic implementation of a Montgomery ladder

The Montgomery ladder may be used to perform any operation that is
isomorphic to exponentiation, i.e. to compute the result

    r = g^e = g * g * g * g * .... * g

for an arbitrary commutative operation "*", base or generator "g", and
exponent "e".

Implement a generic Montgomery ladder for use by both modular
exponentiation and elliptic curve point multiplication (both of which
are isomorphic to exponentiation).

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