Skip to content

Commit 5aa49c0

Browse files
authored
Merge pull request #432 from gmorenz/update-x25519-dalek
Update x25519-dalek
2 parents 5ef1101 + d5318c9 commit 5aa49c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dtls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ aes-gcm = "0.10.1"
3535
ccm = "0.3.0"
3636
tokio = { version = "1.19", features = ["full"] }
3737
async-trait = "0.1.56"
38-
x25519-dalek = "2.0.0-pre.1"
38+
x25519-dalek = { version = "2.0.0-rc.2", features = ["static_secrets"] }
3939
signature = "1.2.2"
4040
x509-parser = "0.13.2"
4141
der-parser = "8.1"

dtls/src/curve/named_curve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fn elliptic_curve_keypair(curve: NamedCurve) -> Result<NamedCurveKeypair> {
5454
)
5555
}
5656
NamedCurve::X25519 => {
57-
let secret_key = x25519_dalek::StaticSecret::new(OsRng);
57+
let secret_key = x25519_dalek::StaticSecret::random_from_rng(OsRng);
5858
let public_key = x25519_dalek::PublicKey::from(&secret_key);
5959
(
6060
public_key.as_bytes().to_vec(),

0 commit comments

Comments
 (0)