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

elliptic-curve: add Reduce trait #768

Merged
merged 1 commit into from
Sep 20, 2021
Merged

Conversation

tarcieri
Copy link
Member

Adds a trait for modular reduction, primarily intended for use cases like hashing to a field element.

The trait is generic around a UInt to permit overlapping impls, allowing either "narrow" or "wide" reduction, selected by the size of the input.

Adds a trait for modular reduction, primarily intended for use cases
like hashing to a field element.

The trait is generic around a `UInt` to permit overlapping impls,
allowing either "narrow" or "wide" reduction, selected by the size of
the input.
@tarcieri
Copy link
Member Author

Will go ahead and merge this so we can try it out. Worst case we can back it out prior to another release.

@tarcieri tarcieri merged commit 5a80783 into master Sep 20, 2021
@tarcieri tarcieri deleted the elliptic-curve/reduce-trait branch September 20, 2021 14:35
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 20, 2021
Adds trait impls to `k256::Scalar` and `p256::Scalar` for the newly
introduced `Reduce` trait, replacing the previous inherent methods:

RustCrypto/traits#768
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 20, 2021
Adds trait impls to `k256::Scalar` and `p256::Scalar` for the newly
introduced `Reduce` trait, replacing the previous inherent methods:

RustCrypto/traits#768
@tarcieri tarcieri mentioned this pull request Nov 20, 2021
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.

1 participant