]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Add X25519 key exchange algorithm
authorMichael Brown <mcb30@ipxe.org>
Fri, 19 Jan 2024 12:36:11 +0000 (12:36 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 19 Jan 2024 16:44:30 +0000 (16:44 +0000)
commit2eea04c02ca902f8068b6ad0dd522e6e9a81691c
tree8e82f5aab9247002d80e7a341996579c08d8fe3b
parent908174ec7e49d845c8b52a07a3db32534eade37d
[crypto] Add X25519 key exchange algorithm

Add an implementation of the X25519 key exchange algorithm as defined
in RFC7748.

This implementation is inspired by and partially based upon the paper
"Implementing Curve25519/X25519: A Tutorial on Elliptic Curve
Cryptography" by Martin Kleppmann, available for download from
https://www.cl.cam.ac.uk/teaching/2122/Crypto/curve25519.pdf

The underlying modular addition, subtraction, and multiplication
operations are completely redesigned for substantially improved
efficiency compared to the TweetNaCl implementation studied in that
paper (approximately 5x-10x faster and with 70% less memory usage).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/crypto/x25519.c [new file with mode: 0644]
src/include/ipxe/x25519.h [new file with mode: 0644]
src/tests/tests.c
src/tests/x25519_test.c [new file with mode: 0644]