Skip to main content

Module xor

Module xor 

Source
Expand description

This module includes the definition of the XOR gadget for 64, 32, and 16 bits, the definition of the constraints of the Xor16 circuit gate, and the code for witness generation for the XOR gadget.

Structsยง

Xor16

Functionsยง

create_xor_witness
Create a Xor for up to the native length starting at row 0 Input: first input and second input, bits length, current row Panics if the desired bits is smaller than the inputs length
extend_xor_witness
Extends the Xor rows to the full witness Panics if the words are larger than the desired bits
init_xor ๐Ÿ”’
layout ๐Ÿ”’
lookup_table
Get the xor lookup table
num_xors
Returns the number of XOR rows needed for inputs of usize bits
xor_row ๐Ÿ”’
zero_row ๐Ÿ”’