Sean Bowe
e93de2c285
Avoid heap allocations within hash_to_curve.
2021-02-22 10:15:30 -07:00
Daira Hopwood
16e5f96f3f
Fix a clippy lint.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-22 16:02:38 +00:00
Daira Hopwood
e408a351d5
Remove a redundant bool::from.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-21 21:43:11 +00:00
Daira Hopwood
7dc21f4727
Repair test vectors and add tests for map_to_curve_simple_swu.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-21 21:01:19 +00:00
Daira Hopwood
24def7ce02
Fix case where the input to map_to_curve_simple_swu is 0, and remove unneeded B_OVER_ZA constants.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-21 21:00:50 +00:00
Daira Hopwood
704a6c3637
Remove unneeded sha3 dependency.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-21 00:45:33 +00:00
Daira Hopwood
642aad68a3
Revert comment changes that are no longer relevant, now that we don't expose the isogenous curves in the API
2021-02-20 21:54:50 +00:00
Daira Hopwood
a14eccc13d
Remove unused hash support for Pasta Fp and Fq.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-20 21:51:32 +00:00
Daira Hopwood
8b8dbbe2bb
Refine type of buf in hash_to_field as suggested by @ebfull.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-19 15:52:11 +00:00
Daira Hopwood
6d8c899e16
Rename map_to_curve to map_to_curve_simple_swu.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-19 15:52:11 +00:00
Daira Hopwood
785ad5375c
Switch from XOF:SHAKE128 to XMD:BLAKE2b.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-19 15:52:11 +00:00
Daira Hopwood
25ea5d07f7
Fix error in doc comment.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-19 15:52:11 +00:00
Daira Hopwood
9aa3327a0a
Fix clippy lints.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-19 15:52:11 +00:00
Sean Bowe
c17cd408f1
Fix point doubling on isogenous curve and add test for isogeny of identity.
2021-02-19 15:52:11 +00:00
Sean Bowe
a757bc4e43
Update hashtocurve benchmark
2021-02-19 15:52:11 +00:00
Sean Bowe
d14d2314a1
Remove isogenous curve from public API.
2021-02-19 15:52:11 +00:00
Sean Bowe
b488355e13
Add example to hash_to_curve doc comment.
2021-02-19 15:52:11 +00:00
Sean Bowe
dc069dff31
Rename hasher to hash_to_curve.
2021-02-19 15:52:11 +00:00
Sean Bowe
f6f008f905
Remove `MINUS_B_OVER_A` constant.
2021-02-19 15:52:11 +00:00
Sean Bowe
c48229ce0f
Remove dependency on byteorder crate
2021-02-19 15:52:11 +00:00
Sean Bowe
783e602e85
Remove `SimplifiedSWUWithDegree3Isogeny` structure because state is no longer necessary.
2021-02-19 15:52:11 +00:00
Sean Bowe
83e2656c3e
Introduce Curve::hasher abstraction.
2021-02-19 15:52:11 +00:00
Sean Bowe
68a7a19d3b
Move hashtocurve module into pasta module.
2021-02-19 15:52:11 +00:00
Sean Bowe
b134a73ef5
Hardcode isogeny constants and constants for hash to curve.
2021-02-19 15:52:11 +00:00
Sean Bowe
5b33ff9cab
Consolidate the hashtocurve module traits into a single structure.
2021-02-19 15:52:11 +00:00
Sean Bowe
e4e8aef5b6
Simplify HashToCurve trait.
2021-02-19 15:52:11 +00:00
Daira Hopwood
db11c47045
Apply suggestions from code review
...
Co-authored-by: ying tong <yingtong@z.cash>
2021-02-19 15:52:11 +00:00
Daira Hopwood
fa3afc29bb
Add an implementation of simplified SWU hash-to-curve.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-19 15:52:11 +00:00
str4d
c9b606212e
Merge pull request #196 from daira/book-improvements
...
Book improvements
2021-02-20 04:19:40 +13:00
str4d
e7562a471a
Merge pull request #200 from zcash/fix-bench-plonk
...
Update bench::plonk to work with multi-proof prover
2021-02-19 23:18:09 +13:00
therealyingtong
e98dba8521
Update bench::plonk to work with multi-proof prover
2021-02-19 15:46:32 +08:00
Daira Hopwood
4d61ad8ff5
Need a borrow here.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-18 23:50:19 +00:00
ebfull
fb6111df5b
Merge pull request #176 from zcash/general-lookup
...
Generalise lookup argument to work over expressions
2021-02-18 16:32:48 -07:00
Daira Hopwood
e2f20770bb
Edits from pairing with @str4d. This fixes an error in Z_P for the equality constraint argument,
...
and also errors in the circuit commitments section.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-18 23:27:42 +00:00
Sean Bowe
0316019a94
Add test for polynomial rotation in Lagrange form.
2021-02-18 16:25:00 -07:00
Sean Bowe
81af4e43d1
Update pinned verification key to account for circuit changes
2021-02-18 15:48:20 -07:00
therealyingtong
d29246b49b
Rename const_* -> constant_*
2021-02-18 15:41:36 -07:00
therealyingtong
4bf46fc349
Add Expression::Const variant
2021-02-18 15:41:36 -07:00
therealyingtong
6a7f869f66
Clippy fixes
2021-02-18 15:41:36 -07:00
therealyingtong
df2d818891
Account for Rotations of LagrangeCoeff values
2021-02-18 15:41:36 -07:00
therealyingtong
8e56b415fb
Rename column -> expression for lookups
2021-02-18 15:41:36 -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
ebfull
9401ceb68d
Merge pull request #173 from zcash/vk-transcript
...
Hash verification key into transcript
2021-02-18 13:28:57 -07:00
str4d
1e73f97a24
Merge pull request #197 from zcash/bump-deps
...
Bump dependencies
2021-02-19 09:20:35 +13: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
8060a12ea4
Fix minor nit (match ergonomics)
2021-02-17 15:39:46 -07:00
Sean Bowe
2b1c319ba0
Use pretty-printing in test of verification key pinning.
2021-02-17 15:38:43 -07:00