Module not

Source
Expand description

This module includes the definition of the NOT gadget and the witness code generation, for both the implementation running with Xor16 gates and the one with Generic gates. Note that this module does not include a Not gate type.

Functionsยง

extend_not_witness_checked_length
Extend a NOT witness for less than 255 bits (native field) Input: full witness, first input and optional bit length If bits is not provided, the negation is performed using the length of the input in bits. If bits is provided, the negation takes the maximum length between bits and that of input. Warning:
extend_not_witness_unchecked_length
Extends negation witnesses from generic gate, assuming the input witness already contains public input rows holding the 2^bits-1 value. Input: a vector of words to be negated, and the number of bits (all the same) Returns error if the bits length is too small for the inputs Warning: Set public input of bits in public generic gate Note: witness[0][pub] = 2^bits - 1