-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for X25519 and X448 #391
base: master
Are you sure you want to change the base?
Conversation
I am also very open to code style changes, I tried to follow the existing style but didn't see anything explicitly documented (e.g., line limit / wrapping) |
No formal code style guidelines. We use basic C# styling though I see several syntactic sugars on that page that didn't exist when we started the project. It is strongly preferred for unit tests to finish in a matter of minutes or seconds. It is OK to define longer running tests but they should be identified with the |
Note if/when we accept this PR, it will not be merged here. This is an external repository used for our production code once published. We maintain an internal repository where this would be merged. Just a heads up if anyone looks at this PR later to see why it was "closed" versus "merged". |
gen-val/src/crypto/src/NIST.CVP.ACVTS.Libraries.Crypto/XECDH/X25519.cs
Outdated
Show resolved
Hide resolved
...S.Libraries.Generation/XECDH/v1_0/KeyVer/TestCaseExpectations/TestCaseExpectationProvider.cs
Outdated
Show resolved
Hide resolved
...l/src/crypto/src/NIST.CVP.ACVTS.Libraries.Crypto.Common/Asymmetric/XECDH/Enums/XecdhEnums.cs
Show resolved
Hide resolved
Right now the 1,000 iterations finish in about 5 seconds on my machine. That test case is identified using |
This pull request adds support for the X25519 and X448 to the server (also known as Curve25519 / Curve448 Diffie-Hellman). Three algorithms are implemented: KeyGen, KeyVer, and SSC (Shared Secret Computation). The different commits modify different layers of the server for easier review.
Some points that were considered while implementing this code:
a) Make sure the code clearly maps to the RFC
b) Avoid any potential endianness issues since the BitString internally uses big-endian
1,000,000 should be possible but may take much longer (perhaps 30 minutes per test, on my hardware)1,000,000 does not provide too much extra value compared to 1,000.