Securityintermediatearticle35 min read

DID and ZK for VNeID: Decentralized Identity in Vietnam

DID and ZK for VNeID: Decentralized Identity in Vietnam

Vietcardano teamTeam

Đội ngũ biên tập VietCardanoCommunity — các chuyên gia blockchain và Cardano, cung cấp nội dung giáo dục và nghiên cứu chuyên sâu cho cộng đồng.

Published August 31, 2026Updated August 30, 2026
Vietnam's VNeID platform, governed by Nghị định 13/2023, already gives citizens a unified digital identity for government services. But VNeID today is a centralized credential — the government holds the data, controls access, and sees who authenticates where. Decentralized Identity (DID) combined with Zero-Knowledge Proofs (ZKP) offers a different path: citizens prove who they are without any authority tracking the proof. This article explains how DID and ZK fit into Vietnam's digital identity roadmap and why the combination matters. Traditional digital identity is a permission model: you ask a provider (Google, Facebook, or the Vietnamese government) to vouch for you, and the provider learns everything you do with that vouching. DID reverses this. The user owns their identity document, stores it in a wallet, and presents proofs from it. ZK adds the crucial twist: the proof reveals only what the verifier needs and nothing more. traditional vs did vs didzk

The Three Layers: VNeID, DID, and ZK

VNeID is Vietnam's national digital identity platform, launched under the government's digital transformation strategy and regulated by Nghị định 13/2023 on personal data protection. It functions today as a centralized identity provider: the Ministry of Public Affairs issues credentials, stores them, and validates them when a service requests authentication. Decentralized Identity (DID) is a W3C standard that assigns each person a globally unique identifier they control — like a personal URL that no one can revoke. The identifier points to a document describing how to verify cryptographic proofs from the identity holder. Verification keys live with the holder, not with a central registry. Zero-Knowledge Proofs add selective disclosure to DID. The holder can prove "I am a Vietnamese citizen over 18" without revealing their actual citizen ID number, birth date, or name. The verifier gets a true/false answer; the holder keeps their data private. Together: VNeID issues the foundational credential (government-verified identity), DID gives the user a portable, self-owned identifier, and ZK lets the user prove claims from that credential without over-sharing. vneid did zk flow

How It Works in Practice

Step 1: Enrollment A Vietnamese citizen registers with VNeID. VNeID validates their identity against civil registry records and issues a verifiable credential: a cryptographically signed document containing attributes (name, date of birth, nationality, residence, VNeID number). The citizen stores this credential in a wallet app — a mobile application capable of ZK proof generation. The wallet never transmits the credential to anyone without explicit user action. Step 2: Proving a Claim The citizen wants to open a bank account. The bank requires proof that the applicant is a Vietnamese resident over 18. The bank publishes its verification policy as a ZK circuit: "accept any proof that the holder's credential contains nationality=VN and birth_date <= (today - 18 years)." The wallet reads the policy, runs the circuit locally on the citizen's phone, and generates a proof. The proof is a small cryptographic object — roughly a few hundred bytes — that any verifier can check against a public verification key. Step 3: Verification The bank receives the proof and the user's DID. It checks the proof against the verification key published by VNeID (or by an interoperability standard). If the proof validates, the bank knows the applicant meets its criteria — without learning the applicant's name, birth date, or any other credential detail. The bank can record the successful verification in its own systems for compliance, but it cannot derive the user's identity from the proof alone. did zk verification sequence

Selective Disclosure in Action

Selective disclosure is the feature most directly relevant to Vietnamese privacy regulation. A VNeID credential might include: full legal name, date of birth, nationality, permanent address, issuing authority, expiration date, and photo. When accessing a service, the user reveals only what the service's policy requires:
  • Age-restricted service: Prove birth_date proves age ≥ 18. Reveal nothing else.
  • Voting portal: Prove nationality=VN and residence in the relevant province. Reveal nothing else.
  • Healthcare portal: Prove insurance eligibility attribute. Reveal nothing else.
In each case, the service learns only one binary fact. It cannot reconstruct the credential, cannot build a profile across services, and cannot harvest excess data. selective disclosure

DID Document Structure

A DID document is a JSON-LD file describing the identity holder's public keys, verification methods, and service endpoints. It lives at a resolvable location (often a decentralized storage system or a dedicated DID registry). ``` { "@context": ["https://www.w3.org/ns/did/v1"], "id": "did:example:123456789abcdefghi", "verificationMethod": [{ "id": "did:example:123456789abcdefghi#keys-1", "type": "Ed25519VerificationKey2020", "controller": "did:example:123456789abcdefghi", "publicKeyMultibase": "zH3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" }], "authentication": ["did:example:123456789abcdefghi#keys-1"], "service": [{ "id": "did:example:123456789abcdefghi#vneid-credential", "type": "VerifiableCredential", "serviceEndpoint": "https://vneid.gov.vn/credentials/..." }] } ``` The wallet holds the private key corresponding to the public key in this document. ZK proofs are signed with this key, linking the proof to the DID without revealing the key itself. did document structure

Regulatory Alignment with Nghị định 13/2023

Vietnam's personal data protection decree (Nghị định 13/2023) applies to any processing of personal data. Traditional authentication flows involve data processing: the authentication provider receives and processes identity data. ZK login arguably escapes this definition because the verifier never receives personal data — only a mathematical proof. This regulatory advantage is significant. Services that adopt ZK login can argue they are not processing personal data during authentication, reducing their compliance burden under the decree. For services operating across jurisdictions (international DeFi protocols, global SaaS), this alignment simplifies multi-jurisdictional compliance. compliance comparison

Implementation Challenges

Interoperability: VNeID, international DIDs, and ZK proof formats must interoperate. Standards bodies (W3C, IETF) are progressing, but production-ready interoperability remains partial. Vietnam's national systems need explicit DID support in their architecture. User Experience: Current wallet UX for ZK proofs is complex for non-technical users. Selecting which attributes to prove, understanding what a proof reveals, and recovering a lost wallet are all user experience gaps. The VNeID mobile app — already widely used — is the natural integration point, but it needs ZK capabilities. Revocation: If a VNeID credential is revoked (say, a passport expires), the corresponding verification key must be invalidated. Revocation in ZK systems requires either on-chain status checks or succinct revocation accumulators. Neither is yet standardized. Legal Recognition: While ZK proofs are cryptographically sound, their legal standing in Vietnamese courts is untested. A ZK proof of citizenship is not yet a legally recognized document. This will require regulatory evolution.

The Roadmap Forward

Phase 1: Wallet Integration (12–18 months) Extend VNeID mobile app with DID wallet capabilities: generate DIDs, store verifiable credentials, and create basic ZK proofs for common use cases (age verification, nationality verification). Phase 2: Verifier Ecosystem (18–30 months) Government agencies and major financial institutions publish verification policies accepting ZK proofs from VNeID DIDs. Standards alignment with international DID and VC formats. Phase 3: Full Self-Sovereign Operation (30–48 months) Users hold DIDs independent of VNeID issuance, with community or multi-issuer attestation. ZK proofs work across all services — government, finance, healthcare — without any single authority tracking usage.

FAQ

Q: Is my VNeID data still stored centrally? Your VNeID credential data remains with VNeID. The DID/ZK layer gives you new capabilities to use that credential privately — it does not move the data. True self-sovereign storage requires migrating credentials to your own wallet. Q: Can I use my DID internationally? DIDs are globally unique identifiers. If foreign services accept the verification keys and proof formats linked to your VNeID-issued DID, yes. International standardization is still in progress. Q: What if I lose my phone with my DID wallet? DID recovery requires a recovery mechanism: social recovery (trusted contacts), issuer re-enrollment (VNeID re-issues a new credential mapped to a new DID), or a seed phrase. The exact model depends on wallet design. Q: Does this replace VNeID? No. VNeID remains the authoritative credential issuer. DID and ZK are user-side and verifier-side technologies that let users leverage VNeID credentials more privately and conveniently. They complement VNeID rather than replacing it. Q: How does this prevent the government from tracking my logins? The ZK proof contains no identifying information the government has not already authorized. The proof links to your DID, but the government's VNeID system does not monitor which services request verification of which DIDs. That separation is the privacy gain.

Tags:

did zkvneid blockchaindanh tính số phi tập trung