Twisted Edwards parameters for BLS12-377 (#76)

Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
This commit is contained in:
zhenfei
2021-10-19 14:30:41 -04:00
committed by GitHub
parent 2118e14b6a
commit 5fe1862c9a
8 changed files with 224 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
///! Bls12-377 scalar field.
//! Bls12-377 scalar field.
///
/// Roots of unity computed from modulus and R using this sage code:
///
@@ -76,7 +76,8 @@ impl FpParameters for FrParameters {
/// GENERATOR = 22
/// Encoded in Montgomery form, so the value is
/// (22 * R) % q = 5642976643016801619665363617888466827793962762719196659561577942948671127251
/// (22 * R) % q =
/// 5642976643016801619665363617888466827793962762719196659561577942948671127251
#[rustfmt::skip]
const GENERATOR: BigInteger = BigInteger([
2984901390528151251u64,

View File

@@ -7,8 +7,7 @@ use ark_ff::{
One, UniformRand, Zero,
};
use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize};
use ark_std::rand::Rng;
use ark_std::test_rng;
use ark_std::{rand::Rng, test_rng};
use core::{
cmp::Ordering,
ops::{AddAssign, MulAssign, SubAssign},