From 4e2b0b2cfcfaef61a1e8851080cf640313a6e516 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Wed, 1 Feb 2023 09:57:42 -0700 Subject: [PATCH] ecdsa: use `AffineCoordinates` trait (#650) Switches to the newly consolidated `AffineCoordinates` trait. See RustCrypto/traits#1237 --- Cargo.lock | 3 +-- Cargo.toml | 5 ++++- ecdsa/src/hazmat.rs | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9b1667d..432106c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -285,8 +285,7 @@ dependencies = [ [[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#d69d5b99ef3f906442030663fb2be515ebfe4e83" dependencies = [ "base16ct", "crypto-bigint 0.5.0-pre.3", diff --git a/Cargo.toml b/Cargo.toml index f3260ab0..f8bd0bc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,4 +8,7 @@ members = [ ] [profile.dev] -opt-level = 2 \ No newline at end of file +opt-level = 2 + +[patch.crates-io.elliptic-curve] +git = "https://github.com/rustcrypto/traits.git" \ No newline at end of file diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index f7edd595..f7d207b1 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -21,7 +21,7 @@ use { ff::PrimeField, group::{Curve as _, Group}, ops::{Invert, LinearCombination, MulByGenerator, Reduce}, - point::{AffineXCoordinate, AffineYIsOdd}, + point::AffineCoordinates, scalar::IsHigh, subtle::CtOption, CurveArithmetic, ProjectivePoint, Scalar, @@ -150,7 +150,7 @@ where /// the affine point represeting the public key via `&self`, such as a /// particular curve's `AffinePoint` type. #[cfg(feature = "arithmetic")] -pub trait VerifyPrimitive: AffineXCoordinate> + Copy + Sized +pub trait VerifyPrimitive: AffineCoordinates> + Copy + Sized where C: PrimeCurve + CurveArithmetic + CurveArithmetic, SignatureSize: ArrayLength,