1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:47:46 +00:00

LibCrypto: Implement the SECP256r1 elliptic curve

This implementation of the secp256r1 elliptic curve uses two techniques
to improve the performance of the operations.

1. All coordinates are stored in Jacobian form, (X/Z^2, Y/Z^3, Z), which
   removes the need for division operations during point addition or
   doubling. The points are converted at the start of the computation,
   and converted back at the end.

2. All values are transformed to Montgomery form, to allow for faster
   modular multiplication using the Montgomery modular multiplication
   method. This means that all coordinates have to be converted into
   this form, and back out of this form before returning them.
This commit is contained in:
Michiel Visser 2022-03-02 21:03:45 +01:00 committed by Ali Mohammad Pur
parent 3d561abe15
commit 8f7219c6fa
4 changed files with 539 additions and 0 deletions

View file

@ -17,6 +17,7 @@ set(SOURCES
Checksum/Adler32.cpp
Checksum/CRC32.cpp
Cipher/AES.cpp
Curves/SECP256r1.cpp
Curves/X25519.cpp
Curves/X448.cpp
Hash/MD5.cpp