1. Introduction
The did:ndc method provides decentralized identifiers for individuals, organizations, assets, and
other entities participating in national data management, public administration, and government-authorized
activities. It is designed for the government and public-sector identity ecosystem governed and operated by the
National Data Center (NDC).
Although did:ndc and did:nda use the same underlying infrastructure, including the
NDA Chain blockchain and Verifiable Data Registry (VDR), they serve different
identity ecosystems. did:nda supports civilian, commercial, and digital-economy use cases under
the governance of the National Data Association, while did:ndc supports identities that require
government authority, official accountability, and compliance with applicable laws and regulations. Separate
method names make the governing authority, issuance policies, and trust framework of a DID explicit.
The existence of two separate DID methods is therefore intentional. The did:nda and
did:ndc prefixes distinguish the identity ecosystem and origin of each DID, allowing users and
systems to understand whether it belongs to the civilian and commercial ecosystem or the government and
public-sector ecosystem. This distinction makes it possible to apply the appropriate governance framework,
issuance and authorization policies, lifecycle-management rules, and trust requirements when a DID is created,
resolved, or used.
This system follows W3C DID standards and uses a hybrid architecture: the NDA Chain provides an authoritative record of DID-related data, while richer DID Documents are stored in the VDR and retrieved through the resolver service. This approach combines verifiability and portability with the governance, authorization, and lifecycle-management requirements of public-sector identities.
Resolution is handled by a dedicated resolver service, ensuring that DID Documents are retrievable without querying the blockchain directly for all data, which enhances privacy and efficiency.
2. DID Method Name
The registered method is ndc.
A valid DID starts with:
did:ndc:
3. DID Syntax
A did:ndc DID is formed by the method prefix and a unique identifier derived from an NDA Chain
blockchain address.
Regex:
^did:ndc:0x[0-9a-fA-F]{40}$
ABNF:
did-ndc = "did:ndc:" method-specific-id
method-specific-id = "0x" 40*HEXDIG
HEXDIG = DIGIT / "a" / "b" / "c" / "d" / "e" / "f" / "A" / "B" / "C" / "D" / "E" / "F"
DIGIT = %x30-39
4. Method Operations (CRUD)
This method supports Create, Read, Update and Deactivate operations.
Create (Register)
The creation of a did:ndc Decentralized Identifier involves two phases:
First - generating the
identifier and the initial document off-chain,
Second - registering the DID on the NDAChain.
Phase 1: Off-Chain Generation (Identifier & Document)
A did:ndc is implicitly created when a user generates a new ECDSA secp256k1 key pair. This process
is performed entirely off-chain. The DID identifier is derived deterministically from the public key using
standard Ethereum address generation logic.
The Derivation Algorithm:
- Generate Private Key: Create a cryptographically secure 32-byte private key.
- Derive Public Key: Calculate the uncompressed public key (65 bytes, starting with
0x04). - Hash: Apply the Keccak-256 hashing algorithm to the last 64 bytes of the public key.
- Truncate: Take the last (lowest-order) 20 bytes of the resulting hash.
- Address Generation (Encode): Convert these 20 bytes into a 42-character hexadecimal string.
This string represents the Account Address and MUST include the
0xprefix (e.g.,0x3f1a...). - Format: Prepend
did:ndc:to the Account Address to form the final DID.
Example:
Account Address: 0x3f1a5c2e8b9d7f6a4c1b9e8d7c6b5a49382716f5
Final DID: did:ndc:0x3f1a5c2e8b9d7f6a4c1b9e8d7c6b5a49382716f5
Document Creation & Storage:
The DID Document associated with the DID is generated locally. The document supports the
EcdsaSecp256k1VerificationKey2019 verification method. It is stored in the VDR's off-chain
database, while the corresponding DID registration information is published to the NDA Chain. When the DID
is resolved, the resolver uses this registration information to locate and return the document from the VDR.
Phase 2: On-Chain Registration
The issuance of the DID will be certified by the NDAChain blockchain network through the publishing of a DID registration transaction.
The transaction contains the hash of the DID Document. This transaction must be signed by the private key corresponding to the DID, proving immediate control over the DID identifier. This transaction simultaneously anchors the DID's off-chain pointer to the chain.
Once the registration transaction is confirmed on NDAChain, the DID is considered fully created and globally certified.
Read (Resolve)
A did:ndc is resolved by querying the NDA DID Resolver service. The resolver
fetches the DID Document associated with the DID from its off-chain storage (e.g., application cache, dedicated
database) and returns it to the client. See Section 6 for resolution details.
Update (Replace)
DID Documents can be updated. The controller of the DID (who holds the associated
private key) can authorize changes to the DID Document, such as rotating verification keys, adding new keys,
removing or revoking old keys, adding or removing service endpoints, or modifying authentication
and assertionMethod relationships. Updates are submitted to the NDA DID Resolver service API and
must be cryptographically signed by the controller to prove ownership.
Deactivate (Revoke)
Deactivation is achieved by revoking the DID. The controller updates the DID Document to remove or revoke all
verificationMethod and service entries. A deactivated DID cannot be reactivated.
5. Method-Specific Identifiers
The did:ndc method-specific identifier is a blockchain address from the NDA
Chain.
- Allowed charset: digits
[0–9], lowercase letters[a-f], uppercase letters[A-F], and the prefix0x. - Length: 42 characters total (
0xprefix + 40 hexadecimal characters). - Collision management: Uniqueness is guaranteed by the underlying blockchain's cryptographic address generation process.
- Example:
did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828
6. DID Resolution
Resolution is performed via an HTTP GET request to the NDA DID Resolver service.
Reference Endpoint:
GET https://resolver.ndcdid.vn/1.0/identifiers/{did}
Example Request:
GET https://resolver.ndcdid.vn/1.0/identifiers/did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828
Response: On success, the service returns a 200 OK with the DID Document (in
application/ld+json format) as the response body.
Resolution error examples:
404 Not Found: The DID Document for the given DID does not exist in the registry.400 Bad Request: The DID string is malformed or invalid.
7. DID Document
When a did:ndc is resolved, the resulting DID Document is a JSON-LD object that conforms to the W3C DID Core v1.0 specification.
The document includes multiple contexts:
https://www.w3.org/ns/did/v1(DID Core v1.0)https://w3id.org/security/v1(Security & Cryptography Standards)https://www.w3.org/ns/cid/v1(Content Integrity Data Model)
Verification Methods
The did:ndc method supports the following verification methods:
- EcdsaSecp256k1VerificationKey2019: An ECDSA public key using the secp256k1 curve. The
public key is encoded in the
publicKeyHexproperty. - Multikey: A multicodec-based verification method that supports multibase-encoded public
keys. The public key is encoded in the
publicKeyMultibaseproperty.
Example DID Document
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/v1",
"https://www.w3.org/ns/cid/v1"
],
"id": "did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828",
"controller": "did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828",
"verificationMethod": [
{
"id": "did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828#keys-1",
"type": "EcdsaSecp256k1VerificationKey2019",
"controller": "did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828",
"publicKeyHex": "04abf141154b386b0203f7e0e7a1c4e7f805f833b9b3e1f0e8f0c3d8e5f0a2a1a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c"
},
{
"id": "did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828#keys-2",
"type": "Multikey",
"controller": "did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828",
"publicKeyMultibase": "zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme"
}
],
"authentication": [
"did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828#keys-1"
],
"assertionMethod": [
"did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828#keys-1",
"did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828#keys-2"
]
}
8. Governance
- Authority: The NDA Chain and the associated Verifiable Data Registry (VDR) are maintained by Vietnam's National Data Center.
- Maintainer: The resolution service (
resolver.ndadid.vn) is operated and maintained by Vietnam's National Data Center. - Process to obtain a DID: As described in Section 4 (Create), DIDs are generated by users via cryptographic key-pair creation. The associated DID Document is published to the VDR via the NDA Resolver service API, requiring a signature from the controller.
9. Privacy & Security Considerations
Security Considerations
- Key Management: The security of the
did:ndcmethod is entirely dependent on the controller's ability to secure their private key. Private keys should be stored in secure environments, such as a Hardware Security Module (HSM) or a device's Secure Element (SE). - Trust Model: Trust is rooted in the cryptographic security of the NDA Chain and the integrity of the NDA DID Resolver service. Verifiers must trust that the resolver service provides the correct DID Document associated with a given DID.
- Authentication: All update operations on a DID Document MUST be cryptographically signed by
the key(s) associated with the
controllerDID, proving ownership.
Privacy Considerations
- Data Minimization (On-Chain): The NDA Chain only stores minimal data (DIDs and references). No Personally Identifiable Information (PII) is stored on the blockchain.
- Off-Chain Documents: The DID Document itself is stored off-chain. While it does not contain PII, it does contain public keys.
- Selective Disclosure: PII is only ever contained within Verifiable Credentials (VCs), which are held by the user (e.g., in a digital wallet) and are never published to the resolver or the blockchain. The user presents VCs and can choose which information to disclose (selective disclosure).
- Pseudonymity: A
did:ndcis a pseudonymous identifier. It is not inherently linked to a real-world identity unless the holder chooses to link it by, for example, obtaining a VC from an issuer that verifies their identity.
10. Lifecycle
- Versioning: This specification follows Semantic Versioning. Breaking changes will require a new version.
- Deprecation/Deactivation: As described in Section 4.4, DIDs can be deactivated by updating
their DID Document to remove keys and services. A
404 Not Foundor a DID Document with no verification methods may be returned for a deactivated DID.
11. W3C Registration
- The method is to be published in the DID Method Registry.
- Initial status: provisional.
12. Test Vectors
- Example 1:
did:ndc:0xdfc8044a202f08b9c8df2e42f746355575816828→ seeexamples/ndc-1.json(This implies a valid DID Document file exists at this path in your repository).
13. References
- [W3C DID Core v1.0]: https://www.w3.org/TR/did-core/
- [W3C DID Resolution]: https://www.w3.org/TR/did-resolution/
- [W3C Security Vocabulary]: https://w3id.org/security/v1
- [W3C Controlled Identifiers and Multikey]: https://w3c.github.io/cid/
- [EcdsaSecp256k1VerificationKey2019]: https://w3c-ccg.github.io/data-integrity-spec/#EcdsaSecp256k1VerificationKey2019