diff --git a/src/lib.rs b/src/lib.rs index 4b81613..29c82be 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,7 +37,7 @@ use std::io::{self, Read, Write}; pub trait Engine: Sized + 'static + Clone { /// This is the scalar field of the G1/G2 groups. - type Fr: PrimeField; + type Fr: PrimeField + SqrtField; /// The projective representation of an element in G1. type G1: CurveProjective + From; @@ -99,7 +99,7 @@ pub trait CurveProjective: PartialEq + 'static { type Engine: Engine; - type Scalar: PrimeField; + type Scalar: PrimeField + SqrtField; type Base: SqrtField; type Affine: CurveAffine; @@ -168,7 +168,7 @@ pub trait CurveAffine: Copy + 'static { type Engine: Engine; - type Scalar: PrimeField; + type Scalar: PrimeField + SqrtField; type Base: SqrtField; type Projective: CurveProjective; type Prepared: Clone + Send + Sync + 'static;