Skip to content

[WIP] Add ECDSA primitive traits to the elliptic-curve crate#69

Closed
tarcieri wants to merge 1 commit into
masterfrom
ecdsa-primitive
Closed

[WIP] Add ECDSA primitive traits to the elliptic-curve crate#69
tarcieri wants to merge 1 commit into
masterfrom
ecdsa-primitive

Conversation

@tarcieri

@tarcieri tarcieri commented Jul 12, 2020

Copy link
Copy Markdown
Member

(Another alternative to #65 and #67 with the goal of generic cross-curve ECDSA support)

Adds a set of low-level "hazmat" traits to the elliptic-curve crate for implementing ECDSA signing, verification, and public key recovery.

These primitives allow crates containing implementations of specific curves to define core ECDSA functionality in a coarse-grained manner which can potentially leverage things like assembly or hardware cryptographic accelerators.

Adds a set of low-level "hazmat" traits to the `elliptic-curve` crate
for implementing ECDSA signing, verification, and public key recovery.

These primitives allow crates containing implementations of specific
curves to define core ECDSA functionality in a coarse-grained manner
which can potentially leverage things like assembly or hardware
cryptographic accelerators.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #69 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #69   +/-   ##
=======================================
  Coverage   81.50%   81.50%           
=======================================
  Files          12       12           
  Lines        1395     1395           
=======================================
  Hits         1137     1137           
  Misses        258      258           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8721a2...c696a27. Read the comment docs.

@tarcieri

tarcieri commented Jul 12, 2020

Copy link
Copy Markdown
Member Author

I put these traits in this crate in this PR because presently the ecdsa crate consumes the various curve implementations, however as I look at them it feels a bit gross and like this is the wrong place for them and they should go in the ecdsa crate.

Another option is to put these traits in the ecdsa crate and reverse the relationship between the ecdsa crate and the individual curve implementations, so the curves pull in ecdsa as an optional feature.

I think that approach would actually make the most sense:

  • Gives individual curve implementation crates the most flexibility
  • Anyone could potentially implement ECDSA for curves in third party crates

All the rest of that said, I really like this approach over #65 and #67. I think it addresses @nickray's concerns in #55 about assembly-based optimizations by having the trait express a coarse-grained ECDSA implementation.

@tarcieri

Copy link
Copy Markdown
Member Author

Here's similar (actually, much simpler!) traits implemented in the ecdsa crate:

RustCrypto/signatures#96

I definitely prefer that approach over this one, so I'm going to go ahead and close this out.

@tarcieri tarcieri closed this Jul 12, 2020
@tarcieri tarcieri deleted the ecdsa-primitive branch July 12, 2020 02:39
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