diff --git a/Cargo.toml b/Cargo.toml index da6566a..8367538 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,3 +61,7 @@ harness = false [[bench]] name = "point_bench" harness = false + +[patch.crates-io] +bls12_381 = { git = "https://github.com/zkcrypto/bls12_381.git", rev = "3d96155c306f6e3febfcb06c9b7754433458f7b5" } +group = { git = "https://github.com/zkcrypto/group.git", rev = "85c484fff517135cedfe265ef893bd4b8d745300" } diff --git a/src/lib.rs b/src/lib.rs index 014173a..3b875be 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,9 +42,9 @@ use core::iter::Sum; use core::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}; use ff::{BatchInverter, Field}; use group::{ - cofactor::{CofactorCurve, CofactorCurveAffine, CofactorGroup}, + cofactor::{CofactorCurve, CofactorGroup}, prime::PrimeGroup, - Curve, Group, GroupEncoding, + Curve, CurveAffine, Group, GroupEncoding, }; use rand_core::RngCore; use subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption}; @@ -1354,22 +1354,20 @@ impl CofactorGroup for ExtendedPoint { } impl Curve for ExtendedPoint { - type AffineRepr = AffinePoint; + type Affine = AffinePoint; - fn batch_normalize(p: &[Self], q: &mut [Self::AffineRepr]) { + fn batch_normalize(p: &[Self], q: &mut [Self::Affine]) { Self::batch_normalize(p, q); } - fn to_affine(&self) -> Self::AffineRepr { + fn to_affine(&self) -> Self::Affine { self.into() } } -impl CofactorCurve for ExtendedPoint { - type Affine = AffinePoint; -} +impl CofactorCurve for ExtendedPoint {} -impl CofactorCurveAffine for AffinePoint { +impl CurveAffine for AffinePoint { type Scalar = Fr; type Curve = ExtendedPoint;