Module zkevm_keccak::util
source · [−]Expand description
Util Utility traits, functions used in the crate.
Modules
Ethereum and Evm types used to deserialize responses from web3 / geth.
Scatters a value into a packed word constant
Packs bits into bytes
Structs
Description of which bits (positions) a part contains
Description of how a word is split into parts
Constants
Functions
Calculates a ^ b with a and b field elements
The words that absorb data
Get the degree of the circuit from the KECCAK_DEGREE env variable
Returns how many bits we can process in a single lookup given the range of
values the bit can have and the height of the circuit.
Gets the rotation count in parts
Converts bytes into bits
Pack bits in the range [0,BIT_SIZE[ into a sparse keccak word
Decodes the bits using the position data found in the part info
Pack bits stored in a u64 value into a sparse keccak word
Pack bits in the range [0,BIT_SIZE[ into a sparse keccak word with the
specified bit base
Rotates a word that was split into parts to the right
Rotates bits left
Rotates a word that was split into parts to the left
Returns the size (in bits) of each part size when splitting up a keccak word
in parts of
part_size
Unpack a sparse keccak word into bits in the range [0,BIT_SIZE[