Skip to content

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
scv35 added a commit to scv35/Signature-algorithms that referenced this pull request Jul 4, 2025
Uses the newly (re)introduced method for reducing an input with
serialized bytes to perform modular reductions on `FieldBytes`.

See: RustCrypto/traits#1229
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