Skip to content

k256/p256: bump ff and group deps to v0.8; MSRV 1.44+#174

Merged
tarcieri merged 1 commit into
masterfrom
bump-ff-and-group-crates-to-v0.8
Sep 9, 2020
Merged

k256/p256: bump ff and group deps to v0.8; MSRV 1.44+#174
tarcieri merged 1 commit into
masterfrom
bump-ff-and-group-crates-to-v0.8

Conversation

@tarcieri

@tarcieri tarcieri commented Sep 9, 2020

Copy link
Copy Markdown
Member

Previously the elliptic-curve crate was depending on pre-releases of ff and group sourced via git. It was upgraded to use the final releases in RustCrypto/traits#292.

Because these crates depend on bitvec and its transitive dependencies, an arithmetic feature was added to elliptic-curve in RustCrypto/traits#293.

This commit upgrades the k256 and p256 crates to use the final releases of ff and group. This ended up actually being a relatively straightforward upgrade because we were already running off the latest versions sourced from git.

The major notable change is PrimeField::ReprBits and the to_le_bits and char_le_bits methods for obtaining bitvec-friendly types for representing field elements.

@codecov-commenter

codecov-commenter commented Sep 9, 2020

Copy link
Copy Markdown

Codecov Report

Merging #174 into master will decrease coverage by 0.29%.
The diff coverage is 3.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #174      +/-   ##
==========================================
- Coverage   58.50%   58.21%   -0.30%     
==========================================
  Files          25       25              
  Lines        3767     3786      +19     
==========================================
  Hits         2204     2204              
- Misses       1563     1582      +19     
Impacted Files Coverage Δ
k256/src/arithmetic.rs 100.00% <ø> (ø)
k256/src/arithmetic/affine.rs 87.95% <ø> (+2.06%) ⬆️
k256/src/arithmetic/projective.rs 77.36% <ø> (+0.63%) ⬆️
k256/src/arithmetic/scalar.rs 74.90% <0.00%> (-0.84%) ⬇️
k256/src/arithmetic/scalar/scalar_4x64.rs 0.00% <0.00%> (ø)
k256/src/arithmetic/scalar/scalar_8x32.rs 91.27% <0.00%> (-0.40%) ⬇️
p256/src/arithmetic.rs 100.00% <ø> (ø)
p256/src/arithmetic/projective.rs 75.81% <ø> (+0.61%) ⬆️
p256/src/arithmetic/scalar.rs 77.11% <4.54%> (-3.98%) ⬇️

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 4c68deb...be0da51. Read the comment docs.

@tarcieri

tarcieri commented Sep 9, 2020

Copy link
Copy Markdown
Member Author

It seems p256 isn't building on 32-bit targets because it lacks a u32x8 scalar field backend, and BitView is not impl'd for [u64; N] on 32-bit architectures:

error[E0277]: the trait bound `[u64; 4]: elliptic_curve::BitView` is not satisfied

Interestingly enough, since k256 does have a 32-bit scalar field backend (thanks @fjarri), this isn't an issue for that crate!

I'll look at working around the issue for now, but it'd sure be great to have a 32-bit scalar field implementation as well, particularly if ff_derive can generate one.

/cc @str4d

@tarcieri tarcieri force-pushed the bump-ff-and-group-crates-to-v0.8 branch 2 times, most recently from a1d5ac0 to 3fff761 Compare September 9, 2020 03:59
Comment thread p256/src/arithmetic/scalar.rs Outdated
@tarcieri tarcieri force-pushed the bump-ff-and-group-crates-to-v0.8 branch 2 times, most recently from 1da3219 to 7ba3f83 Compare September 9, 2020 04:34
Comment thread p256/src/arithmetic/scalar.rs
@tarcieri tarcieri force-pushed the bump-ff-and-group-crates-to-v0.8 branch from 7ba3f83 to 9019357 Compare September 9, 2020 04:49
Previously the `elliptic-curve` crate was depending on pre-releases of
`ff` and `group` sourced via git. It was upgraded to use the final
releases in RustCrypto/traits#292.

Because these crates depend on `bitvec` and its transitive dependencies,
an `arithmetic` feature was added to `elliptic-curve` in
RustCrypto/traits#293.

This commit upgrades the `k256` and `p256` crates to use the final
releases of `ff` and `group`. This ended up actually being a relatively
straightforward upgrade because we were already running off the latest
versions sourced from git.

The major notable change is `PrimeField::ReprBits` and the `to_le_bits`
and `char_le_bits` methods for obtaining `bitvec`-friendly types for
representing field elements.
@tarcieri tarcieri force-pushed the bump-ff-and-group-crates-to-v0.8 branch from 9019357 to be0da51 Compare September 9, 2020 07:27
@tarcieri tarcieri merged commit cd9e231 into master Sep 9, 2020
@tarcieri tarcieri deleted the bump-ff-and-group-crates-to-v0.8 branch September 9, 2020 14:56
This was referenced Sep 17, 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