Merge commit '183a64b08e9dc7067f78624ec161371f1829623e' into ff-traits

git-subtree-dir: pairing
git-subtree-split: 183a64b08e
This commit is contained in:
Jack Grigg
2019-01-06 09:01:44 +00:00
18 changed files with 103 additions and 1902 deletions

View File

@@ -18,7 +18,9 @@ pub use self::fq2::Fq2;
pub use self::fq6::Fq6;
pub use self::fr::{Fr, FrRepr};
use super::{BitIterator, CurveAffine, Engine, Field};
use super::{CurveAffine, Engine};
use ff::{BitIterator, Field, ScalarEngine};
// The BLS parameter x for BLS12-381 is -0xd201000000010000
const BLS_X: u64 = 0xd201000000010000;
@@ -27,8 +29,11 @@ const BLS_X_IS_NEGATIVE: bool = true;
#[derive(Clone, Debug)]
pub struct Bls12;
impl Engine for Bls12 {
impl ScalarEngine for Bls12 {
type Fr = Fr;
}
impl Engine for Bls12 {
type G1 = G1;
type G1Affine = G1Affine;
type G2 = G2;