Skip to main content

Module hash_feeder

Module hash_feeder 

Source
Expand description

Streaming SHA-512 input assembly and the 4 KiB message replay cache.

HashFeederEngine combines an internal crate::sha512::Sha512Engine with prefix selection, 64-bit message-word framing, logical/external byte counters, and signing-pass replay requests.

Structs§

HashFeederEngine
Message-to-SHA adapter with one 4096-byte synchronous BRAM cache.
HashFeederIn
Hash-feeder command and external message input.
HashFeederOut
Hash-feeder response, replay request, digest, and traffic counters.
HashFeederRegs
Registered word-unpacking, cache-address, framing, and counter state.

Enums§

HashFeederState
External, replay, SHA-wait, and completion states.

Constants§

HASH_SOURCE_CACHE_TAIL
Replay the 4 KiB cache, then request an external tail at offset 4096.
HASH_SOURCE_EXTERNAL
Read the complete message externally without caching it.
HASH_SOURCE_EXTERNAL_CACHE
Read an external message and cache its first 4 KiB.
HASH_SOURCE_INTERNAL
Hash only the internal prefix; the logical message length must be zero.

Functions§

hash_feeder_engine_kernel
Next-state/output kernel for HashFeederEngine.