PrivvieDocsOpen the app
All pages

The circuit

What the proof actually proves.

Privvie uses one circuit for every action. It is written in Noir and proved with UltraHonk. It takes two notes in and makes two notes out.

  1. Each real input note is in the tree.
  2. You hold the spending key for it.
  3. Its tag was made correctly.
  4. Money in equals money out. Nothing is created.
  5. The proof is locked to this exact request.

Amounts are limited to 64 bits, so a number cannot wrap around and create money.

ItemValue
LanguageNoir 1.0
Proof systemUltraHonk over BN254
HashPoseidon2
Tree depth20
Proof sizeAbout 14 KB
Public inputs9
Note encryptionX25519 and XChaCha20-Poly1305

The source is in circuits/src/main.nr. Run npm run circuit to rebuild it and npm test to attack it.

Fees