Skip to content

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.

2 participants