Skip to content

elliptic-curve: refactor ProjectiveArithmetic trait#300

Merged
tarcieri merged 1 commit into
masterfrom
refactor-projective-arithmetic
Sep 11, 2020
Merged

elliptic-curve: refactor ProjectiveArithmetic trait#300
tarcieri merged 1 commit into
masterfrom
refactor-projective-arithmetic

Conversation

@tarcieri

Copy link
Copy Markdown
Member

Renames the Arithmetic trait to ProjectiveArithmetic and changes it to have only a single associated type: ProjectivePoint.

Adds AffinePoint<C> and Scalar<C> type aliases which are able to look up the corresponding associated type chain (along with ProjectivePoint<C> for consistency, although this is available as <C as ProjectiveArithmetic>::ProjectivePoint).

@tarcieri tarcieri force-pushed the refactor-projective-arithmetic branch 5 times, most recently from 9c60977 to 47a5cc1 Compare September 11, 2020 03:13
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
@tarcieri tarcieri force-pushed the refactor-projective-arithmetic branch from 47a5cc1 to d750f17 Compare September 11, 2020 04:50
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 11, 2020
@tarcieri tarcieri force-pushed the refactor-projective-arithmetic branch from d750f17 to 9fa2903 Compare September 11, 2020 04:59
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 11, 2020
@tarcieri tarcieri changed the title [WIP] elliptic-curve: refactor ProjectiveArithmetic trait elliptic-curve: refactor ProjectiveArithmetic trait Sep 11, 2020
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 11, 2020
@tarcieri tarcieri marked this pull request as ready for review September 11, 2020 05:03
@tarcieri

Copy link
Copy Markdown
Member Author

Marking this as ready for review.

This was a pretty painful PR that introduced some ugly trait bounds, but I was able to remove several superfluous traits from the elliptic-curve crate (including Arithmetic, FromFieldBytes, and Generate), leaning pretty much entirely on the ones in the ff and group crates.

I've gone ahead and opened corresponding draft PRs that integrate these changes into downstream crates:

I think this PR is a decent intermediate step towards an ff/group migration. My main concerns with it are:

  • Some ugly trait bounds
  • Some operations that were previously explicitly constant time aren't anymore. This mostly relates to various kinds of "repr" parsing, which is something I'd like to circle back on in terms of better integrating the ff/group serialization traits.

Regarding the ugly trait bounds, I opened one issue on ff with a small suggestion:

zkcrypto/ff#43

tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 11, 2020
Renames the `Arithmetic` trait to `ProjectiveArithmetic` and changes it
to have only a single associated type: `ProjectivePoint`.

Adds `AffinePoint<C>` and `Scalar<C>` type aliases which are able to
look up the corresponding associated type chain (along with
`ProjectivePoint<C>` for consistency, although this is available as
`<C as ProjectiveArithmetic>::ProjectivePoint`).
@tarcieri tarcieri force-pushed the refactor-projective-arithmetic branch from 9fa2903 to 890e055 Compare September 11, 2020 05:21
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
@tarcieri tarcieri merged commit bba3897 into master Sep 11, 2020
@tarcieri tarcieri deleted the refactor-projective-arithmetic branch September 11, 2020 14:58
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 11, 2020
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 11, 2020
@tarcieri tarcieri mentioned this pull request Sep 11, 2020
dns2utf8 pushed a commit to dns2utf8/traits that referenced this pull request Jan 24, 2023
Bumps [crypto-bigint](https://github.com/RustCrypto/crypto-bigint) from 0.3.2 to 0.4.0.
- [Release notes](https://github.com/RustCrypto/crypto-bigint/releases)
- [Changelog](https://github.com/RustCrypto/crypto-bigint/blob/master/CHANGELOG.md)
- [Commits](RustCrypto/crypto-bigint@v0.3.2...v0.4.0)

---
updated-dependencies:
- dependency-name: crypto-bigint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
scv35 added a commit to scv35/Signature-algorithms that referenced this pull request Jul 4, 2025
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