Skip to main content

Crate hekate_sha2

Crate hekate_sha2 

Source
Expand description

SHA-256 compression chiplet for Hekate, the Rust zero-knowledge proof engine.

Sha256Chiplet proves the 64 rounds of FIPS 180-4 §6.2.2 at 1, 2, 4, 8 or 16 rounds per row. CpuSha256Block places the host’s side in the caller’s table: the request and the feed-forward add. pad_message splits a message into padded blocks, and compress computes one compression natively.

  • SHA-256: what the proof states, and padding and chaining

Re-exports§

pub use cpu::CpuSha256Block;
pub use sha256::Sha256Chiplet;
pub use sha256::Sha256Layout;
pub use trace::Sha256Call;

Modules§

cpu
sha256
trace

Constants§

BLOCK_WORDS
IV
FIPS 180-4 §5.3.3.
K
FIPS 180-4 §4.2.2.
ROUNDS
STATE_WORDS

Functions§

add_with_carries
(sum, carries): bit k of carries is the carry out of bit k, bit 31 the overflow.
big_sigma0
big_sigma1
ch
compress
FIPS 180-4 §6.2.2, big-endian words.
digest_bytes
feed_forward
maj
pad_message
FIPS 180-4 §5.1.1, big-endian words.
round
rounds
schedule_word
sha256_words
small_sigma0
small_sigma1