Module incr

Source
Expand description

This module provides gadgets for performing indexed lookup operations for incrementing 8-bit values with carry, using lookup tables. It includes types and functions for constructing, populating, and testing increment lookup tables and their associated circuits.

Structs§

Incr
Represents an increment operation with carry in a lookup table.
IncrIndexedLookup
Internal struct for indexed lookup logic for increment operations.
IncrLooker
Helper struct for producing increment lookups from input/carry pairs.
IncrLookup
Represents the increment lookup table, supporting filling and permutation checks.

Functions§

carry_in_circuit
Returns a circuit that describes the carry-in for the i_th bit of incrementing an 8-bit number by a carry-in bit. The circuit is a product of the lower bits.
incr_circuit
Returns a circuit that describes the increment operation for an 8-bit addition. The circuit encodes input, output, carry-in, and carry-out into a single value.
merge_incr_cols
Merges the input, output, carry-in, and carry-out columns into a single B32 column for lookup.
merge_incr_vals
Merges the input, output, carry-in, and carry-out values into a single u32 for lookup.