Commit Graph

15 Commits

Author SHA1 Message Date
Jack Grigg f90fa65a32 Migrate to ff 0.8
MSRV is now 1.44.0, matching the ff crate.
2020-09-08 23:44:20 +01:00
Jack Grigg 459fa4a635 pairing: Remove BLS12-381 implementation
It is replaced by the bls12_381 crate.
2020-08-25 23:11:18 +01:00
Henry de Valence e534f36ec4 bellman: add VerificationError (#254)
* bellman: add VerificationError

This adds a distinct VerificationError type to the crate and changes
`verify_proof` to return `Result<(), VerificationError>` rather than
`Result<bool, SynthesisError>`.  This is significantly safer, because it avoids
the need to mix pattern-matching logic with boolean logic (the cause of
RUSTSEC-2019-0004).

* Rename VerificationError variants per review comments.

* Add missing Clone impl to VerificationError.
2020-08-25 23:11:18 +01:00
Jack Grigg 025746cdc8 ff: Remove ScalarEngine 2020-08-25 23:11:17 +01:00
Jack Grigg 2e540e681c bellman: Replace E: ScalarEngine with Scalar: PrimeField
Instead of imposing the requirement that bellman users explicitly
specify an engine for every proving system, we allow the Rust type
system to figure it out for us. An engine is specifically useful in
places where we require defined relationships between several types;
ff::ScalarEngine only has one type, and thus any usage of it can be
trivially replaced by an explicit Scalar type. This is also more
readable :)
2020-08-25 23:11:05 +01:00
Jack Grigg c716dfdd63 Make Field::square take &self and return Self 2020-08-25 23:09:46 +01:00
Jack Grigg c05b957e9d 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.
2020-08-25 23:09:46 +01:00
Eirik Ogilvie-Wigley bb11ef26e9 cargo fmt 2019-08-20 22:22:03 -06:00
Eirik Ogilvie-Wigley cff2e2f28d cargo fix --edition-idioms for bellman 2019-08-20 22:07:24 -06:00
Eirik Ogilvie-Wigley ad37878533 cargo fix --edition for bellman 2019-08-20 16:45:10 -06:00
Eirik Ogilvie-Wigley e73d1a2637 cargo fmt bellman 2019-08-15 10:38:41 -06:00
Jack Grigg 533d5860bd Migrate bellman to rand 0.5 2019-07-19 00:35:06 +02:00
Jack Grigg 718b25c949
Use ff crate for Field traits 2018-07-06 21:10:44 +01:00
Sean Bowe f5370057bd Test deserialization of proofs in MiMC test example. 2018-03-04 19:41:59 -07:00
Sean Bowe 5f8747a0f4 Move MiMC example to tests. 2018-03-04 19:33:59 -07:00