Hash functions · Hardness assumption

Hash function security (preimage, second-preimage, PRF)

SHA-2 and SHA-3 cannot be inverted, and no second input with the same output as a given input can be found.

Statement

For a hash function H with n-bit output:

  • Preimage resistance. Given y, it is infeasible to find x with H(x) = y.
  • Second-preimage resistance. Given x, it is infeasible to find x′ ≠ x with H(x′) = H(x). Hash-based signatures require the multi-target form.
  • Pseudorandomness. Keyed with a secret, H is indistinguishable from a random function.

Collision resistance is not required. SLH-DSA and XMSS are constructed so that a collision chosen by the attacker does not yield a forgery.

Use in schemes

  • SLH-DSA. Security reduces to multi-target second-preimage-type properties of a tweakable hash, PRF security, and interleaved target subset resilience of the message hash.
  • XMSS. Proof in the standard model from second-preimage resistance and PRF security.
  • LMS. Proof in the random oracle model.
  • Every other scheme in this tracker also uses a hash function, in its transform or for message hashing. Hash-based signatures require no further assumption.

Evidence of hardness

SHA-2 has been public since 2001 and Keccak (SHA-3) since 2008. No attack approaches the preimage resistance of either.

Best known attacks

  • Generic search. About 2n evaluations for a preimage or second preimage.
  • Quantum. Grover's algorithm requires about 2n/2 sequential evaluations and parallelizes poorly. Hash outputs of 128, 192 and 256 bits correspond to NIST categories 1, 3 and 5.

Limitations

  • Instantiation. In 2022 the category 5 SPHINCS+ parameter sets using SHA-256 were shown to fall about 40 bits short of their claim, owing to SHA-256's 256-bit internal state. FIPS 205 uses SHA-512 at categories 3 and 5.
  • Instantiation, 2026. Two preprints apply herding to SHA-256's chaining state to obtain multi-target second-preimage attacks on the message hashing of LMS and XMSS. With 264 signatures the estimated cost for SHA-256 parameter sets falls from 2256 to about 2160. The attacks are infeasible and unreviewed. SHAKE256 parameter sets are not affected.
  • State. LMS and XMSS are secure only if each one-time key is used once. A restored backup, a cloned machine or a crash between signing and state update is a complete break.
  • Faults. A single induced fault during signing can cause reuse of a one-time key and permit forgery. Demonstrated with Rowhammer against SLH-DSA in OpenSSL and by laser against XMSS verification on a microcontroller.

Other uses

Hash-based proof systems (STARKs and other FRI-based arguments) rest on the same family of assumptions, including collision resistance, together with the random oracle model. Pairing-based proof systems rest on discrete-logarithm assumptions and are not post-quantum.

Record

2 entriesFeed →