Skip to content

Commit b69d839

Browse files
authored
elliptic-curve: remove JWK support (#1963)
Migrated to the `jose-jwk` crate in RustCrypto/JOSE#85
1 parent 04771a8 commit b69d839

File tree

8 files changed

+12
-836
lines changed

8 files changed

+12
-836
lines changed

.github/workflows/elliptic-curve.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
CARGO_INCREMENTAL: 0
1818
RUSTFLAGS: "-Dwarnings"
1919
RUSTDOCFLAGS: "-Dwarnings"
20-
20+
2121
# Cancels CI jobs when new commits are pushed to a PR branch
2222
concurrency:
2323
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -48,7 +48,6 @@ jobs:
4848
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features dev
4949
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features digest
5050
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features ecdh
51-
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features jwk
5251
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features pem
5352
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features pkcs8
5453
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features sec1
@@ -57,10 +56,10 @@ jobs:
5756
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,arithmetic,pkcs8
5857
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,serde
5958
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features arithmetic,serde
60-
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,digest,ecdh,jwk,pem,pkcs8,sec1,serde
59+
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,digest,ecdh,pem,pkcs8,sec1,serde
6160

6261
minimal-versions:
63-
# Temporarily disabled until elliptic-curve 0.13.0-pre.0 is published
62+
# Temporarily disabled until elliptic-curve 0.14.0 is published
6463
if: false
6564
runs-on: ubuntu-latest
6665
steps:

Cargo.lock

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

elliptic-curve/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ subtle = { version = "2.6", default-features = false }
2525
zeroize = { version = "1.7", default-features = false }
2626

2727
# optional dependencies
28-
base64ct = { version = "1", optional = true, default-features = false, features = ["alloc"] }
2928
digest = { version = "0.11.0-rc.0", optional = true }
3029
ff = { version = "=0.14.0-pre.0", optional = true, default-features = false }
3130
group = { version = "=0.14.0-pre.0", optional = true, default-features = false }
@@ -35,7 +34,6 @@ pem-rfc7468 = { version = "1.0.0-rc.2", optional = true, features = ["alloc"] }
3534
pkcs8 = { version = "0.11.0-rc.6", optional = true, default-features = false }
3635
sec1 = { version = "0.8.0-rc.8", optional = true, features = ["subtle", "zeroize"] }
3736
serdect = { version = "0.3", optional = true, default-features = false, features = ["alloc"] }
38-
serde_json = { version = "1.0.121", optional = true, default-features = false, features = ["alloc"] }
3937

4038
[dev-dependencies]
4139
hex-literal = "1"
@@ -64,10 +62,9 @@ bits = ["arithmetic", "ff/bits"]
6462
dev = ["arithmetic", "dep:hex-literal", "pem", "pkcs8"]
6563
ecdh = ["arithmetic", "digest", "dep:hkdf"]
6664
group = ["dep:group", "ff"]
67-
jwk = ["dep:base64ct", "dep:serde_json", "alloc", "serde", "zeroize/alloc"]
6865
pkcs8 = ["dep:pkcs8", "sec1"]
6966
pem = ["dep:pem-rfc7468", "alloc", "arithmetic", "pkcs8/pem", "sec1/pem"]
7067
serde = ["dep:serdect", "alloc", "pkcs8", "sec1/serde"]
7168

7269
[package.metadata.docs.rs]
73-
features = ["bits", "ecdh", "jwk", "pem", "std"]
70+
features = ["bits", "ecdh", "pem", "std"]

elliptic-curve/src/dev.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ use alloc::vec::Vec;
3131
#[cfg(feature = "bits")]
3232
use ff::PrimeFieldBits;
3333

34-
#[cfg(feature = "jwk")]
35-
use crate::JwkParameters;
36-
3734
/// Pseudo-coordinate for fixed-based scalar mult output
3835
pub const PSEUDO_COORDINATE_FIXED_BASE_MUL: [u8; 32] =
3936
hex!("deadbeef00000000000000000000000000000000000000000000000000000001");
@@ -90,11 +87,6 @@ impl AssociatedOid for MockCurve {
9087
const OID: pkcs8::ObjectIdentifier = pkcs8::ObjectIdentifier::new_unwrap("1.2.840.10045.3.1.7");
9188
}
9289

93-
#[cfg(feature = "jwk")]
94-
impl JwkParameters for MockCurve {
95-
const CRV: &'static str = "P-256";
96-
}
97-
9890
/// Example scalar type
9991
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, PartialOrd, Ord)]
10092
pub struct Scalar(ScalarPrimitive);

0 commit comments

Comments
 (0)