diff --git a/src/bls12_381/mod.rs b/src/bls12_381/mod.rs index 341df67..9213b88 100644 --- a/src/bls12_381/mod.rs +++ b/src/bls12_381/mod.rs @@ -21,7 +21,7 @@ use super::{Engine, CurveAffine, Field, BitIterator}; const BLS_X: u64 = 0xd201000000010000; const BLS_X_IS_NEGATIVE: bool = true; -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Bls12; impl Engine for Bls12 { diff --git a/src/lib.rs b/src/lib.rs index 18cc288..4b81613 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,7 +34,8 @@ use std::io::{self, Read, Write}; /// An "engine" is a collection of types (fields, elliptic curve groups, etc.) /// with well-defined relationships. In particular, the G1/G2 curve groups are /// of prime order `r`, and are equipped with a bilinear pairing function. -pub trait Engine: Sized { +pub trait Engine: Sized + 'static + Clone +{ /// This is the scalar field of the G1/G2 groups. type Fr: PrimeField;