Skip to content

Commit 75d7a1b

Browse files
authored
elliptic-curve: complete digest v0.11.0-rc.0 upgrade (#1870)
Due to inter-repo dependency relationships and all of the crates previously using `=` to pin `digest`, some of the features of `elliptic-curve` had to be disabled to complete the `digest` v0.11.0-rc.0 release in #1868. Now that it's been released and there are new compatible versions of the `hkdf`, `sha2`, and `sha3` crates, it's possible to re-enable this functionality.
1 parent 2b44f2c commit 75d7a1b

5 files changed

Lines changed: 78 additions & 42 deletions

File tree

.github/workflows/elliptic-curve.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features bits
4343
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features dev
4444
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features digest
45-
#- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features ecdh
46-
#- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features hash2curve
45+
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features ecdh
46+
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features hash2curve
4747
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features jwk
48-
#- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features oprf
48+
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features oprf
4949
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features pem
5050
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features pkcs8
5151
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features sec1
@@ -54,7 +54,7 @@ jobs:
5454
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,arithmetic,pkcs8
5555
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,serde
5656
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features arithmetic,serde
57-
#- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,digest,ecdh,hash2curve,jwk,oprf,pem,pkcs8,sec1,serde
57+
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,digest,ecdh,hash2curve,jwk,oprf,pem,pkcs8,sec1,serde
5858

5959
minimal-versions:
6060
# Temporarily disabled until elliptic-curve 0.13.0-pre.0 is published

Cargo.lock

Lines changed: 60 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,4 @@ members = [
1616

1717
[patch.crates-io]
1818
digest = { path = "digest" }
19-
hkdf = { git = "https://github.com/RustCrypto/KDFs.git" }
20-
hmac = { git = "https://github.com/RustCrypto/MACs.git" }
21-
sha2 = { git = "https://github.com/RustCrypto/hashes.git" }
22-
sha3 = { git = "https://github.com/RustCrypto/hashes.git" }
2319
signature = { path = "signature" }

elliptic-curve/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ base64ct = { version = "1", optional = true, default-features = false, features
2929
digest = { version = "0.11.0-rc.0", optional = true }
3030
ff = { version = "=0.14.0-pre.0", optional = true, default-features = false }
3131
group = { version = "=0.14.0-pre.0", optional = true, default-features = false }
32-
#hkdf = { version = "=0.13.0-pre.5", optional = true, default-features = false }
32+
hkdf = { version = "0.13.0-rc.0", optional = true, default-features = false }
3333
hex-literal = { version = "1", optional = true }
3434
pem-rfc7468 = { version = "1.0.0-rc.2", optional = true, features = ["alloc"] }
3535
pkcs8 = { version = "0.11.0-rc.1", optional = true, default-features = false }
@@ -39,8 +39,8 @@ serde_json = { version = "1.0.121", optional = true, default-features = false, f
3939

4040
[dev-dependencies]
4141
hex-literal = "1"
42-
#sha2 = "=0.11.0-pre.5"
43-
#sha3 = "=0.11.0-pre.5"
42+
sha2 = "0.11.0-rc.0"
43+
sha3 = "0.11.0-rc.0"
4444

4545
[features]
4646
default = ["arithmetic"]
@@ -62,11 +62,11 @@ std = [
6262
arithmetic = ["group"]
6363
bits = ["arithmetic", "ff/bits"]
6464
dev = ["arithmetic", "dep:hex-literal", "pem", "pkcs8"]
65-
#ecdh = ["arithmetic", "digest", "dep:hkdf"]
65+
ecdh = ["arithmetic", "digest", "dep:hkdf"]
6666
group = ["dep:group", "ff"]
67-
#hash2curve = ["arithmetic", "digest"]
67+
hash2curve = ["arithmetic", "digest"]
6868
jwk = ["dep:base64ct", "dep:serde_json", "alloc", "serde", "zeroize/alloc"]
69-
#oprf = ["digest", "hash2curve"]
69+
oprf = ["digest", "hash2curve"]
7070
pkcs8 = ["dep:pkcs8", "sec1"]
7171
pem = ["dep:pem-rfc7468", "alloc", "arithmetic", "pkcs8", "sec1/pem"]
7272
serde = ["dep:serdect", "alloc", "pkcs8", "sec1/serde"]

elliptic-curve/src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ pub mod scalar;
8989

9090
#[cfg(feature = "dev")]
9191
pub mod dev;
92-
//#[cfg(feature = "ecdh")]
93-
//pub mod ecdh;
94-
//#[cfg(feature = "hash2curve")]
95-
//pub mod hash2curve;
92+
#[cfg(feature = "ecdh")]
93+
pub mod ecdh;
94+
#[cfg(feature = "hash2curve")]
95+
pub mod hash2curve;
9696
#[cfg(feature = "arithmetic")]
9797
pub mod ops;
9898
#[cfg(feature = "sec1")]
@@ -112,8 +112,8 @@ mod public_key;
112112
#[cfg(feature = "jwk")]
113113
mod jwk;
114114

115-
//#[cfg(feature = "oprf")]
116-
//mod oprf;
115+
#[cfg(feature = "oprf")]
116+
mod oprf;
117117

118118
pub use crate::{
119119
error::{Error, Result},
@@ -146,8 +146,8 @@ pub use crate::jwk::{JwkEcKey, JwkParameters};
146146
#[cfg(feature = "pkcs8")]
147147
pub use pkcs8;
148148

149-
//#[cfg(feature = "oprf")]
150-
//pub use crate::oprf::OprfParameters;
149+
#[cfg(feature = "oprf")]
150+
pub use crate::oprf::OprfParameters;
151151

152152
use core::{
153153
fmt::Debug,

0 commit comments

Comments
 (0)