darkfi::zk::gadget

Module less_than

Source
Expand description

Field-native less than comparison gadget with a lookup table Less-Than Gadget

Given two values: - a, a NUM_OF_BITS-length value and - b, an arbitrary field element, this gadget constrains them in the following way: - in strict mode, a is constrained to be strictly less than b; - else, a is constrained to be less than or equal to b.

Structsยง