Skip to content

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Jan 27, 2023

Extracts a Double trait (which should probably go in elliptic_curve::ops) which allows for multiple overlapping impls based on specific properties of the curve's a-coefficient.

The previous inherent double() method is now gated on equation_a::IsMinus3.

@tarcieri tarcieri force-pushed the primeorder/double-and-equation-a-marker-traits branch from e9c12b3 to bd62d1b Compare January 27, 2023 00:44
Extracts a `Double` trait (which should probably go in
`elliptic_curve::ops`) which allows for multiple overlapping impls based
on specific properties of the curve's a-coefficient.

The previous inherent `double()` method is now gated on
`CurveEquationAIsMinus3`.
@tarcieri tarcieri force-pushed the primeorder/double-and-equation-a-marker-traits branch from bd62d1b to 01485d9 Compare January 27, 2023 00:48
Using marker traits doesn't permit overlapping impls
@tarcieri tarcieri force-pushed the primeorder/double-and-equation-a-marker-traits branch from 9527f44 to 1741bac Compare January 27, 2023 01:56
@tarcieri tarcieri changed the title [WIP] primeorder: Double and CurveEquationA* marker traits primeorder: Double and CurveEquationA* marker traits Jan 27, 2023
@tarcieri tarcieri marked this pull request as ready for review January 27, 2023 02:12
@tarcieri tarcieri changed the title primeorder: Double and CurveEquationA* marker traits primeorder: support algorithm specialization using CurveEquationA* ZSTs Jan 27, 2023
@tarcieri tarcieri changed the title primeorder: support algorithm specialization using CurveEquationA* ZSTs primeorder: algorithm specialization using CurveEquationA* ZSTs Jan 27, 2023
@tarcieri tarcieri force-pushed the primeorder/double-and-equation-a-marker-traits branch from 3b80e6a to 8fe002e Compare January 27, 2023 02:16
tarcieri added a commit to RustCrypto/traits that referenced this pull request Jan 27, 2023
This is useful for supporting multiple potential `Double`
implementations in generic code.

See RustCrypto/elliptic-curves#728 for an example.
tarcieri added a commit to RustCrypto/traits that referenced this pull request Jan 27, 2023
This is useful for supporting multiple potential `Double`
implementations in generic code.

See RustCrypto/elliptic-curves#728 for an example.
@tarcieri tarcieri changed the title primeorder: algorithm specialization using CurveEquationA* ZSTs primeorder: algorithm specialization using equation_a::Is* ZSTs Jan 27, 2023
@tarcieri tarcieri merged commit 32384b2 into master Jan 27, 2023
@tarcieri tarcieri deleted the primeorder/double-and-equation-a-marker-traits branch January 27, 2023 15:00
@tarcieri tarcieri mentioned this pull request Mar 3, 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.

2 participants