diff --git a/Cargo.lock b/Cargo.lock index c1e005f4..804b8cd2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -331,8 +331,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.16.0-pre.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcd6964e28e4802aed67abfaddd5e5430f368c54cc3e498d2a6a8444e5361fe5" +source = "git+https://github.com/RustCrypto/signatures.git#4e2b0b2cfcfaef61a1e8851080cf640313a6e516" dependencies = [ "der", "elliptic-curve", @@ -350,8 +349,7 @@ checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" version = "0.13.0-pre.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a583fbbbfde04e0ef9c8b84c3bf8e504155a1642f91bf5cc2d6e7355cfb6ac4f" +source = "git+https://github.com/RustCrypto/traits.git#cd2ecd3bff18ad4c162ac41f275f405537dc439c" dependencies = [ "base16ct", "base64ct", @@ -915,8 +913,7 @@ dependencies = [ [[package]] name = "rfc6979" version = "0.4.0-pre.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3595c18d975a2c373afdb4f8d17016589e65f9d84305c1c36fc55272def0bd" +source = "git+https://github.com/RustCrypto/signatures.git#4e2b0b2cfcfaef61a1e8851080cf640313a6e516" dependencies = [ "hmac", "subtle", diff --git a/Cargo.toml b/Cargo.toml index 5b42a8e2..49eebc22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,4 +12,8 @@ members = [ ] [profile.dev] -opt-level = 2 \ No newline at end of file +opt-level = 2 + +[patch.crates-io] +ecdsa = { git = "https://github.com/RustCrypto/signatures.git" } +elliptic-curve = { git = "https://github.com/RustCrypto/traits.git" } \ No newline at end of file diff --git a/k256/src/arithmetic/affine.rs b/k256/src/arithmetic/affine.rs index 83c93e9a..2fb1e888 100644 --- a/k256/src/arithmetic/affine.rs +++ b/k256/src/arithmetic/affine.rs @@ -7,7 +7,7 @@ use crate::{CompressedPoint, EncodedPoint, FieldBytes, PublicKey, Scalar, Secp25 use core::ops::{Mul, Neg}; use elliptic_curve::{ group::{prime::PrimeCurveAffine, GroupEncoding}, - point::{AffineXCoordinate, AffineYIsOdd, DecompactPoint, DecompressPoint}, + point::{AffineCoordinates, DecompactPoint, DecompressPoint}, sec1::{self, FromEncodedPoint, ToEncodedPoint}, subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption}, zeroize::DefaultIsZeroes, @@ -107,15 +107,13 @@ impl PrimeCurveAffine for AffinePoint { } } -impl AffineXCoordinate for AffinePoint { +impl AffineCoordinates for AffinePoint { type FieldRepr = FieldBytes; fn x(&self) -> FieldBytes { self.x.to_bytes() } -} -impl AffineYIsOdd for AffinePoint { fn y_is_odd(&self) -> Choice { self.y.normalize().is_odd() } diff --git a/primeorder/src/affine.rs b/primeorder/src/affine.rs index b821ab6e..4391ac42 100644 --- a/primeorder/src/affine.rs +++ b/primeorder/src/affine.rs @@ -11,7 +11,7 @@ use elliptic_curve::{ ff::{Field, PrimeField}, generic_array::ArrayLength, group::{prime::PrimeCurveAffine, GroupEncoding}, - point::{AffineXCoordinate, AffineYIsOdd, DecompactPoint, DecompressPoint, Double}, + point::{AffineCoordinates, DecompactPoint, DecompressPoint, Double}, sec1::{ self, CompressedPoint, EncodedPoint, FromEncodedPoint, ModulusSize, ToCompactEncodedPoint, ToEncodedPoint, UncompressedPointSize, @@ -77,7 +77,7 @@ where } } -impl AffineXCoordinate for AffinePoint +impl AffineCoordinates for AffinePoint where C: PrimeCurveParams, { @@ -86,12 +86,7 @@ where fn x(&self) -> FieldBytes { self.x.to_repr() } -} -impl AffineYIsOdd for AffinePoint -where - C: PrimeCurveParams, -{ fn y_is_odd(&self) -> Choice { self.y.is_odd() }