Auto merge of #67 - ebfull:static-engine, r=ebfull
Engine should always be 'static, for flexibility in downstream code.
This commit is contained in:
commit
affead11a5
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue