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

ECDSA types #73

Merged
merged 1 commit into from
Jul 14, 2020
Merged

ECDSA types #73

merged 1 commit into from
Jul 14, 2020

Conversation

tarcieri
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2020

Codecov Report

Merging #73 into master will decrease coverage by 0.47%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
- Coverage   57.02%   56.55%   -0.48%     
==========================================
  Files          14       15       +1     
  Lines        2874     2898      +24     
==========================================
  Hits         1639     1639              
- Misses       1235     1259      +24     
Impacted Files Coverage Δ
k256/src/ecdsa/recoverable.rs 0.00% <0.00%> (ø)

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 bf40e82...ffbf284. Read the comment docs.

The equivalents of these types used to live in the `ecdsa` crate, but
were removed in this PR:

RustCrypto/signatures#96

The goal of that PR was to reverse the previous relationship where the
`ecdsa` crate depended on the `k256`/`p256`/`p384` crates, and instead
have the curve implementation crates consume the `ecdsa` crate as an
(optional) dependency.

It makes each curve implementation a one-stop-shop for everything
related to that curve, while allowing the ECDSA crate to provide some
common functionality like ASN.1 (de)serialization, in addition to
allowing it to export "primitive" traits which can be used with the
goal of a reusable high-level ECDSA implementation which is generic over
elliptic curves.

This commit ports over equivalent types that were removed in
`RustCrypto/signatures#96`, but also incorporates these changes:

RustCrypto/signatures#98

Where the `ecdsa` crate previously had `Asn1Signature` and
`FixedSignature` types generic over a curve, the PR above refactored it
to make the "fixed" form the preferred `Signature` type, and refactoring
ASN.1 DER support into an `ecdsa::asn1::Document` type.

The nice advantage of that approach is it means the curve
implementations no longer need to worry about an `Asn1Signature` type
and can focus on `ecdsa::Signature` as the type they need to support.
@tarcieri tarcieri changed the title [WIP] ECDSA support/refactor ECDSA types Jul 14, 2020
@tarcieri tarcieri marked this pull request as ready for review July 14, 2020 03:35
@tarcieri tarcieri merged commit 2adf766 into master Jul 14, 2020
@tarcieri tarcieri deleted the ecdsa branch July 14, 2020 03:39
This was referenced Aug 11, 2020
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