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

Extract Secp384r1 fast reduction from the prototype #6851

Closed
yanesca opened this issue Dec 28, 2022 · 0 comments · Fixed by #7222
Closed

Extract Secp384r1 fast reduction from the prototype #6851

yanesca opened this issue Dec 28, 2022 · 0 comments · Fixed by #7222
Assignees
Labels
component-crypto Crypto primitives and low-level interfaces enhancement size-s Estimated task size: small (~2d)

Comments

@yanesca
Copy link
Contributor

yanesca commented Dec 28, 2022

Extract Secp384r1 fast reduction from the prototype (replace the pre-existing implementation):
https://github.com/hanno-becker/mbedtls/blob/ecp_prototype/library/ecp_curves.c#L10172-L10262

This function calculates the residue of the input mod secp384r1_p. The result will have the same bitlength as the modulus. (That is, it is not guaranteed that it will be canonical.) This function is intended for reducing the result of a multiplication and therefore the number of input limbs can't be more than twice the limbs in the modulus.

Add unit tests for ecp_mod_p384_raw().

Tip for testing: fix up the result to get a canonical value by using #6375.

@yanesca yanesca added enhancement component-crypto Crypto primitives and low-level interfaces size-s Estimated task size: small (~2d) labels Dec 28, 2022
@minosgalanakis minosgalanakis self-assigned this Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-crypto Crypto primitives and low-level interfaces enhancement size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants