Skip to content

Conversation

@tarcieri
Copy link
Member

Adds a dev module ala the ones in the trait crates which contains new_signing_test and new_verification_test macros which implement a basic set of tests for implementers of SignPrimitive and VerifyPrimitive respectively.

Ideally this would implement something close to the set of tests described in the FIPS 186-4 ECDSA Validation System (ECDSA2VS), however for now it tests basic signing, verification, and a verification failure in the event the s component of the signature has an incorrect value.

Eventually it'd probably be good to convert to using blobby for consistency with the other dev modules, however for now it specifies a TestVector struct which the macros accept a slice of for vectors.

@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #103   +/-   ##
=======================================
  Coverage   53.59%   53.59%           
=======================================
  Files           3        3           
  Lines         181      181           
=======================================
  Hits           97       97           
  Misses         84       84           
Impacted Files Coverage Δ
ecdsa/src/lib.rs 61.76% <ø> (ø)

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 932ab45...df64838. Read the comment docs.

Adds a `dev` module ala the ones in the trait crates which contains
`new_signing_test` and `new_verification_test` macros which implement
a basic set of tests for implementers of `SignPrimitive` and
`VerifyPrimitive` respectively.

Ideally this would implement something close to the set of tests
described in the FIPS 186-4 ECDSA Validation System (ECDSA2VS), however
for now it tests basic signing, verification, and a verification failure
in the event the `s` component of the signature has an incorrect value.

Eventually it'd probably be good to convert to using `blobby` for
consistency with the other `dev` modules, however for now it specifies a
`TestVector` struct which the macros accept a slice of for vectors.
@tarcieri tarcieri force-pushed the ecdsa/dev-feature branch from 71c55f4 to df64838 Compare July 23, 2020 17:58
@tarcieri tarcieri merged commit 30e5860 into master Jul 23, 2020
@tarcieri tarcieri deleted the ecdsa/dev-feature branch July 23, 2020 18:01
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Jul 23, 2020
Converts ECDSA tests to use the `new_signing_test` and
`new_verification_test` macros added to the new `dev` feature of the
`ecdsa` crate in RustCrypto/signatures#103.

The macros use a few new APIs which were also added in this PR, namely
`AffinePoint::{from_compressed_point, from_uncompressed_point}` which
provide a more direct conversion path from SEC-1 encodings to
`AffinePoint` which skip the `PublicKey` interface (which is more of a
high-level, user-facing API)
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Jul 23, 2020
Converts ECDSA tests to use the `new_signing_test` and
`new_verification_test` macros added to the new `dev` feature of the
`ecdsa` crate in RustCrypto/signatures#103.

The macros use a few new APIs which were also added in this PR, namely
`AffinePoint::{from_compressed_point, from_uncompressed_point}` which
provide a more direct conversion path from SEC-1 encodings to
`AffinePoint` which skip the `PublicKey` interface (which is more of a
high-level, user-facing API)
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Jul 23, 2020
Converts ECDSA tests to use the `new_signing_test` and
`new_verification_test` macros added to the new `dev` feature of the
`ecdsa` crate in RustCrypto/signatures#103.

The macros use a few new APIs which were also added in this PR, namely
`AffinePoint::{from_compressed_point, from_uncompressed_point}` which
provide a more direct conversion path from SEC-1 encodings to
`AffinePoint` which skip the `PublicKey` interface (which is more of a
high-level, user-facing API)
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Jul 23, 2020
Converts ECDSA tests to use the `new_signing_test` and
`new_verification_test` macros added to the new `dev` feature of the
`ecdsa` crate in RustCrypto/signatures#103.

The macros use a few new APIs which were also added in this PR, namely
`AffinePoint::{from_compressed_point, from_uncompressed_point}` which
provide a more direct conversion path from SEC-1 encodings to
`AffinePoint` which skip the `PublicKey` interface (which is more of a
high-level, user-facing API)
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Jul 23, 2020
Converts ECDSA tests to use the `new_signing_test` and
`new_verification_test` macros added to the new `dev` feature of the
`ecdsa` crate in RustCrypto/signatures#103.

The macros use a few new APIs which were also added in this PR, namely
`AffinePoint::{from_compressed_point, from_uncompressed_point}` which
provide a more direct conversion path from SEC-1 encodings to
`AffinePoint` which skip the `PublicKey` interface (which is more of a
high-level, user-facing API)
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Jul 23, 2020
Converts ECDSA tests to use the `new_signing_test` and
`new_verification_test` macros added to the new `dev` feature of the
`ecdsa` crate in RustCrypto/signatures#103.

The macros use a few new APIs which were also added in this PR, namely
`AffinePoint::{from_compressed_point, from_uncompressed_point}` which
provide a more direct conversion path from SEC-1 encodings to
`AffinePoint` which skip the `PublicKey` interface (which is more of a
high-level, user-facing API)
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Jul 23, 2020
Converts ECDSA tests to use the `new_signing_test` and
`new_verification_test` macros added to the new `dev` feature of the
`ecdsa` crate in RustCrypto/signatures#103.

The macros use a few new APIs which were also added in this PR, namely
`AffinePoint::{from_compressed_point, from_uncompressed_point}` which
provide a more direct conversion path from SEC-1 encodings to
`AffinePoint` which skip the `PublicKey` interface (which is more of a
high-level, user-facing API)
@tarcieri tarcieri mentioned this pull request 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.

3 participants