Skip to main content

chain_step_digest_kernel

Function chain_step_digest_kernel 

Source
pub fn chain_step_digest_kernel(
    state: [b8; 64],
    feed_forward: [b8; 18],
) -> [b8; 18]
Expand description

Final feed-forward: the 18 kept digest bytes of a finished state.

Inputs: the 64-byte state after the last stage and the 18 saved input bytes. Output: the next 18-byte node, state[DIGEST_BYTES[i]] ⊕ feed[i]. Combinational: one XOR per output bit (18 × 8). Because only 18 bytes are read, the S-boxes that feed only the other 46 bytes have no load and are deleted.