elliptic-curve: import arithmetic helper functions#281
Merged
Conversation
These are helper functions for performing arithmetic on field element "limbs", e.g. implementing carry chains. The particular versions in this file come from the `k256`, which started as a fork of the `p256` crate, and notably provide 32-bit and 64-bit versions of the same functions. These are potentially helpful to have in the `elliptic-curve` crate for several reasons, most notably for testing things which are generic across elliptic curves without having to provide a full curve arithmetic implementation. Also having things in one place is nice, and potentially we can use these to provide a generic baseline implementation of certain types of curve arithmetic for curves that don't provide their own arithmetic.
Member
Author
Note: I specifically intend to use these to test the generic RFC6979 implementation. The spec mandates that all scalars are reduced and additionally performs rejection sampling on HMAC_DRBG outputs, so testing it requires the ability to ensure that a particular output doesn't overflow the curve's order (or if it does, it requires reading subsequent outputs until one does not overflow). |
tarcieri
added a commit
to RustCrypto/elliptic-curves
that referenced
this pull request
Sep 2, 2020
Migrated to the `elliptic-curve` crate in RustCrypto/traits#281
tarcieri
added a commit
to RustCrypto/elliptic-curves
that referenced
this pull request
Sep 2, 2020
Migrated to the `elliptic-curve` crate in RustCrypto/traits#281
Merged
dns2utf8
pushed a commit
to dns2utf8/traits
that referenced
this pull request
Jan 24, 2023
Bumps [zeroize](https://github.com/RustCrypto/utils) from 1.5.2 to 1.5.3. - [Release notes](https://github.com/RustCrypto/utils/releases) - [Commits](RustCrypto/utils@zeroize-v1.5.2...zeroize-v1.5.3) --- updated-dependencies: - dependency-name: zeroize dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are helper functions for performing arithmetic on field element "limbs", e.g. implementing carry chains.
The particular versions in this file come from the
k256, which started as a fork of thep256crate, and notably provide 32-bit and 64-bit versions of the same functions.These are potentially helpful to have in the
elliptic-curvecrate for several reasons, most notably for testing things which are generic across elliptic curves without having to provide a full curve arithmetic implementation.Also having things in one place is nice, and potentially we can use these to provide a generic baseline implementation of certain types of curve arithmetic for curves that don't provide their own arithmetic.
cc @str4d who I had talked to about this at one point.