Attack Lab

Try to break it

Signature-level attacks are thrown at every verifier. Replay and domain-separation attacks are simulated against the deployed RivetRegistry on Diana with real ML-DSA-87 signatures; the contract's own revert reason is the verdict. An accepted attack is marked critical.
Signature attacks · every verifier
  • Message tampering — bit flip, appended byte, signature moved to another message
  • Signature tampering — bit flips in the challenge c̃, the response z and the hint h
  • Malformed signatures — all-zero, truncated, over-long
  • Key attacks — wrong key, flipped key bit, truncated key, key and signature swapped
  • Mode confusion — non-empty FIPS 204 context; HashML-DSA signature presented as pure ML-DSA
  • Empty inputs — empty key, signature and message
Replay & domain separation · RivetRegistry
Wrong chain ID — signed for EVM chain 9801 (mainnet), submitted on Diana (9800)InvalidSignature
Wrong contract — signed for a different registry addressInvalidSignature
Wrong action — a revoke authorisation presented as a publishInvalidSignature
Payload from another action — a signature over a revoke payload used to publishInvalidSignature
Result tampering — pass/fail counts edited after signingInvalidSignature
Spent nonce — replay a signature whose nonce was already consumedBadNonce
Future nonce — pre-signed request with a later nonceBadNonce
Expired deadline — signature past its deadlineExpired
Each signature attack also runs a valid control, so a verifier that rejects everything can't pass. Replay cases need the deployed registry and the attester's key on this server; otherwise they are reported as skipped.
Craft an attack by hand

A fresh ML-DSA-87 key is generated for each request. The signature goes to all three verifiers, including a live eth_call to Diana's precompile.

·
Signer
One bit inside the response vector z (byte 2000) flips.