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

Performs modular reduction for all scalars. #315

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

armfazh
Copy link
Contributor

@armfazh armfazh commented Feb 1, 2022

Scalars are reduced only when its size in bytes is bigger that the order=N.
There are, however, scalars of such size but larger than N that escaped to be reduced.
With this change, now scalars are fully reduced.

Fixes #312

@armfazh armfazh added the fix-A-bug code that fix a bug label Feb 1, 2022
@armfazh armfazh self-assigned this Feb 1, 2022
@chris-wood
Copy link
Contributor

The change looks good! I wonder if we can expand on the tests, though.

@armfazh armfazh merged commit f9c7693 into cloudflare:master Feb 2, 2022
@armfazh armfazh deleted the p384/reduceScalar branch February 2, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix-A-bug code that fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inadequate scalar reduction in p384 leads to panic
3 participants