Privacy Modes

dregg supports three verification modes with progressive privacy guarantees. You choose the mode when authorizing an action -- the tradeoff is between what the verifier learns and proof generation time.

Trusted Mode

Full cleartext evaluation. The verifier receives the complete token, Datalog derivation trace, and clearance result.

Selective Disclosure

The prover chooses which facts from the derivation trace to reveal. Everything else remains hidden behind a STARK proof. A Poseidon2 commitment binds the revealed facts to the proof so the prover cannot lie about what was derived.

Per-Fact Disclosure Control

Each fact in the derivation trace can independently be:

Fully Private

The verifier learns exactly one bit: whether authorization was granted or denied. The STARK proof covers the entire multi-step Datalog derivation without revealing any intermediate facts, chain length, or rule selections.

Anonymous Presentation

A variant of fully-private mode that additionally hides which federation member produced the proof. Uses per-presentation blinding (BlindedMerklePoseidon2StarkAir) so the same holder produces unlinkable proofs across sessions.

Choosing a Mode

Mode Privacy Level Speed Proof Size
Trusted None (full visibility) ~8 us 0 (no proof)
Selective Partial (chosen facts only) ~200 ms ~24 KiB
Fully Private Maximum (one bit) ~500 ms ~24 KiB
Anonymous Maximum + unlinkable ~500 ms ~24 KiB

Beyond Authorization Privacy

Authorization modes control what the verifier learns about your credentials. dregg's privacy stack extends further:

Honest limitation: Intent content is partially visible. SSE keyword tokens are enumerable by observers who know the keyword space. The executor sees sovereign state during federation-mediated multi-party interactions.

For the developer API behind these modes, see Privacy API Reference and the Privacy Architecture deep dive.