Commit Graph

8 Commits

Author SHA1 Message Date
Jack Grigg
40749da9a7 Constant-time field inversion
WARNING: THIS IS NOT ACTUALLY CONSTANT TIME YET!

The jubjub and bls12_381 crates will replace our constant-time usages,
but we NEED to fix ff_derive because other users will expect it to
implement the Field trait correctly.
2019-12-13 19:46:04 +00:00
Jack Grigg
cded08b0c5 Make Field::square take &self and return Self 2019-12-12 23:09:28 +00:00
Jack Grigg
9dac748224 Make Field::double take &self and return Self 2019-12-12 22:59:18 +00:00
Jack Grigg
91c32f1c7c Move from Field::negate to Neg operator 2019-12-12 22:52:17 +00:00
Jack Grigg
27c8f34601 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.
2019-12-12 21:19:46 +00:00
Jack Grigg
fe93f2ff6b Rename into_ -> to_ where &self is used. 2019-08-24 00:39:54 +01:00
Eirik Ogilvie-Wigley
81c58172c3 cargo fmt zcash_primitives 2019-08-15 10:39:55 -06:00
Jack Grigg
5fb9b86ba0 Move Jubjub, Pedersen hash and primitives into zcash_primitives 2019-08-14 10:47:22 +01:00