Works best when
- The credential holder must produce one unlinkable per-event value across a bounded event horizon (anonymous ballots, periodic claim issuance)
- The host application uses a ZK-friendly hash (Poseidon, Rescue) so the tree is verifiable inside a SNARK
- Post-seizure unlinkability of past events is a goal and the device can honour overwrite-in-place
Avoid when
- The event horizon is unbounded or unknown (no fixed `N` to pre-commit)
- The signer can rotate identities (fresh credential per event) instead of evolving a single chain
- Storage erase is best-effort (copy-on-write filesystems, SSDs without [TRIM](https://en.wikipedia.org/wiki/Trim_(computing))) and forensic recovery is in the threat model
I2I vs I2U — context differences
Institution to institution
I2IInstitutional signers (HSM-held credentials, custodian keys) commit a per-credential chain root inside an attribute commitment; the audit interface is the chain root, not the per-slot values.
Institution to end user
I2UEnd-user devices ratchet the chain past each used slot and erase the consumed seed, so a future device seizure does not retroactively link past anonymous events to the device.
Post-quantum exposure
Risk · medium- Vector
- Hash-based PRG and Merkle tree are Grover-resistant. Pairing-based zero-knowledge proof systems over the tree (KZG-PLONK, Groth16) are CRQC-broken; HNDL exposure on retained proofs follows the proof system.
- Mitigation
- STARK or hash-based SNARK over the same tree construction preserves forward secrecy under CRQC.
Components
- Seed-evolving PRG: a one-way pseudorandom generator instantiated by a ZK-friendly sponge. Each step produces a per-slot value
v_iand the next seeds_{i+1}from a single permutation call. - Merkle commitment: a depth-
dPoseidon tree over(v_0, ..., v_{N-1})with rootchain_rootpublished into the credential's attribute commitment. Depth-24 (N = 2^24) is the reference choice for a per-credential lifetime budget of ~16M events. - Log-space Merkle traversal: Szydlo's tail-stack structure holds the right-sibling hashes along the path to the current leaf and updates in
2 log_2(N)hashes per advance withO(log N)storage. - Runtime state:
(s_curr, t, traversal, chain_root).s_curris the head seed andtis the next slot the chain will produce; the traversal yields auth paths without recomputing past subtrees. - Erase-capable storage: overwrite-in-place semantics for
s_currat each ratchet step. NIST SP 800-88 purge procedures apply per media class.
Protocol
- signer Sample
s_0from a CSPRNG and derive the chain(v_i, s_{i+1}) = PRG(s_i)fori in [0, N), building the depth-dMerkle rootchain_root. - signer Bind
chain_rootinto the credential commitment so the application's SNARK can verify credential membership and chain-root binding in one circuit. Initialise the runtime state (head seed, chain index, traversal state) and erase intermediate seeds and tree nodes. - signer On application event at slot
k, advance the chain tok, computev_kand the auth path, and consumev_kas a private input to the application SNARK. - signer After the event is recorded with finality, ratchet forward and overwrite the head seed in place.
- verifier In-circuit, recompute
v_kfrom the witnessed seed, verify the auth path against the credential-boundchain_root, and consumev_kin the application's nullifier or scope-tag derivation.
Guarantees & threat model
- Per-slot forward secrecy: an adversary holding
s_currat audit timeT_audit(with chain indext) recoversv_{k'}ors_{k'}fork' < twith advantage at most2N * eps_PRG, whereeps_PRGbounds the PRG-distinguishing advantage of the underlying length-expanding generator andNis the chain length. The reduction is Bellare-Yee Theorem 2.3 applied to the seed chain. - Slot non-reuse: an honest signer's chain index
tis monotone; revisiting a past slot requires the consumed seed, which the ratchet step has erased. Application-layer per-event nullifier sets remain necessary; this pattern enforces the signer-side erasure they depend on under seizure. - In-circuit verifiability:
chain_rootis a single field element and the auth path isdPoseidon hashes; the per-slot value comes from one PRG call. Total in-circuit cost isd + 1Poseidon permutations, independent ofNand chain advance. - Threat model: post-event device seizure and any non-signer party. Out of scope: live (pre-event) device compromise that captures
s_kbefore erase; non-erasing storage that retains overwritten bytes; signer-side backups ofs_currors_0(any backup constitutes a forward-secrecy capability against the future).
Trade-offs
- Fixed event horizon.
Nis committed at enrollment. Exhausting the chain requires re-enrollment with a freshchain_rootbound through a new credential commitment. Choosedagainst the credential lifetime and event cadence; depth-24 yields ~16M events at one-per-slot. - Off-circuit advance cost. A late signer with
tfar below the target slot performs up toslot - tPRG calls before proving. Pre-advancing in background amortises latency. - Backup defeats forward secrecy. A holder of any past
s_ksnapshot recomputes the chain forward froms_kuntil the signer re-enrols. Backup ofs_0defeats forward secrecy entirely; backup ofs_currdefeats it relative to the snapshot. - Storage semantics. Forward secrecy assumes ideal overwrite-in-place. Copy-on-write filesystems and SSDs without TRIM leave recoverable byte traces.
- Slot vs. event coupling. One
v_kper slot. Multiple events per slot reuse the value and collide the nullifier; the application enforces one-event-per-slot or extends the PRG output domain.
Example
A standards consortium issues each accredited member a credential committing a depth-24 Poseidon tree over N = 2^24 per-slot pseudorandom values, with the chain root bound through a credential attribute slot. The consortium's voting contract assigns each ballot an integer slot. To vote on ballot X at slot k, the member device advances the chain to k, opens the auth path inside a SNARK that verifies credential membership and the eligibility predicate, emits nullifier = Poseidon(domain, v_k, ballot_id), and ratchets past s_k on finality. A future adversary seizing the device cannot recompute past v_{k'} values; the ballot record retains the nullifier, whose preimage is hidden by PRG security.
See also
Open-source implementations
- eprint.iacr.org paper
Bellare and Yee, Forward-Security in Private-Key Cryptography (length-expanding PRG construction; Theorem 2.3 gives the forward-secrecy reduction this pattern instantiates)
- iacr.org paper
Szydlo, Merkle Tree Traversal in Log Space and Time (log-space tail-stack traversal, 2 log_2(N) hashes per advance and O(log N) storage)