Cryptography
Lamport-Keccak256, the key chain, and the path to ML-DSA and SLH-DSA.
Lamport-Keccak256
A Lamport key has 512 secrets: two for each of the 256 bits of the digest. The public key is the Keccak-256 hash of each secret, and the vault stores only the hash of the full public key. A signature reveals one secret per bit and supplies the hash of the other, which lets the verifier rebuild the public key and compare its hash with the commitment.
- Public key: 16,384 bytes off-chain; 32 bytes onchain.
- Signature: 16,384 bytes.
- Verification: about 85,000 gas of execution, measured with Foundry, plus calldata.
- Assumption: preimage resistance of Keccak-256 only.
One-time keys
Signing two different digests with the same Lamport key reveals enough secrets to forge others. The vault enforces single use: each authorization marks the current commitment as consumed, requires a different next commitment, and refuses any commitment it has seen consumed before.
Key chain derivation
sk_k[i][b] = keccak256(seed || uint32(k) || uint16(i) || uint8(b))
pk_k[i][b] = keccak256(sk_k[i][b])
commitment_k = keccak256(pk_k[0][0] || pk_k[0][1] || … || pk_k[255][1])One 32-byte seed therefore backs an unbounded chain of keys. Key k signs the authorization whose nonce is k and commits to key k+1.
ML-DSA and SLH-DSA
The app generates ML-DSA-65 (FIPS 204) and SLH-DSA-SHA2-128s (FIPS 205) keys with @noble/post-quantum and runs a sign-and-verify self-test in the browser. That library is self-audited but not independently audited. Quoriel has no onchain verifier for these schemes yet. Public Solidity verifiers exist for ML-DSA-44, at roughly 1.2 million to 8.1 million gas per verification according to their authors, who label them experimental. An adapter implementing IPQVerifier is the planned integration path.