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 (back) reduction from bytes #1229

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

tarcieri
Copy link
Member

As a replacement for the previous methods on Reduce which take bytes as input, this adds a new curve-specific method for reducing from bytes to a field element.

Bytes is defined as an associated type rather than inferred from the unsigned integer parameter. This is because the integer size may not map exactly to the size of the input, especially for wide reductions.

Bytes are interpreted according to curve-specific rules.

As a replacement for the previous methods on `Reduce` which take bytes
as input, this adds a new curve-specific method for reducing from bytes
to a field element.

Bytes is defined as an associated type rather than inferred from the
unsigned integer parameter. This is because the integer size may not map
exactly to the size of the input, especially for wide reductions.

Bytes are interpreted according to curve-specific rules.
@tarcieri tarcieri merged commit a3844be into master Jan 31, 2023
@tarcieri tarcieri deleted the elliptic-curve/add-reduction-from-bytes branch January 31, 2023 03:52
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Jan 31, 2023
Uses the newly (re)introduced method for reducing an input with
serialized bytes to perform modular reductions on `FieldBytes`.

See: RustCrypto/traits#1229
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Jan 31, 2023
Uses the newly (re)introduced method for reducing an input with
serialized bytes to perform modular reductions on `FieldBytes`.

See: RustCrypto/traits#1229
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Jan 31, 2023
Uses the newly (re)introduced method for reducing an input with
serialized bytes to perform modular reductions on `FieldBytes`.

See: RustCrypto/traits#1229
@tarcieri tarcieri mentioned this pull request Mar 1, 2023
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