Module plonk_gadgets::range[][src]

Expand description

Collection of range-checking gadgets.

Note

If you just need to do a normal rangeproof with boundaries being powers of two, we recomend to use the function builtin plonk for it: composer.range_gate() since it will introduce less constraints to your CS.

Functions

Returns a 0 or a 1, if the witness is greater than the maximum bound x < b which implies that b - x - 1 >= 0 Note that since the maximum bound is public knowledge the num_bits can be computed

Returns a 1 if min_range <= x < max_range and zero otherwise