Crate openvm_sha2_air

Crate openvm_sha2_air 

Source

Structs§

Sha2BlockHasherFillerHelper
A helper struct for the SHA-2 trace generation. Also, separates the inner AIR from the trace generation.
Sha2BlockHasherSubAir
Expects the message to be padded to a multiple of C::BLOCK_WORDS * C::WORD_BITS bits
Sha2DigestCols
Sha2DigestColsRef
Sha2DigestColsRefMut
Sha2FlagsCols
Sha2FlagsColsRef
Sha2FlagsColsRefMut
Sha2MessageHelperCols
These are the columns that are used to help with the message schedule additions Note: these need to be correctly assigned for every row even on padding rows
Sha2MessageHelperColsRef
Sha2MessageHelperColsRefMut
Sha2MessageScheduleCols
Sha2MessageScheduleColsRef
Sha2MessageScheduleColsRefMut
Sha2RoundCols
In each SHA block:
Sha2RoundColsRef
Sha2RoundColsRefMut
Sha2WorkVarsCols
Sha2WorkVarsColsRef
Sha2WorkVarsColsRefMut
Sha256Config
Sha384Config
Sha512Config

Enums§

Sha2Variant

Constants§

SHA256_H
SHA256 initial hash values
SHA256_K
SHA256 constant K’s
SHA384_H
SHA384 initial hash values
SHA384_K
SHA384 constant K’s
SHA512_H
SHA512 initial hash values
SHA512_K
SHA512 constant K’s

Traits§

RotateRight
Sha2BlockHasherSubairConfig
WrappingAdd

Functions§

be_limbs_into_word
Convert a list of limbs in big endian into a Word
big_sig0
Big sigma_0 function from the SHA spec
big_sig1
Big sigma_1 function from the SHA spec
ch
Choose function from the SHA spec
compose
Composes a list of limb values into a single field element
constraint_word_addition
Constrain the addition of C::WORD_BITS bit words in 16-bit limbs It takes in the terms some in bits some in 16-bit limbs, the expected sum in bits and the carries
get_flag_pt_array
Wrapper of get_flag_pt to get the flag pointer as an array
get_random_message
Generate a random message of a given length
le_limbs_into_word
Convert a list of limbs in little endian into a Word
limbs_into_u32
Convert a list of limbs in little endian into a u32
maj
Majority function from the SHA spec
set_arrayview_from_u8_slice
set_arrayview_from_u32_slice
small_sig0
Small sigma_0 function from the SHA spec
small_sig1
Small sigma_1 function from the SHA spec
u32_into_bits
Convert a u32 into a list of 1-bit limbs in little endian
word_into_bits
Convert a word into a list of 1-bit limbs in little endian
word_into_limbs
Convert a word into a list of limbs in little endian
word_into_u8_limbs
Convert a word into a list of 8-bit limbs in little endian
word_into_u16_limbs
Convert a word into a list of 16-bit limbs in little endian