k256: use ecdsa/dev test macros + API support#85
Conversation
7603899 to
7ac05ac
Compare
Codecov Report
@@ Coverage Diff @@
## master #85 +/- ##
==========================================
+ Coverage 53.70% 53.73% +0.02%
==========================================
Files 17 17
Lines 3374 3376 +2
==========================================
+ Hits 1812 1814 +2
Misses 1562 1562
Continue to review full report at Codecov.
|
722b1f0 to
9147b66
Compare
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)
9147b66 to
4593ecd
Compare
| # codecov: | ||
| # runs-on: ubuntu-latest | ||
| # steps: | ||
| # - name: Checkout repository | ||
| # uses: actions/checkout@v2 | ||
| # | ||
| # - name: Cache cargo registry | ||
| # uses: actions/cache@v1 | ||
| # with: | ||
| # path: ~/.cargo/registry | ||
| # key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} | ||
| # | ||
| # - name: Cache cargo index | ||
| # uses: actions/cache@v1 | ||
| # with: | ||
| # path: ~/.cargo/git | ||
| # key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }} | ||
| # | ||
| # - name: Cache cargo build | ||
| # uses: actions/cache@v1 | ||
| # with: | ||
| # path: target | ||
| # key: ${{ runner.os }}-coverage-cargo-build-target-${{ hashFiles('Cargo.lock') }} | ||
| # | ||
| # - name: Install stable toolchain | ||
| # uses: actions-rs/toolchain@v1 | ||
| # with: | ||
| # toolchain: stable | ||
| # override: true | ||
| # | ||
| # - name: Run cargo-tarpaulin | ||
| # uses: actions-rs/tarpaulin@v0.1 | ||
| # env: | ||
| # CARGO_INCREMENTAL: 0 | ||
| # with: | ||
| # version: 0.14.2 | ||
| # args: --all -- --test-threads 1 | ||
| # | ||
| # - name: Upload to codecov.io | ||
| # uses: codecov/codecov-action@v1.0.10 | ||
| # | ||
| # - name: Archive code coverage results | ||
| # uses: actions/upload-artifact@v1 | ||
| # with: | ||
| # name: code-coverage-report | ||
| # path: cobertura.xml |
There was a problem hiding this comment.
Not sure why but cargo-tarpaulin is failing:
https://github.com/RustCrypto/elliptic-curves/pull/85/checks?check_run_id=904067088
I attempted to reproduce it locally but cannot. It doesn't appear to be cache-related as this commit is a cache breaker due to the Cargo.lock changes.
I'd like to do a pass over p256 to get it in to a similar state as this PR (as part of #84) after which I can try re-enabling this.
Converts ECDSA tests to use the
new_signing_test!andnew_verification_test!macros added to the newdevfeature of theecdsacrate 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 toAffinePointwhich skip thePublicKeyinterface (which is more of a high-level, user-facing API).