EIPs Explained

ERC-7524 · Draft · ERC · 2023-09-24

ERC-7524: PLUME Signature in Wallets

A draft signature scheme for existing Ethereum keys that outputs a deterministic, verifiable nullifier, letting a wallet prove 'one action per account' in zero knowledge without revealing which account.

What problem does it solve?

Many privacy apps need anonymous uniqueness: each eligible account may vote once, claim an airdrop once, or post under one consistent pseudonym, but nobody should learn which account it was. The usual tool is a nullifier, a value that is the same every time a given key acts, yet reveals nothing about the key.

Ordinary ECDSA signatures cannot serve as nullifiers. They contain randomness, so the same key can produce many different signatures, and proving inside a ZK-SNARK that a value was derived deterministically from a key would require feeding the private key into the prover. Hardware wallets will not export keys, and users should not paste them anywhere.

PLUME (Pseudonymously Linked Unique Message Entity) proposes a new signature that wallets compute with existing secp256k1 keys. Part of its output is deterministic and can be used as the nullifier, while the rest lets a ZK circuit check it was computed correctly without the secret key.

How it works

Given a 32-byte message m and keypair (sk, pk = g^sk) (exponent notation means elliptic-curve scalar multiplication):

  1. Hash the message and the public key to a curve point: h = hash_to_curve(m, sec1(pk)) (RFC 9380, secp256k1 SSWU).
  2. The nullifier is nul = h^sk. Because h depends only on m and pk, the same account and message always give the same nul.
  3. A Chaum-Pedersen style proof shows that nul uses the same secret as pk: pick random r, compute z = h^r, c = sha256(g, pk, h, nul, g^r, z), s = r + sk·c.
  4. The signature is (z, s, g^r, c, nul).

In use, the holder proves in a ZK circuit that the signature is valid for some pk in an allowed set, revealing only nul (and c). A contract records used nullifiers to block a second action.

The spec gives two circuit variants: V1 (verifier-optimized) does the SHA-256 inside the circuit; V2 (prover-optimized) makes g^r and z public and moves the hash to the on-chain verifier, where SHA-256 is a cheap precompile.

Sample code

Pseudocode for signing and the non-ZK verification check (from the spec):

def plume_sign(m: bytes32, sk: int):
    pk  = G * sk
    h   = hash_to_curve(m + sec1_compressed(pk))   # 65-byte input
    r   = random_scalar()
    z   = h * r
    nul = h * sk                                   # deterministic nullifier
    c   = sha256(G, pk, h, nul, G * r, z)
    s   = (r + sk * c) % N
    return (z, s, G * r, c, nul)

def plume_verify(m, pk, sig):
    z, s, gr, c, nul = sig
    h = hash_to_curve(m + sec1_compressed(pk))
    return (G * s - pk * c == gr and
            h * s - nul * c == z and
            c == sha256(G, pk, h, nul, gr, z))

Things to know

  • Status is Draft. The spec defines the cryptography but not a JSON-RPC method name, so wallet support is implementation-specific.
  • The spec notes the construction has formal proofs in the PLUME paper, but implementations have had only an internal audit round and are not fully audited.
  • Anonymity relies on discrete log being hard. If secp256k1 is ever broken (for example by quantum computers), all past nullifiers in an anonymity set could be linked to their accounts. The spec suggests interactive schemes such as Semaphore-style commitments for long-term secrecy.
  • The nullifier is per account and message. Apps choose m (for example a poll ID) to scope uniqueness.

#zk #privacy #signatures #nullifier #wallet

Details

Authors
Yush G (@Divide-By-0) <[email protected]>, Kobi Gurkan (@kobigurk), Richard Liu (@rrrliu), Vivek Bhupatiraju (@vb7401), Barry Whitehat (@barryWhiteHat)
Status
Draft
Type
Standards Track / ERC
Created
2023-09-24

Machine-readable: Markdown · JSON