From 49fd7f57c4a5e18c88d1346cdd3cbcce636846ea Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Fri, 1 Apr 2022 19:32:49 -0700 Subject: [PATCH] Upgrade p256 --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 79c95bc..cf5411e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ bitflags = "1.2" generic-array = "0.14" jsonwebtoken = { version = "8.0", optional = true } num-bigint = { version = "0.4", optional = true } -p256 = { version = "0.9", optional = true, features = ["arithmetic"] } +p256 = { version = "0.10", optional = true, features = ["arithmetic"] } rand = { version = "0.8", optional = true } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/src/lib.rs b/src/lib.rs index a62e623..5c88d77 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -417,7 +417,7 @@ impl Key { let sk = elliptic_curve::SecretKey::random(&mut rand::thread_rng()); let sk_scalar = p256::Scalar::from(&sk); - let pk = p256::ProjectivePoint::generator() * sk_scalar; + let pk = p256::ProjectivePoint::GENERATOR * sk_scalar; let pk_bytes = &pk .to_affine() .to_encoded_point(false /* compress */)