Module utils

Source
Expand description

A collection of utility functions helpful in defining AIRs.

Functionsยง

add2
Verify that a = b + c mod 2^32
add3
Verify that a = b + c + d mod 2^32
checked_andn
Compute andnot on a pair of boolean field elements.
checked_xor
Compute xor on a list of boolean field elements.
pack_bits_le
Pack a collection of bits into a number.
u32_to_bits_le
Convert a 32-bit integer into an array of 32 0 or 1 field elements.
u64_to_16_bit_limbs
Convert a 64-bit integer into an array of four field elements representing the 16 bit limb decomposition.
u64_to_bits_le
Convert a 64-bit integer into an array of 64 0 or 1 field elements.
xor_32_shift
Verify that a = (b ^ (c << shift))