Move Field operations to operator-backed traits

The ff_derive, pairing, zcash_primitives::jubjub, and bellman dummy_engine
changes are minimally implemented on top of the existing *_assign()
functions.
This commit is contained in:
Jack Grigg
2019-12-12 20:57:06 +00:00
parent 2f7dd6094c
commit 27c8f34601
35 changed files with 771 additions and 233 deletions

View File

@@ -2,6 +2,7 @@
use ff::Field;
use pairing::Engine;
use std::ops::{AddAssign, MulAssign, SubAssign};
use bellman::{ConstraintSystem, SynthesisError};
@@ -668,6 +669,7 @@ mod test {
use pairing::bls12_381::{Bls12, Fr};
use rand_core::{RngCore, SeedableRng};
use rand_xorshift::XorShiftRng;
use std::ops::SubAssign;
use bellman::gadgets::test::*;
use zcash_primitives::jubjub::fs::Fs;

View File

@@ -5,6 +5,7 @@ use bellman::{
use ff::Field;
use pairing::bls12_381::{Bls12, Fr};
use rand_core::OsRng;
use std::ops::AddAssign;
use zcash_primitives::{
jubjub::{edwards, fs::Fs, FixedGenerators, JubjubBls12, Unknown},
primitives::{Diversifier, Note, PaymentAddress, ProofGenerationKey, ValueCommitment},