This document explains DID Documents, one of the foundational elements of the W3C Decentralized Identifier (DID) specification. For a broader understanding of DIDs, see our Decentralized Identifiers explanation.
DID Documents are machine-readable documents containing information associated with a Decentralized Identifier (DID). These documents provide the cryptographic material, verification methods, and service endpoints needed to use a DID for secure, verifiable interactions.
Think of a DID Document as a public profile card for an entity (person, organization, device, or digital object) identified by a DID. The document doesn't contain personal data about the entity, but rather the cryptographic keys and services needed to verify its identity and interact with it securely.
A DID Document contains several key components that enable verification and interaction:
Every DID Document contains identifiers that establish its context:
id
property.Verification methods are cryptographic mechanisms that allow a DID controller to prove control over a DID. They typically include:
Each verification method has a unique identifier within the DID Document, enabling precise reference to specific cryptographic material.
Verification relationships express how verification methods can be used for different purposes:
Services define how to interact with the DID subject beyond cryptographic verification. Each service entry includes:
Services might include data storage endpoints, messaging services, verification credential issuers, or any other means of interacting with the DID subject.
DID Documents follow a structured data model with predefined properties. They can be serialized in different formats, with JSON and JSON-LD being the most common.
Here's a simplified overview of the DID Document structure:
The @context
property provides semantic context for the terms used in the document, enabling proper interpretation across different systems.
DID Documents can be serialized in different formats (representations):
Other formats are possible as long as they can express the complete data model.
A DID Document serves as a bridge between an identifier (the DID) and the mechanisms needed to use that identifier for secure interactions.
When someone wants to interact with a DID subject, they first need to resolve the DID to its associated DID Document:
This process allows a DID to be used for cryptographic verification without requiring a centralized authority.
The DID controller can perform operations on the DID Document, such as:
These operations are defined by the specific DID method being used and are typically secured through cryptographic proofs.
DID Documents provide several key benefits for decentralized identity systems:
By separating the cryptographic material from centralized authorities, DID Documents enable individuals and organizations to control their own digital identifiers. The controller can update verification methods and services without depending on external parties.
DID Documents establish a foundation for cryptographically verifiable digital relationships. Rather than relying on trusted intermediaries, parties can verify each other's identities and claims directly through the cryptographic material in DID Documents.
Through service endpoints, DID Documents provide a standardized way to discover how to interact with a DID subject. This creates an interoperable ecosystem of identity-linked services.
DID Documents are designed with privacy as a core principle. They contain no personal data, only the cryptographic and service information needed for secure interaction. This separation enables selective disclosure of personal information through separate, encrypted channels.
Here's a complete example of a DID Document:
In this example:
did:example:123456789abcdefghi
DID Documents work as part of a broader decentralized identity ecosystem:
DID Documents are foundational building blocks of decentralized identity systems. They provide the cryptographic material and service information needed to use DIDs for secure, verifiable interactions while maintaining privacy and self-sovereign control.
By separating identity verification from centralized authorities, DID Documents enable a more resilient, user-controlled approach to digital identity that aligns with the principles of privacy by design and decentralized control.