Commit Graph

113 Commits

Author SHA1 Message Date
Sean Bowe f89e27ad10
Address some comments from @daira. 2021-07-09 09:22:20 -06:00
Sean Bowe 32df26d881
Make permutation argument perfectly complete and zero-knowledge. 2021-07-02 16:20:36 -06:00
therealyingtong 502f0c85dc Input as associated type on EncodedChallenge
Use Input as an associated type instead of a type parameter, to
reduce infection

Co-authored-by: Sean Bowe <ewillbefull@gmail.com>
2021-05-07 22:21:54 +08:00
therealyingtong 32f011d52d Replace ChallengeSpace with EncodedChallenge API
Co-authored-by: Sean Bowe <ewillbefull@gmail.com>
2021-05-01 09:30:08 +08:00
therealyingtong 1a61eaa5d9 Propagate type changes 2021-04-23 19:18:41 +08:00
Sean Bowe cb59a40ff8
Move PLONK integration tests into the tests subdirectory. 2021-02-26 08:22:19 -07:00
therealyingtong 5a341b0f8f Modify Assignment::copy() to take Column<Any> instead of usize 2021-02-24 00:18:22 +08:00
therealyingtong d82a0c85b1 Modify Assignment::copy() to take Permutation instead of usize 2021-02-24 00:17:29 +08:00
Sean Bowe 75bb8121fb
Switch to domain prefix based on what is suggested in #182 by @daira. 2021-02-22 16:13:11 -07:00
Sean Bowe 5503517ac1
Produce URS using `hashtocurve` logic. 2021-02-22 15:50:01 -07:00
Jack Grigg b4ed5295fe Migrate to group traits
The `Curve` trait is now `CurveExt: group::prime::PrimeCurve`, and
`CurveAffine` is now `CurveAffine: group::prime::PrimeCurveAffine`.

There is no `CurveAffine` trait in `group`, and it's a widely-used
trait in this crate, so we don't rename it to `CurveAffineExt`.
2021-02-22 20:20:23 +00:00
Sean Bowe 81af4e43d1
Update pinned verification key to account for circuit changes 2021-02-18 15:48:20 -07:00
therealyingtong 2f2de13887
Calculate required degree of lookup 2021-02-18 15:41:36 -07:00
therealyingtong aca6de61f8
Evaluate Expressions and all variants
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-02-18 15:41:36 -07:00
therealyingtong d8534e1c50
Pass Expressions to meta.lookup() 2021-02-18 15:41:35 -07:00
Sean Bowe 5e20b0f2a7
Automatically derive PinnedVerificationKey's Debug impl. 2021-02-18 07:51:41 -07:00
Sean Bowe 7fcd302d2d
cargo fmt 2021-02-17 15:40:41 -07:00
Sean Bowe 2b1c319ba0
Use pretty-printing in test of verification key pinning. 2021-02-17 15:38:43 -07:00
Sean Bowe 2fe4e0d900
Change personalization of BLAKE2b used in hash_into. 2021-02-17 15:20:19 -07:00
Sean Bowe 87536cea10
Use newtypes to simplify Debug implementations for pinning verification keys. 2021-02-17 15:20:19 -07:00
Sean Bowe 2076701fc3
cargo fmt 2021-02-17 15:19:34 -07:00
Sean Bowe 34a5bfd4b1
Remove unused TryInto import. 2021-02-17 15:19:34 -07:00
ebfull bc9d05e67b
Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2021-02-17 15:19:34 -07:00
Sean Bowe dfa7d96fa9
Refactor verification key hashing logic to use Display impls. 2021-02-17 15:19:34 -07:00
therealyingtong f35e190455
Hash in field modulus, curve parameters 2021-02-17 15:19:34 -07:00
therealyingtong 52c028b4da
Disambiguate naming of hash() -> hash_into() 2021-02-17 15:19:34 -07:00
therealyingtong b204ff74a8
Do not return hash results from component hash() methods 2021-02-17 15:19:34 -07:00
therealyingtong 4aa4b4463a
Hash domain and cs into transcript 2021-02-17 15:19:34 -07:00
therealyingtong 437782e902
Hash fixed_commitments and permutations into transcript 2021-02-17 15:19:33 -07:00
therealyingtong a19dc68dee Use Column<Any> in Permutation::Argument 2021-02-17 21:32:17 +08:00
Daira Hopwood 760d69bd2c Rename "auxiliary column" to "instance column" in the book and in code. fixes #181
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-14 21:09:49 +00:00
Jack Grigg 82da677add Add name field to ConstraintSystem::create_gate
The name has type `&'static str`, as gates apply to every row and thus
do not require any runtime information to name.
2021-02-01 18:38:13 +00:00
Jack Grigg 4c3adf59d5 Add annotations to Region::{assign_advice, assign_fixed}
This enables circuits to annotate individual cells with variable names
or similar protocol-specific metadata.
2021-02-01 18:33:25 +00:00
therealyingtong 48bfea9782 Replace DummyHash with BLAKE2b 2021-02-02 00:53:53 +08:00
therealyingtong de86391f0e Update test to pass multiple ConcreteCircuits 2021-01-31 11:48:32 +08:00
therealyingtong e0f9fe1dcf Clippy fixes + address review comments
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-01-24 08:07:30 +08:00
therealyingtong 58479fbcc3 Refactor keygen to generate pk from vk. 2021-01-24 08:07:30 +08:00
Sean Bowe ba591c3b39 Add serialization support for PLONK verifying keys. 2021-01-24 08:05:58 +08:00
Kris Nuttycombe 74b2aa715f Require Rotation instead of i32 for relative rows in circuits.
Co-authored-by: str4d <thestr4d@gmail.com>
2021-01-14 11:57:32 -07:00
ebfull ccca639591
Merge pull request #111 from zcash/transcript-api-2
New Transcript API (and modified commitment scheme)
2021-01-13 16:50:47 -07:00
Jack Grigg 8590211585 Remove unnecessary parts from MockProver per review comments 2021-01-06 21:52:56 +00:00
therealyingtong fb939f17a9 Add permutation check to MockProver 2021-01-06 21:52:56 +00:00
Jack Grigg 6eebf3994b Add MockProver for developing circuits 2021-01-06 21:52:56 +00:00
Sean Bowe c5e0364962
Remove the Read/Write type parameters from Transcript{Read,Write}. 2021-01-06 10:45:11 -07:00
Sean Bowe dff5a3a692
Generate the URS using a homebrew mixture of blake2b and try-and-increment. 2021-01-06 10:45:11 -07:00
Sean Bowe a2999accb5
Rename DummyHash{Reader,Writer} to DummyHash{Read,Write}. 2021-01-06 10:45:11 -07:00
Sean Bowe 06552eec44
Update the PLONK implementation to adapt to the new transcript API. 2021-01-06 10:45:11 -07:00
Jack Grigg 90c50fdd11 Refactor permutation proofs to reflect the separate permutations 2020-12-22 23:51:32 +00:00
ebfull 7c0e56a44e
Merge pull request #84 from zcash/pasta-curves
Replace Tweedle curves with Pasta curves
2020-12-13 08:51:52 -07:00
therealyingtong 8360b94f89 Extract plonk::vanishing::{Argument, Proof} from prover and verifier
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2020-12-08 00:57:14 +08:00