Privacy model
The information Opertus hides, reveals, and exposes to key holders.
Opertus provides note privacy, not universal transaction privacy. The pool holds public assets while private ownership is represented by encrypted notes and Poseidon commitments. A spend publishes a nullifier, allowing the contract to reject double-spends without identifying the consumed commitment.
This page is the reference for what protocol data is hidden, what remains public, and what each key holder can learn.
What the protocol hides and reveals
The boundary for an observer without the relevant keys is:
| Area | Hidden | Public |
|---|---|---|
| Notes | Owner, value, plaintext opening, and amounts paid inside outputs | Commitments and Merkle roots |
| Spends | Link between a nullifier and its consumed commitment; one-time and master spend secrets | Nullifiers, transaction timing, and cloneSalt |
| Public settlement | Private output values, including a relayer fee note | Deposits, gross withdrawals, recipients, publicAmount, and protocol fees |
| Assets and calls | Private note amounts and ownership | Token addresses, external targets, calldata, and return minValue |
| Return notes | Encrypted ownership data | Measured return amount emitted by the pool |
| Submission | Note ownership and openings | Transaction sender unless a separate relay submits it |
The hidden properties depend on valid cryptography, protected keys, fresh randomness, and securely generated Groth16 proof parameters.
Public chain and network data
External calls are ordinary public calls. Searchers can inspect and potentially sandwich router calldata. Opertus does not hide network metadata or guarantee that deposits and withdrawals cannot be correlated by timing, amount, token, or other side information.
Who can see a note
Opertus deliberately separates viewing from spending:
View key
The view key is a secp256k1 private key. It decrypts matching notes, reveals their tokens and values, derives the nullifier key, and detects when those notes are spent. It cannot satisfy the circuit's ownership check.
Spend key
The spend key is a BabyJubJub scalar. Together with a known note and its spend ephemeral, it derives the one-time spend secret. By itself it does not scan or decrypt notes.
Recovery phrase
The recovery phrase derives both branches. Compromise of the phrase therefore compromises both privacy and spend authority.
A watch-only device is private from public chain observers, but not from anyone who controls its view key or decrypted local note database.
Disclosing one payment
To prove a single payment, share a receipt rather than the view key. A receipt holds that note's key, which opens its ciphertext and nothing else: no other note, no spend status, no key. Both the sender and the recipient can rebuild it from their seed. A receipt reveals the note's token, value and memo, and the transaction that created it. See selective disclosure.
Encryption and scanning
Each sender creates a fresh secp256k1 ephemeral key and derives an XChaCha20-Poly1305 key through ECDH and HKDF-SHA256. The first two bytes of the hashed shared point form a view tag.
The two-byte tag is only a scan filter. A foreign note matches by chance about once in 65,536 attempts; authenticated decryption rejects that false positive. The associated data binds the ciphertext to its view and spend ephemerals, view tag, chain ID, pool address, and note commitment. Consequently, moving a ciphertext to another chain, pool, or commitment causes decryption or commitment validation to fail.
Commitments and nullifiers
A commitment is a hiding fingerprint, not encryption. Its privacy relies on unguessable secret inputs and fresh randomness. Reusing all commitment inputs would reproduce a commitment. Both copies share one nullifier, so only one can be spent, and wallets ignore the later copy. A nullifier is derived from the secret nullifier key, so an observer cannot link it to a commitment. The exact constructions are in keys and notes.
Operational privacy limits
- View-key leak. A leaked view key exposes historical and future matching notes, and the notes the wallet sent, until keys and usage patterns change.
- Shared receipts. A receipt cannot be revoked. Whoever holds it can show the note's value and memo, and find the transaction that created it.
- Local storage. Decrypted local storage exposes note metadata to anyone who can read the browser or application profile. Stored notes omit the one-time spend secret and nullifier key, but their token and value are readable.
- Key strings in memory. Exported key strings cannot be reliably erased
from managed-language memory.
wipe()clears the key manager's byte arrays, not strings already returned. - Permanent roots. Old Merkle roots remain valid. Permanent nullifier tracking prevents replay, but the public history remains available for analysis.
- Public return values. Return-note values are public because the pool measures and emits what arrived after an external call.
- Relays. A private relay may reduce mempool exposure, but it does not change what is ultimately recorded onchain.
Treat privacy as a documented boundary. Applications should not describe Opertus as hiding deposits, withdrawals, swap routes, public recipients, or all metadata.