Verification methods are cryptographic material expressed in a DID document that enables a DID controller to prove control over a DID. Think of verification methods as the digital equivalent of keys, credentials, or other proof mechanisms that establish trustworthiness in physical encounters.
In the DID architecture, verification methods provide the foundation for all trust operations, enabling:
At their core, verification methods answer a fundamental question: "How can I verify that the entity claiming control of this DID is actually authorized to do so?"
Each verification method in a DID document follows a standard structure designed for clear expression of cryptographic material and its intended use.
A verification method typically includes these elements:
Here's an example of a verification method expressed in a DID document:
In this example:
did:example:123#key-1
did:example:123
Verification methods can be either:
For instance, consider these equivalent approaches for authentication:
Referenced verification methods promote reusability and reduce redundancy within DID documents, particularly when the same cryptographic material serves multiple verification relationships.
The DID Core specification supports several formats for expressing verification material to accommodate different cryptographic algorithms and representation formats.
The W3C DID Core specification defines several standard properties for expressing public keys:
Property Name | Description | Example |
---|---|---|
publicKeyMultibase | Public key encoded using the multibase format | "publicKeyMultibase": "zH3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" |
publicKeyJwk | Public key in JSON Web Key format | "publicKeyJwk": {"kty": "EC", "crv": "secp256k1", "x": "...", "y": "..."} |
publicKeyHex | Public key in hexadecimal format (deprecated) | "publicKeyHex": "02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71" |
Different DID methods may support or require specific formats. For interoperability, the DID Core specification recommends newer formats like multibase encoding, which provides self-describing, unambiguous representations of binary data.
While public key cryptography is the most common approach, verification methods can potentially include other proof mechanisms:
Verification relationships express how verification methods can be used for different purposes. The DID Core specification defines five standard verification relationships, each with a specific function in the DID ecosystem.
The authentication relationship designates which verification methods can be used to prove control over a DID for authentication purposes. When a system challenges the controller of a DID to authenticate, the controller uses a private key corresponding to one of the verification methods listed in the authentication relationship.
In this example, either key-1 or key-2 can be used to authenticate as the controller of this DID.
The assertionMethod relationship identifies verification methods that can be used to assert statements on behalf of the DID subject. This relationship is crucial for creating verifiable credentials, where the issuer needs to cryptographically sign assertions about an entity.
This indicates that key-3 is authorized to make assertions (such as issuing verifiable credentials) on behalf of this DID.
The keyAgreement relationship designates verification methods used for encrypted communications with the DID subject. These methods typically employ public key encryption algorithms that support secure key exchange.
In this case, a specific X25519 encryption key is designated for establishing secure communication channels.
The capabilityInvocation relationship identifies verification methods that can be used to invoke capabilities (authorized actions) as the DID subject. This enables object capability-based security models where specific authorization must be presented to perform certain actions.
This example shows that key-4 can be used to invoke capabilities (perform authorized actions) as this DID.
The capabilityDelegation relationship identifies verification methods that can be used to delegate capabilities on behalf of the DID subject. This allows the controller to authorize others to act on their behalf in specific ways.
This indicates that key-5 can be used to delegate capabilities (grant permissions) to others on behalf of this DID.
The distinction between verification methods and verification relationships is crucial for understanding the DID security model:
This separation creates a flexible, fine-grained security model where different keys can be authorized for different purposes, following the principle of least privilege.
For example, a DID document might include:
Vidos provides a comprehensive framework for managing verification methods across different DID methods, offering:
The Vidos verifier service provides a consistent API for verification operations while supporting multiple cryptographic algorithms and DID methods. This allows applications to:
Different DID methods may use specialized verification approaches based on their underlying technology. Vidos supports these through:
Proper management of verification methods requires careful handling of both public and private keys. Vidos provides:
When working with verification methods in DIDs, consider these recommended practices:
The landscape of cryptographic verification continues to evolve, with several emerging trends likely to affect DIDs:
Verification methods form the cornerstone of trust in the DID ecosystem by providing the cryptographic means to prove control, make assertions, establish secure communications, and manage capabilities. By carefully designing your verification method strategy, you can create DID documents that balance security, privacy, and usability while enabling the full range of interactions in decentralized identity systems.