
PQ spending for Stealth Address Protocol
Third in a series on post-quantum upgrades to the Stealth Address Protocol (ERC-5564/ERC-6538), this ethresear.ch post proposes a new schemeId=6 that replaces ECDH with ML-KEM for quantum-safe payment discovery and replaces ECDSA with either a lattice-based signature (SPIRIT, an ML-DSA/Dilithium variant) or a novel construction called HSAP that uses ML-KEM key delivery plus a ZK proof over hash-preimages for spending authorization. It works through the exact key-generation/derivation math for both schemes, discusses on-chain verification costs (citing ETHDILITHIUM benchmarks and draft EIP-8051's ~4500-gas ML-DSA-44 precompile), and sketches how the extended ERC-5564 announcer/registry interface and smart-account spending path would look under quantum attack assumptions.
What it carries beyond the summary
The summary names the two spending constructions and the ML-DSA-44 precompile cost, but omits the numbers and constraints that decide whether either is deployable today. Those are the substance.
HSAP cost and the aggregation path
HSAP replaces signing with a ZK proof of P = H_pay(H_key(k), r) ∧ T = H_auth(k, r, m). The page states this costs ~7M gas per spend at ~300,000 R1CS constraints, extrapolated from a WHIR-EVM-Verifier benchmark — a full PQ zk-SNARK/STARK verification on every spend. That is the reason to treat HSAP as not-yet-practical.
The page also points at what changes that: EIP-8288 (Frame Type for PQ Sig and STARK Aggregation) proposes recursive STARK-based aggregation via an EIP-8141 frame mode. If leanStark is used, aggregation amortizes verification down to an additional ~30K gas validation fee. So the roadmap is 7M-gas-per-spend now → ~30K amortized if the aggregation EIPs land.
The author flags that the zk construction resembles zkWormhole (insecure if P/K is an Ethereum address), but argues it doesn't apply here: funds go to a smart-account the sender legitimately funds, not a disconnected commitment.
SPIRIT's structural constraints
SPIRIT (from Post Quantum Fuzzy Stealth Signatures and Applications) is the ML-DSA/Dilithium variant. The page lists concrete deployment costs the summary skips:
- requires a globally shared matrix A (a fixed seed baked into the ERC) for unlinkability
- the master
tmust stay uncompressed - the coefficient bound doubles from η to 2η, giving β' = 2τη; original SPIRIT also doubles γ₁ and γ₂ to control signing retries
- keeping standard mask widths therefore demands tighter signer rejection and a separate security analysis
HSAP construction specifics
Hashes are SHA-256 with distinct one-byte domain tags (H_key, H_pay, H_auth); KDF is HKDF-SHA256, 32-byte output, bound to a deployment domain D (scheme, chain, factory). Payment deploys a funded smart account at P = CREATE2Addr(F, C, I(C)) where C = H_pay(K, r); the account stores the full 256-bit C, a spend nonce, and a fixed verifier, and deployment failure reverts the payment.
Caveats
The author explicitly warns the gas figures "are likely to change" and asks readers to weigh the mechanism over the cost. Two acknowledged limits persist across all schemeId=6 variants: the sender and scanner both know r, so the construction must prevent spending from that knowledge alone; and sender-to-account plus subsequent spending links remain public — quantum-safe discovery does not buy sender anonymity.
Organisations named here
- Dilithium
- EIP-8051
- ERC-6538
Technologies named here
- ML-KEM
- ERC-5564
- ML-DSA
- ERC6538Registry
- SPIRIT
- ERC5564Announcer
- HSAP
- ECDSA
- ECDH
- PQ zk-SNARK/STARK
- Dual Key Stealth Address Protocol
- ETHDILITHIUM
- Draft EIP-8051
- EIP-8288
- EIP-8141
- WHIR-EVM-Verifier
- HKDF-SHA256
- SHA-256
- CREATE2
- Ethereum
Techniques named here
- Quantum key recovery from on-chain stealth address data
- Stealth Address derivation
- ML-DSA signing/verification
- SPIRIT stealth key derivation
- HSAP hash-preimage/ZK spending
- Stealth payment scanning/discovery via KEM decapsulation
Threat actors named here
- Quantum attacker
Related in Blockchain

THORChain Exploit Report #2 — GG20 root-cause disclosure

Black Thursday revisited: MakerDAO keeper exploited for $500K
.jpg)