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
7037d55320
Rename Curve and CurveAffine properties to match group traits
2021-02-22 20:05:08 +00:00
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
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
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
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
68a7a19d3b
Move hashtocurve module into pasta module.
2021-02-19 15:52:11 +00:00