Skip to content
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 pcurves P-224 #4218

Merged
merged 3 commits into from
Aug 9, 2024
Merged

Add pcurves P-224 #4218

merged 3 commits into from
Aug 9, 2024

Conversation

randombit
Copy link
Owner

This one is a little more involved since this is the first curve where p != 3 mod 4, and in fact since P-224 is == 1 mod 16 we must use Shanks-Tonelli

GH #4027

@coveralls
Copy link

coveralls commented Jul 16, 2024

Coverage Status

coverage: 91.656% (+0.03%) from 91.624%
when pulling 0cb7102 on jack/pcurves-p224
into 0d4969a on master.

@randombit randombit force-pushed the jack/pcurves-p224 branch 2 times, most recently from 576a768 to 8dad7d6 Compare July 16, 2024 12:45
@randombit randombit requested a review from reneme July 16, 2024 13:02
@randombit randombit added this to the Botan 3.6.0 milestone Jul 16, 2024
@randombit
Copy link
Owner Author

Emscripten failure seems to be a Homebrew/Emscripten mess emscripten-core/emscripten#22249 hopefully addressed soon but not related to the change

This one is a little more involved since this is the first curve where
p != 3 mod 4, and in fact since P-224 is == 1 mod 16 we must use
Shanks-Tonelli

GH #4027
The speedup we get from Solinas for P-224 (around 25%) is much higher
than seen for P-192 or P-256. This may be due to the fact that unlike
P-192 and P-256, P-224 is not "Montgomery friendly", ie p' is not
equal to 1, so the Montgomery reduction is significantly more
expensive.
Improves ECDSA signature by 5%, ECDSA verify by 1%, ECDH agreement by 1%

Also add the script to convert the output of addchain into pcurves code
@randombit
Copy link
Owner Author

@reneme Ping. Wasn't sure if you cared about this one. Main point I'd be interested in more eyes is the Shanks-Tonelli.

@randombit randombit merged commit 8b4905e into master Aug 9, 2024
55 checks passed
@randombit randombit deleted the jack/pcurves-p224 branch August 9, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants