Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
16 changes: 7 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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;

Expand Down