Module darkfi::zk::gadget::less_than

source ·
Expand description

Field-native less than comparison gadget with a lookup table 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.