Proof Methods
The Averer SDK provides two methods for verifying credentials: Selective Disclosure and Proof by Query (Zero Knowledge). Both ensure users can prove their eligibility without compromising their privacy, but they work differently and suit different use cases.
These approaches can operate off-chain or on-chain, depending on the level of trustlessness and privacy your use case demands.
Selective Disclosure
Selective Disclosure (SD) is a method where a user reveals only specific fields from their credential to a verifier. This process is handled off-chain: data is shared directly between the user and the verifier without being recorded on the blockchain.
How it works
- Request: the verifier requests one or more fields from the user (e.g.
"name","country"). - Consent & Reveal: the user consents and reveals only the requested data point. The rest of the credential remains hidden.
- Verification: the verifier receives the disclosed information along with a cryptographic signature, allowing them to confirm its authenticity without seeing the entire credential.
Key characteristics
- Off-chain: verification happens directly between the holder and verifier, ensuring privacy and speed.
- Data Reveal: specific, requested information is revealed to the verifier.
- Simplicity: straightforward for both the developer and the end-user.
Proof by Query (Zero Knowledge)
Proof by Query (PBQ) uses zero-knowledge proofs, allowing users to prove a statement is true without revealing any of the underlying data.
For on-chain verification, the proof is submitted to and verified by a smart contract on the Redbelly Network.
How it works
- Query: the verifier asks a yes/no question using a query, like "Is the user over 18?"
- Proof Generation: the user's wallet generates a cryptographic proof that they satisfy the query, without revealing their address or any other personal information.
- Verification: for on-chain, the proof is submitted to the blockchain, where a smart contract verifies its validity. The result is a simple "true" or "false," with no personal data ever being exposed on-chain.
Key characteristics
- On-chain: verification can be executed and recorded on the blockchain, providing a high level of trust and transparency.
- Maximum Privacy: no personal data is ever revealed to the verifier or recorded on-chain.
- Trustless: verification is handled by a smart contract, removing the need to trust a central verifier (when on-chain).
When to choose which?
Choose Selective Disclosure when:
- The verifier needs to know a specific piece of information (e.g. the user's name for a registration process).
- You need to perform off-chain identity verification.
- Your logic doesn't involve conditions (just field access).
Choose Proof by Query (Zero Knowledge) when:
- You want to verify a condition (such as voting in a DAO, participating in a token sale, or accessing a DeFi protocol).
- Maximum privacy is a critical requirement, and no personal data should be revealed to any party.
- You need on-chain, trustless verification that is transparent and auditable on the blockchain.
In Selective Disclosure, data is revealed. In Proof by Query, only the proof is shared and no data is exposed.
By offering both methods, Averer provides the flexibility to build a wide range of applications that are both compliant and privacy-preserving.
For detailed query construction and examples using each method, see Eligibility Criteria.