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: source FieldSize from Curve::UInt type #646

Merged

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Jun 2, 2021

The crypto-bigint library defines an associated ArrayLength<u8> for every UInt type as part of the ArrayEncoding trait.

This means we don't need to define both: we can now source what was previously C::FieldSize via C::UInt::ByteSize.

This commit performs that replacement, adding a FieldSize<C> type alias which can be used anywhere C::FieldSize was previously used which sources the ArrayLength<u8> from C::UInt instead.

The `crypto-bigint` library defines an associated `ArrayLength<u8>` for
every `UInt` type as part of the `ArrayEncoding` trait.

This means we don't need to define both: we can now source what was
previously `C::FieldSize` via `C::UInt::ByteSize`.

This commit performs that replacement, adding a `FieldSize<C>` type
alias which can be used anywhere `C::FieldSize` was previously used
which sources the `ArrayLength<u8>` from `C::UInt` instead.
@tarcieri tarcieri force-pushed the elliptic-curve/source-field-size-from-curve-uint-type branch from cb33742 to 1ae4c70 Compare June 2, 2021 20:39
@tarcieri tarcieri merged commit 49bdec5 into master Jun 2, 2021
@tarcieri tarcieri deleted the elliptic-curve/source-field-size-from-curve-uint-type branch June 2, 2021 21:00
@tarcieri tarcieri mentioned this pull request Jun 8, 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