diff --git a/src/groth16/generator.rs b/src/groth16/generator.rs index 264d3ab..b270ab3 100644 --- a/src/groth16/generator.rs +++ b/src/groth16/generator.rs @@ -3,7 +3,7 @@ use std::ops::{AddAssign, MulAssign}; use std::sync::Arc; use ff::Field; -use group::{CurveAffine, CurveProjective, Wnaf}; +use group::{CurveAffine, CurveProjective, Group, Wnaf}; use pairing::Engine; use super::{Parameters, VerifyingKey}; diff --git a/src/groth16/tests/dummy_engine.rs b/src/groth16/tests/dummy_engine.rs index 841c052..611be97 100644 --- a/src/groth16/tests/dummy_engine.rs +++ b/src/groth16/tests/dummy_engine.rs @@ -1,5 +1,5 @@ use ff::{Field, PrimeField, ScalarEngine}; -use group::{CurveAffine, CurveProjective, EncodedPoint, GroupDecodingError}; +use group::{CurveAffine, CurveProjective, EncodedPoint, Group, GroupDecodingError, PrimeGroup}; use pairing::{Engine, PairingCurveAffine}; use rand_core::RngCore; @@ -352,11 +352,7 @@ impl Engine for DummyEngine { } } -impl CurveProjective for Fr { - type Affine = Fr; - type Base = Fr; - type Scalar = Fr; - +impl Group for Fr { fn random(rng: &mut R) -> Self { ::random(rng) } @@ -372,6 +368,14 @@ impl CurveProjective for Fr { fn is_identity(&self) -> bool { ::is_zero(self) } +} + +impl PrimeGroup for Fr {} + +impl CurveProjective for Fr { + type Affine = Fr; + type Base = Fr; + type Scalar = Fr; fn batch_normalization(_: &mut [Self]) {} diff --git a/src/multiexp.rs b/src/multiexp.rs index 881dd21..643f743 100644 --- a/src/multiexp.rs +++ b/src/multiexp.rs @@ -314,6 +314,7 @@ fn test_with_bls12() { acc } + use group::Group; use pairing::{bls12_381::Bls12, Engine}; use rand;