halo2 icon indicating copy to clipboard operation
halo2 copied to clipboard

Add `Sha256Digest::constrain_equal(&self, layouter, other: &Self)` method

Open str4d opened this issue 2 years ago • 0 comments

The Sha256Digest gadget type is opaque, but users of the Sha256 gadget that produces it will need to be able to use it in the rest if their circuit. One required API is to be able to constrain that two digests are equal.

This should not require any new instructions, as the AssignedCell<Self::BlockWord> type should be sufficient to enable us to use the layouter's equality constraint APIs.

str4d avatar Mar 15 '22 15:03 str4d