diff --git a/bip0032/Cargo.toml b/bip0032/Cargo.toml index 2909bc1..8a852d2 100644 --- a/bip0032/Cargo.toml +++ b/bip0032/Cargo.toml @@ -70,7 +70,7 @@ secp256k1 = { version = "0.31", default-features = false, features = ["alloc"], # nist256p1 libraries (SLIP-0010 extension) ############################################################################### # https://github.com/RustCrypto/elliptic-curves/tree/master/p256 -p256 = { version = "0.13", default-features = false, features = ["alloc"], optional = true } +p256 = { version = "0.14", default-features = false, features = ["alloc"], optional = true } ############################################################################### # ed25519 libraries (SLIP-0010 extension) diff --git a/bip0032/src/curve/nist256p1/backends/p256.rs b/bip0032/src/curve/nist256p1/backends/p256.rs index 702f5f6..2cd259e 100644 --- a/bip0032/src/curve/nist256p1/backends/p256.rs +++ b/bip0032/src/curve/nist256p1/backends/p256.rs @@ -1,6 +1,6 @@ use p256::{ AffinePoint, NonZeroScalar, ProjectivePoint, PublicKey, SecretKey, - elliptic_curve::sec1::ToEncodedPoint, + elliptic_curve::sec1::ToSec1Point, }; use zeroize::Zeroizing; @@ -20,7 +20,7 @@ impl CurvePublicKey for PublicKey { } fn to_bytes(&self) -> Self::Bytes { - let encoded = self.to_encoded_point(true); + let encoded = self.to_sec1_point(true); let mut out = [0u8; 33]; out.copy_from_slice(encoded.as_bytes()); out