Jack Grigg
d40ed36d50
Move Pasta implementations into root
2021-03-03 21:59:08 +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
12230a49e0
Move CURVE_ID to CurveExt.
2021-02-22 16:30:05 -07:00
Sean Bowe
1078f854e3
Remove BLAKE2B_PERSONALIZATION constant.
2021-02-22 15:53:22 -07:00
Sean Bowe
df8dcce042
Add CurveExt and AffineExt associated types to project Group trait implementations.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-02-22 15:47:57 -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
Jack Grigg
55fb581f17
Define hash-to-curve over Curve, not CurveAffine
...
This removes an unnecessary layer of indirection from the type system,
and ensures that these APIs depend on the halo2-specific trait with the
extensions we require.
2021-02-22 20:12:10 +00:00
Jack Grigg
082d66d6e7
pasta: Reorganize the curve macro
...
This will make the migration to group easier to review.
2021-02-22 20:05:12 +00:00
Jack Grigg
7037d55320
Rename Curve and CurveAffine properties to match group traits
2021-02-22 20:05:08 +00:00
Jack Grigg
81a7936d99
pasta: Split halo2-specific curve-specific logic into a separate macro
2021-02-22 18:53:27 +00:00
Sean Bowe
e93de2c285
Avoid heap allocations within hash_to_curve.
2021-02-22 10:15:30 -07: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
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
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
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
d14d2314a1
Remove isogenous curve from public API.
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
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
b134a73ef5
Hardcode isogeny constants and constants for hash to curve.
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
Sean Bowe
dfa7d96fa9
Refactor verification key hashing logic to use Display impls.
2021-02-17 15:19:34 -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
95e41fcfcf
Rename curves to Pallas/Vesta (Pasta).
2020-12-03 13:47:47 -07:00