Commit Graph

438 Commits

Author SHA1 Message Date
ying tong da82ecb086
Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-03 22:16:40 +08:00
therealyingtong 0b102b13bc Explicit type ascription when calling squeeze_challenge_scalar
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-01 19:36:09 +08:00
therealyingtong 8807ac25fb Doc and clippy fixes 2021-05-01 09:46:41 +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 85c5f4412d Refactor Transcript API
- remove method to return a challenge in the base field
- let ChallengeSpace decide length of raw challenge instead of limiting it to u128

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-04-23 19:18:41 +08:00
therealyingtong 1a61eaa5d9 Propagate type changes 2021-04-23 19:18:41 +08:00
therealyingtong 1a9baab55b Introduce ChallengeSpace trait with to_challenge_scalar() method.
This is implemented for the ChallengeScalarEndo and ChallengeScalarFull types.

Co-authored-by: Kris Nuttycombe <kris@electriccoin.co>
2021-04-23 19:18:41 +08:00
Jack Grigg da6abf40de Migrate to pasta_curves with Coordinates struct 2021-04-20 09:29:02 +12:00
Jack Grigg 0df5bc4b45 dev: Track region offset correctly in halo2::dev::circuit_layout 2021-04-09 14:32:20 +12:00
Jack Grigg 4c9362c504 MockProver: Look up permutations from correct column types 2021-04-09 13:23:07 +12:00
str4d b079624ea7
Merge pull request #228 from zcash/pasta_curves-crate
Migrate to the pasta_curves crate
2021-03-07 08:42:44 +13:00
Jack Grigg a130edaade Remove metrics crate and inline modelling
It is causing problems in (some) downstream crates, and we won't want
these annotations in the codebase anyway if a downstream crate is
collecting metrics. We'll be replacing this with the cost model binary
in https://github.com/zcash/halo2/pull/225 shortly.
2021-03-03 23:13:34 +00:00
Jack Grigg 7774dd8235 Migrate to the pasta_curves crate 2021-03-03 18:48:45 +00:00
str4d 5e05845936
Remove unnecessary identity check from Group::random impl
Co-authored-by: ebfull <ewillbefull@gmail.com>
2021-03-03 11:11:13 +13:00
Jack Grigg 62e50ae6bd Fix Group::random implementation for Pallas and Vesta
Also removes the broken CurveAffine::from_bytes_wide and unused
CurveAffine::to_bytes_wide methods.
2021-03-02 21:29:59 +00:00
Jack Grigg 0a4db20d82 impl group::cofactor::CofactorGroup for Pallas and Vesta
Prime-order groups can be treated as a group with a cofactor of 1,
allowing them to be used in cofactor-aware protocols like RedDSA.
2021-03-01 20:27:34 +00:00
Sean Bowe cb59a40ff8
Move PLONK integration tests into the tests subdirectory. 2021-02-26 08:22:19 -07:00
Sean Bowe ef86a936ff
Remove print statements from tests. 2021-02-26 08:22:13 -07:00
Sean Bowe d92b1c4fb9
Relocate computation of the degree of the constraint system to the ConstraintSystem struct. 2021-02-26 08:22:05 -07:00
Jack Grigg e41fd7ca12 Move SHA-256 gadget and chip into examples 2021-02-25 20:01:44 +00:00
Jack Grigg c64346467b Add Table16 circuit layout example 2021-02-25 20:01:44 +00:00
Jack Grigg 3fa36d7a60 Add test for circuit_dot_graph using SHA-256 2021-02-25 20:01:44 +00:00
therealyingtong 5f4a08898e SHA-256 benchmarks 2021-02-25 20:01:44 +00:00
therealyingtong a5ac5b3ed3 Add Compression test 2021-02-25 20:01:44 +00:00
therealyingtong 46b5ddcc68 Compression subregion_digest assignments 2021-02-25 20:01:44 +00:00
therealyingtong b47b2e436b Compression subregion_main assignments 2021-02-25 20:01:44 +00:00
therealyingtong 05c6ebd42d Compression subregion_initial assignments 2021-02-25 20:01:44 +00:00
therealyingtong 4d7c717107 Add utils for Compression assignments 2021-02-25 20:01:44 +00:00
therealyingtong 3778266eeb Add Compression gates 2021-02-25 20:01:44 +00:00
therealyingtong 5951ae6516 Add Compression 2021-02-25 20:01:44 +00:00
therealyingtong f6af03c953 Add MessageSchedule test 2021-02-25 20:01:44 +00:00
therealyingtong 6f703d5cc3 MessageSchedule subregion3 assignments 2021-02-25 20:01:44 +00:00
therealyingtong 931d55a5bb MessageSchedule subregion2 assignments 2021-02-25 20:01:44 +00:00
therealyingtong 65f7707a28 MessageSchedule subregion1 assignments 2021-02-25 20:01:44 +00:00
therealyingtong 88379fa62f Add MessageSchedule gates and assign fixed column cells 2021-02-25 20:01:44 +00:00
therealyingtong fc4f3576a0 Add utils for common MessageSchedule assignments 2021-02-25 20:01:44 +00:00
therealyingtong feedffa2b2 Add MessageSchedule 2021-02-25 20:01:44 +00:00
therealyingtong 570f90e4ee SHA-256 chip that uses a 2^16 lookup table
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-02-25 20:01:44 +00:00
Jack Grigg b4feff8272 Remove ECC gadgets and instructions
Migrated to the orchard crate:
https://github.com/zcash/orchard/pull/22
2021-02-25 18:17:50 +00:00
Jack Grigg bd17c726ac Add a Selector type
This currently just wraps a `Column<Fixed>`, but enables us to start
writing circuits that can later have their selector usage optimised.
2021-02-25 15:28:29 +00:00
str4d 9467a03ae2
Merge pull request #209 from zcash/ecc-gadget-fixedpoints
Store `Loaded` chip state in chip
2021-02-26 04:24:28 +13:00
therealyingtong 4f17322c2d Allow Chip::load to return state that the Layouter will hold
This enables chips that e.g. want to load multiple lookup tables into
the same columns to store state about where each table was layed out.

Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-02-24 23:28:18 +08:00
therealyingtong 6cbf32c2cd Add FixedPoints type and trait to ECC gadget 2021-02-24 23:24:53 +08:00
therealyingtong 4ae21a905d Update tests 2021-02-24 00:21:12 +08: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
therealyingtong 340fb2b6df Move Permutation struct from crate::circuit -> plonk::circuit 2021-02-24 00:17:29 +08:00
ebfull 20bd44f854
Merge pull request #191 from zcash/sha-256-gadget-namespacing
Alter the SHA-256 gadget to require namespacing
2021-02-23 08:49:03 -07:00
ebfull 98896560fd
Merge pull request #203 from zcash/newtype-region-idx
Add circuit::RegionIndex and circuit::RegionStart newtypes
2021-02-23 08:20:19 -07:00
Sean Bowe 12230a49e0
Move CURVE_ID to CurveExt. 2021-02-22 16:30:05 -07:00