1. Pedersen commitments on ristretto255
An amount v is never published. Instead the operator publishes a commitment with a fresh random blinding factor r:
G is the ristretto255 base point. H is derived with RFC 9380 hash-to-curve from the public string VEILOPS/pedersen/H/v1, so nobody, including us, knows log_G(H). The commitment is perfectly hiding (every value is equally consistent with C) and computationally binding (opening it to a different value would require solving a discrete logarithm). Ristretto255 gives a prime-order group without the cofactor pitfalls of raw Ed25519 points.
2. Range proofs by bit decomposition
To prove 0 ≤ v < 2ⁿ, the prover writes v = Σ bᵢ·2ⁱ and commits to every bit with its own blinding rᵢ, chosen so that Σ 2ⁱ·rᵢ = r:
If every Cᵢ commits to 0 or 1, the weighted sum can only open to a number in [0, 2ⁿ). Proof size grows linearly with n: about 160 bytes per bit before encoding.
3. Cramer–Damgård–Schoenmakers OR-proofs
For each bit the prover shows knowledge of x with Cᵢ = x·H (bit 0) or Cᵢ − G = x·H (bit 1), without revealing which. The true branch is a Schnorr proof; the other branch is simulated by choosing its challenge and response first:
e = Hash(ctx, i, Cᵢ, A₀, A₁) · c_b = e − c_¬b · s_b = k + c_b·x
The verifier recomputes A₀ = s₀·H − c₀·Y₀, A₁ = s₁·H − c₁·Y₁ and accepts iff c₀ + c₁ = Hash(ctx, i, Cᵢ, A₀, A₁). This is honest-verifier zero knowledge: the transcript is distributed identically whichever branch is real.
4. Fiat–Shamir and context binding
Challenges are derived from SHA-512 over a length-prefixed, domain-separated transcript, reduced modulo the group order. The transcript context is the canonical JSON of all public inputs: operation id, policy id, limit, bit length, asset, category and the commitment. A proof therefore cannot be replayed onto another operation, another asset or a stricter limit. The tests in tests/security check exactly this.
5. Proving amount ≤ limit
Commitments are additively homomorphic. Given the public limit m, the verifier itself computes
and the prover supplies a second range proof that D opens to a value in [0, 2ⁿ). Since m < 2ⁿ and 2ⁿ⁺¹ is far below the group order, both proofs together imply 0 ≤ v ≤ m. An over-limit amount makes m − v wrap to a huge scalar, for which no bit decomposition exists, so the SDK refuses to prove it and a forged proof would fail.
6. Envelope encryption and selective disclosure
- Payload: AES-256-GCM via WebCrypto, 96-bit random nonce, associated data = protocol version + operation id.
- Key wrapping: a fresh ephemeral X25519 key per recipient, HKDF-SHA256 over the shared secret (salt = ephemeral ‖ recipient public key), AES-256-GCM wrap of the data key.
- Selective disclosure:
grantAccess()unwraps the data key with the owner key and re-wraps it for a new viewer. The ciphertext is unchanged. To prove the disclosed amount matches the public record, the owner also shares the commitment opening(v, r), which the viewer checks againstC.
7. Attestation
Every public record is signed with Ed25519 over its canonical JSON (domain-separated). The signature proves which operator published the record and that no field changed since. It is not a zero-knowledge proof, and the interface never presents it as one.
8. What this is not
| Claim | Status |
|---|---|
| Hides amounts in public records | yes |
| Proves amount ≤ policy limit in zero knowledge | yes, unaudited |
| Succinct proofs (SNARK / Bulletproofs) | no |
| Anonymity of senders / transaction graph | no, not a goal of v0.1 |
| On-chain verification on Solana | no |
| Independent security audit | not yet |
9. Next
Phase 02 targets logarithmic-size range proofs (Bulletproofs-style inner-product arguments) to shrink proofs from tens of kilobytes to under one, aggregation across a batch of payroll lines, and proving inside a Web Worker. Phase 03 explores Solana's Token-2022 confidential transfer extension, which already uses twisted ElGamal and range proofs on-chain, as the settlement layer where it is supported.