Issuance integrity
When a credential is issued:- The issuer signs the credential data with their DID (Decentralized Identifier).
- A cryptographic proof of the credential is generated and submitted to Moca Chain.
- The credential is written to on-chain storage. The
vcStatustransitions fromWAIT_ONCHAINtoONCHAINonce confirmed.
Zero-knowledge verification
By default, credential verification uses zero-knowledge proofs (ZKPs). This means:- The verifier asks a question: “Does this user hold a valid credential matching schema X?”
- The user’s device generates a ZK proof that answers “yes” or “no” without revealing the underlying data.
- The verifier receives the boolean result and the on-chain proof hash — nothing else.
Selective disclosure
ZK proofs can verify individual attributes without revealing the full credential. For example, a credential containingage, country, and kycLevel can prove that kycLevel >= 2 without revealing the user’s age or country.
Selective disclosure is defined at the schema and verification program level. See Schema Design for configuration.
Credential revocation
Issuers can revoke credentials at any time. Revocation is recorded on-chain and takes effect immediately — any subsequent verification against a revoked credential will fail. When using Issue on Behalf withonDuplicate: "revoke", the old credential is automatically revoked before the new one is issued.
Regulated data access (CAK)
For industries where verifiers must access raw data (e.g. identity photos for KYC), the Compliance Access Key (CAK) framework adds a consent-gated encryption layer. Data is encrypted at issuance and only decryptable by a verifier who has obtained explicit user consent.Credential storage
| Storage layer | What is stored | Encrypted? |
|---|---|---|
| Moca Chain (on-chain) | Credential proofs and state anchors | N/A — proofs are hashes, not data |
| dStorage (decentralized) | Full credential payload | Yes, if CAK is enabled |
| User device | Private keys, session tokens | Yes, managed by MPC shards |
Further reading
- Privacy & Compliance (CAK) for the full encryption framework
- zkTLS for the zero-knowledge transport layer
- Schema Design for defining verifiable attributes