Clave

A k-of-n multisig for Aztec where no single member can spend from or see inside the vault.

Clave

Created At

ETHGlobal Mumbai

Winner of

Ethereum Foundation

Ethereum Foundation - Best CROPS App: Censorship Resistant, Open Source, Private, Secure 3rd place

Project Description

Clave is a k-of-n multisig built for Aztec: shared custody that works with Aztec's private state.

On Aztec an account has two kinds of authority. Spending is defined by the account contract through native account abstraction: its entrypoint decides which signatures authorize a transaction. Reading is defined by keys: incoming notes are encrypted to the account's address, and whoever holds the incoming viewing secret can decrypt them in their PXE. A multisig has to control both. Sharing the viewing secret among members means any member, including one you later remove, can read the treasury forever.

Clave splits both kinds of authority across the members:

  • Spending (k of n). The vault is a custom Aztec account contract, ClaveVault. Its private entrypoint accepts a transaction only when the auth witness carries valid Schnorr signatures from k registered members over the transaction's outer hash. The signer set and thresholds live in private notes, and the check runs inside the client-side proof, so the network never learns who the members are or how many signed.
  • Viewing (t of n). The vault's viewing key is created by a distributed key generation between the members' keepers, and the result is the account's Ivpk, so the vault has an ordinary Aztec address. No one ever holds the secret. When a member's PXE syncs a note, its patched key store asks the keepers for threshold ECDH. Any t of them return address_secret × P computed from their own shares, each with a proof, which is exactly what Aztec's own key store would have computed. The note decrypts normally.

The flow: members found a vault together (key generation, address derivation, deployment, on-chain config check). A member proposes a transaction. Each member's PXE rebuilds and simulates it independently before signing the approval message. Once k approvals are gathered peer to peer, any member builds the auth witness, proves locally and sends it, with fees paid through Aztec's sponsored fee payment contract. Removing a member reshares the viewing key in the same governance transaction that updates the signer set, so the removed member cannot read new notes and the vault keeps its address.

How it's Made

Account contract (Aztec.nr v6, Noir). ClaveVault implements the account entrypoint and verify_private_authwit. The PXE serves a 49-field auth witness for the transaction's outer hash: up to eight signer keys, eight Schnorr signatures, and a deadline. The entrypoint checks that the keys hash to the signer-set commitment in the private config note, checks every slot (empty slots against the generator, so every vault size has one circuit shape), and requires at least k valid signatures over Poseidon2("clave.approval.v0", [vault, outer hash, config version, expires_at]). The config note is read without being nullified, so authorization also works in static authwit checks from other contracts. Config notes use constrained delivery so no member can be left without them. Config changes such as rotate_membership are #[only_self] and bump the config version, which voids old approvals. The entrypoint costs 27,176 gates.

Threshold viewing (Rust, clave-crypto). Grumpkin arithmetic and a Feldman DKG with Schnorr proofs of knowledge. Each keeper holds a share of the address secret, including Aztec's preaddress offset and negation rule, so the shares combine to exactly the secret Aztec derives. For each note's ephemeral key P, a keeper returns share × P with a Chaum-Pedersen DLEQ proof, and the PXE combines t valid answers with Lagrange coefficients. Resharing moves the same secret to a new committee when members change. Point encoding, address derivation, the ECDH-to-AES step and tag derivation are checked byte for byte by golden tests against real Aztec 6.0.0 output.

PXE integration (TypeScript). A minimal, marked patch to @aztec-labs/pxe swaps the key store: where Aztec would load the account's incoming viewing secret, it batches the ECDH requests to the keepers instead. A stock key store behaves exactly as before. The vault-wallet package registers the vault account, encodes the auth witness and drives proving. The Rust crypto reaches TypeScript through napi-rs bindings.

Keepers and network (Rust). clave-keeper holds the sealed viewing share, runs the DKG and resharing ceremonies, answers decryption requests, and replicates signed proposals, approvals and receipts over a libp2p mesh (QUIC and TCP with Noise). The optional clave-relay gives circuit relay and sealed mailboxes for offline members and only ever sees ciphertext.

Member tooling. claved is a per-member daemon that hosts the PXE, a passphrase-sealed signer (Argon2id with ChaCha20-Poly1305, optional Touch ID) and the proposal workflow. The Rust clave CLI drives it: found a vault, propose, review the rebuilt transaction, approve or reject, and execute.

background image mobile

Join the mailing list

Get the latest news and updates

Clave | ETHGlobal