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

Deferred Montgomery reductions #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Deferred Montgomery reductions #20

wants to merge 2 commits into from

Conversation

ebfull
Copy link
Contributor

@ebfull ebfull commented Nov 22, 2019

Closes #3.

There are some places in the curve arithmetic where this could help also, I haven't exhaustively looked yet.

/// Negates an element of magnitude 1 by subtracting it from a multiple of
/// the prime that is larger than this element could be (p^2), increasing
/// the magnitude by 1.
pub const fn negate(&self) -> FpWide {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be called negate_u1. (I would use a generic, but it's not stable in Rust yet for const functions...)

@ebfull ebfull changed the base branch from master to main September 8, 2020 22:33
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.

Implement deferred Montgomery reduction
1 participant