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.
- Each real input note is in the tree.
- You hold the spending key for it.
- Its tag was made correctly.
- Money in equals money out. Nothing is created.
- The proof is locked to this exact request.
Amounts are limited to 64 bits, so a number cannot wrap around and create money.
| Item | Value |
|---|---|
| Language | Noir 1.0 |
| Proof system | UltraHonk over BN254 |
| Hash | Poseidon2 |
| Tree depth | 20 |
| Proof size | About 14 KB |
| Public inputs | 9 |
| Note encryption | X25519 and XChaCha20-Poly1305 |
The source is in circuits/src/main.nr. Run npm run circuit to rebuild it and npm test to attack it.