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 Secp192r1 fast reduction from the prototype #6026

Closed
yanesca opened this issue Jul 4, 2022 · 0 comments · Fixed by #6971
Closed

Extract Secp192r1 fast reduction from the prototype #6026

yanesca opened this issue Jul 4, 2022 · 0 comments · Fixed by #6971
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 Jul 4, 2022

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

This function calculates the residue of the input mod secp192r1_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_p192_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) needs-info An issue or PR which needs further info from the reporter / author labels Jul 4, 2022
@yanesca yanesca changed the title Implement fast reduction for NIST moduli Add a raw entry point to Secp192r1 fast reduction Sep 26, 2022
@yanesca yanesca removed the needs-info An issue or PR which needs further info from the reporter / author label Sep 26, 2022
@yanesca yanesca changed the title Add a raw entry point to Secp192r1 fast reduction Extract Secp192r1 fast reduction from the prototype Dec 14, 2022
@gabor-mezei-arm gabor-mezei-arm self-assigned this Jan 17, 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