Skip to main content

salt_kernel

Function salt_kernel 

Source
pub fn salt_kernel(pk_nonce: [b8; 16], index: b7, depth: b2) -> [b8; 16]
Expand description

Add index + 68·depth to the nonce’s low 32 bits (no carry into byte 4).

Why salt: every hash call in the scheme gets a distinct input, so an attacker cannot attack all chains at once. The value index + 68·depth is unique for each of the 68 × 3 hash calls of a key.

Inputs: the 16-byte pk_nonce, the chain index (7 bits) and the depth (2 bits, 0..=2). Output: the salted nonce. Combinational (a 32-bit adder).