ERC-7524 PLUME signature for wallets (PLUME Signature in Wallets)
Draft · Signatures & auth · created 2023-09-24
Defines a new signature scheme that lets an Ethereum keypair produce a value that comes out the same every time (a nullifier). It hides who you are while proving that one account acted only once, enabling applications like zk voting.
Why it is needed
Zero-knowledge proofs (zk-SNARKs) let you prove you belong to a certain set without revealing your identity. But applications like voting or airdrops, where each person should participate only once, need a way to stop the same account from participating twice. Ethereum's ECDSA signatures can produce different results for the same message, and anyone wanting to verify deterministic generation would need the secret key itself. Copying the secret key into a proving program is risky, and hardware wallets sometimes never expose the secret key at all. Running an entire proof system inside a secure chip is also impractical. So a new signature scheme is needed that produces one unique value per account without ever exporting the secret key, while letting anyone verify that the value was constructed correctly using only the public key.
In depth
Core construction: the hash(m, pk)^sk nullifier
Built on top of the Chaum-Pedersen signature scheme. Given a 32-byte message m and a keypair (sk, pk), a random r is drawn, h = htc([m, sec1(pk)]) is computed, and then z = h^r, the nullifier nul = h^sk, c = sha256([g, pk, h, nul, g^r, z]), and s = r + sk*c are computed. The signature is (z, s, g^r, c, nul). The key idea is computing h from the hash of the message and pk rather than the message and r, which is what makes the nullifier deterministic. The signature contains both a deterministic part (the nullifier) and a non-deterministic part.
Curve and hash parameters
Uses the secp256k1 curve (as defined in SEC 2 v2), where g is the generator point, p is the order of the curve, and F_p is the finite field of order p. Public key encoding uses point compression from SEC 1 v2 to produce a 33-byte string sec1(pk). Hashing uses SHA256 from IETF RFC 4634, with the digest interpreted as a big-endian value in the secp256k1 scalar field. Hashing to the curve uses secp256k1_XMD:SHA-256_SSWU_RO_ from IETF RFC 9380 (Appendix J.8.1), with htc input always 65 bytes long.
Non-ZK verification procedure (non-normative)
Verification for the case where the verifier knows g, m, the signer's pk, and the signature (z, s, g^r, c, nul). Compute h = htc([m, sec1(pk)]) and c' = sha256([g, pk, h, nul, g^r, z]), then accept if all three hold: g^s * pk^(-c) = g^r, h^s * nul^(-c) = z, and c = c'. This procedure is not a normative part of the proposal; it is explanatory, to give an intuitive understanding of the ZK verification.
Version 1: Verifier Optimized
When the verifier must not know the signer's pk, verification is done via a circuit in a non-interactive zero-knowledge proof system such as Groth16. The public inputs are nul and c; the private inputs are pk, r, s, z, g^r, and hash[m, g^sk], which is included to reduce the number of constraints. The circuit recomputes h, pk, and c', and enforces three constraints: g^s * pk^(-c) = g^r, h^s * nul^(-c) = z, and c = c'.
Version 2: Prover Optimized
When generating zk proofs in the browser, SHA-256 hashing is particularly expensive, and computing c is a bottleneck for proving time. A modification proposed by the Poseidon team moves the computation of c outside the circuit to the verifier side. z and g^r become public signals, and c is redefined as c = sha256([nul, g^r, z]). The circuit checks only two constraints (g^s * pk^(-c) = g^r, h^s * nul^(-c) = z), and the verifier additionally checks c == hash(nul, g^r, h^r). Because SHA-256 is a native Ethereum precompile, smart contract verifiers can also handle it efficiently. A more efficient Version 3 may emerge in the future, for example by removing the indifferentiability requirement of hash_to_curve.
Design rationale: four required properties
First, it must be non-interactive. With no enrollment step, the entire eligible user base can be the anonymous set from the start, which resists Sybil attacks and spam and avoids the limitations of interactive schemes like tornado.cash, which require each user to update a Merkle tree. Second, it must be unique per account to prevent double-spending or double-claiming. Third, it needs determinism so the same account always produces the same value over time. Fourth, it must be verifiable using only the public key, without the secret key. The final design builds on BLS signatures, Chaum-Pedersen EQDL, and Goh-Jarecki's EDL paper, simplified as much as possible to work on secp256k1.
Hardware wallet compatibility
Signers can use their existing secp256k1 keypair as is, such as the key in a hardware wallet that supports Ethereum accounts. If the enclave has a generator-point multiplication API (for example, Ledger provides one), a signature can be generated without ever exporting the secret key outside the secure enclave. Since SNARK proof generation happens outside the enclave, the wallet does not need to standardize an entire proof system internally.
Current status: Draft
This proposal is still in Draft status. Its content may change, and the specifics or versioning of the specification may be revised.
Things to watch out for
- Auditing and formal verification are not yet complete: A formal proof of the cryptography of this algorithm appears in the PLUME paper, and the theory has been published. The implementation has undergone one internal audit but has not yet completed end-to-end formal verification or an external audit. Empirically, it behaves as specified.
- Anonymity breaks once quantum computers arrive: In the distant future, if a quantum computer breaks ECDSA, someone could derive the secret keys of the entire anonymous set, compute all the nullifiers, and check which one matches. This issue exists in every ECDSA-based deterministic nullifier, because the secret key is the only source of randomness that preserves anonymity in a deterministic protocol. However, estimates of the qubits needed to solve discrete log via quantum annealing suggest this is still decades away from becoming a real threat.
- Long-term secrecy requires considering an interactive approach: To protect data secrecy even in a post-quantum era, one of the proposal's properties, likely non-interactivity, must be given up. One option is an enrollment step where each account pre-registers a Semaphore commitment via a public signature, but this shrinks the anonymous set and makes applications like zk airdrops much harder. For short-term secrets like DAO voting, the nullifier in this document is suitable, but whistleblowers or journalists should consider a Semaphore-based approach.