-
Notifications
You must be signed in to change notification settings - Fork 167
ecdsa: initial dev module with new_*_test macros
#103
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #103 +/- ##
=======================================
Coverage 53.59% 53.59%
=======================================
Files 3 3
Lines 181 181
=======================================
Hits 97 97
Misses 84 84
Continue to review full report at Codecov.
|
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.
71c55f4 to
df64838
Compare
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)
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a
devmodule ala the ones in the trait crates which containsnew_signing_testandnew_verification_testmacros which implement a basic set of tests for implementers ofSignPrimitiveandVerifyPrimitiverespectively.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
scomponent of the signature has an incorrect value.Eventually it'd probably be good to convert to using
blobbyfor consistency with the otherdevmodules, however for now it specifies aTestVectorstruct which the macros accept a slice of for vectors.