halo2/halo2_gadgets/src/sinsemilla/chip
Jack Grigg 56fc8960c6 halo2_gadgets: Extract a common `DoubleAndAdd` helper struct
Both variable-base scalar mul and Sinsemilla use double-and-add with
incomplete addition on a single row, but they do so in slightly
different ways. Some of these are intentional (needing to look up the
y-coordinate vs constrain it), while others are accidental (different
concrete signs in otherwise-identical constraints that make their ASTs
incompatible).

The new `DoubleAndAdd` helper struct extracts the logic that is common
to both implementations, specifically the helper definitions of `x_r`
and `Y_A`. In a future breaking change, we can refactor both gadgets to
share more of this logic, so we are defining the incomplete addition
logic in fewer places.
2022-05-10 20:04:30 +00:00
..
generator_table.rs halo2_gadgets: Extract a common `DoubleAndAdd` helper struct 2022-05-10 20:04:30 +00:00
hash_to_point.rs halo2_gadgets: Extract a common `DoubleAndAdd` helper struct 2022-05-10 20:04:30 +00:00