Skip to content

Commit d56a8f8

Browse files
authored
dhkem: bump elliptic curve crates (#338)
1 parent 2e55e06 commit d56a8f8

3 files changed

Lines changed: 30 additions & 28 deletions

File tree

Cargo.lock

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

dhkem/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ kem = "0.3"
1919
rand_core = "0.10"
2020

2121
# optional dependencies
22-
elliptic-curve = { version = "0.14.0-rc.33", optional = true, default-features = false }
23-
k256 = { version = "0.14.0-rc.10", optional = true, default-features = false, features = ["arithmetic"] }
24-
p256 = { version = "0.14.0-rc.10", optional = true, default-features = false, features = ["arithmetic"] }
25-
p384 = { version = "0.14.0-rc.10", optional = true, default-features = false, features = ["arithmetic"] }
26-
p521 = { version = "0.14.0-rc.10", optional = true, default-features = false, features = ["arithmetic"] }
22+
elliptic-curve = { version = "0.14.0-rc.35", optional = true, default-features = false }
23+
k256 = { version = "0.14.0-rc.12", optional = true, default-features = false, features = ["arithmetic"] }
24+
p256 = { version = "0.14.0-rc.12", optional = true, default-features = false, features = ["arithmetic"] }
25+
p384 = { version = "0.14.0-rc.12", optional = true, default-features = false, features = ["arithmetic"] }
26+
p521 = { version = "0.14.0-rc.12", optional = true, default-features = false, features = ["arithmetic"] }
2727
x25519 = { version = "3.0.0-rc.0", package = "x25519-dalek", optional = true, default-features = false }
28-
zeroize = { version = "1.8.1", optional = true, default-features = false }
28+
zeroize = { version = "1.9", optional = true, default-features = false }
2929

3030
[dev-dependencies]
3131
getrandom = { version = "0.4", features = ["sys_rng"] }

dhkem/src/ecdh_kem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ where
130130
) -> Result<SharedKey<EcdhKem<C>>, Error> {
131131
let encapsulated_key = PublicKey::<C>::from_sec1_bytes(encapsulated_key)?;
132132
let shared_secret = self.dk.diffie_hellman(&encapsulated_key);
133-
Ok(shared_secret.raw_secret_bytes().clone())
133+
Ok(*shared_secret.raw_secret_bytes())
134134
}
135135
}
136136

@@ -222,6 +222,6 @@ where
222222
let ss = sk.diffie_hellman(&self.0);
223223

224224
let pk = sk.public_key().to_uncompressed_point();
225-
(pk, ss.raw_secret_bytes().clone())
225+
(pk, *ss.raw_secret_bytes())
226226
}
227227
}

0 commit comments

Comments
 (0)