Browse Source

Auto merge of #67 - ebfull:static-engine, r=ebfull

Engine should always be 'static, for flexibility in downstream code.
master
bmerge 7 years ago
parent
commit
affead11a5
  1. 2
      src/bls12_381/mod.rs
  2. 3
      src/lib.rs

2
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 {

3
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;

Loading…
Cancel
Save