0%
#DIDs#VerifiableCredentials#Web3

Understanding Decentralized Identifiers (DIDs) and Verifiable Credentials (VCs): A Complete Guide

Comprehensive technical overview of DIDs and VCs - how they work, their components, and their role in decentralized identity systems

A

Amir Hameed Mir

December 15, 20243 min read
Understanding Decentralized Identifiers (DIDs) and Verifiable Credentials (VCs): A Complete Guide

Understanding Decentralized Identifiers (DIDs) and Verifiable Credentials (VCs)

By Amir Hameed Mir

In the evolving landscape of digital identity, Decentralized Identifiers (DIDs) and Verifiable Credentials (VCs) have emerged as foundational technologies for self-sovereign identity systems. Let's dive deep into how these technologies work together.

What are Decentralized Identifiers (DIDs)?

DIDs are a new type of identifier that enables verifiable, decentralized digital identity. Unlike traditional identifiers (email addresses, usernames), DIDs are:

  • Self-Sovereign: You control your DID, not any centralized authority
  • Verifiable: Cryptographic proofs enable trust without intermediaries
  • Decentralized: No central registry or controlling organization
  • Persistent: Designed to last indefinitely, not tied to any specific service

Anatomy of a DID

A DID consists of three main parts:

  1. The Scheme: Always begins with did: to indicate it's a Decentralized Identifier
  2. The Method: Identifies the specific DID method and registry system
  3. The Method-Specific Identifier: A unique string generated by and meaningful within that specific DID method

Detailed Breakdown:

1. Scheme (did:) This is the fixed prefix that distinguishes DIDs from other types of identifiers. The did: scheme is registered in the URI scheme registry and follows the same structural rules as other URIs (like http: or mailto:).

2. Method The method identifies the particular DID method specification being used. Each method defines:

  • How the DID is created
  • How it's resolved to a DID Document
  • How it's updated
  • How it's deactivated

Common DID methods include:

  • did:ethr: Ethereum-based DIDs
  • did:key: Simple cryptographic key DIDs
  • did:web: Web domain-based DIDs
  • did:ion: ION (Sidetree protocol on Bitcoin)
  • did:sov: Sovrin network DIDs
  • did:btcr: Bitcoin-based DIDs

3. Method-Specific Identifier This portion is unique to each DID method and typically contains:

  • Network identifiers (mainnet, testnet)
  • Account addresses or public key hashes
  • Path components or query parameters
  • Unique identifiers within the method's namespace

Examples of Complete DIDs:

text
1did:ethr:0x1234abcd...ef5678 # Ethereum address
2did:key:z6Mkf5rGM4rFpQ7XQ7XQ7XQ7XQ7XQ7 # Public key in multibase format
3did:web:example.com:users:alice # Web domain with path
4did:ion:EiClkZMDxPKqC9c-um... # ION decentralized identifier
5did:sov:STNvSUSW45A7d5zQyVZMo # Sovrin network identifier
6
6 lines
text
1KB

Method-Specific Identifier Patterns:

For did:ethr:

text
1did:ethr:[chain_id]:[ethereum_address]
2did:ethr:0x1234abcd...ef5678 # Mainnet
3did:ethr:0x5:0x1234abcd...ef5678 # Goerli testnet (chain_id: 5)
4
4 lines
text
1KB

For did:key:

text
1did:key:[multibase_encoded_public_key]
2did:key:z6Mkf5rGM4rFpQ7XQ7XQ7XQ7XQ7XQ7XQ7XQ7XQ7
3
3 lines
text
1KB

For did:web:

text
1did:web:[domain_name][:path][:fragment]
2did:web:example.com
3did:web:example.com:users:alice
4did:web:example.com:users:alice#key-1
5
5 lines
text
1KB

The Complete DID URL:

DIDs can also include additional components to form DID URLs:

text
1did:example:123456789abcdefghi/path/to/resource
2did:example:123456789abcdefghi#key-1
3did:example:123456789abcdefghi?version-id=1
4did:example:123456789abcdefghi/service-endpoint
5
5 lines
text
1KB

These DID URLs allow direct reference to specific:

  • Keys within the DID Document (#fragment)
  • Service endpoints (/path)
  • Specific versions (?query)
  • Other resources associated with the DID

Characteristics of Method-Specific Identifiers:

  1. Uniqueness: Must be globally unique within the method namespace
  2. Persistence: Should remain valid indefinitely
  3. Resolvable: Must map to exactly one DID Document
  4. Cryptographically Verifiable: Often derived from public keys
  5. Method-Defined: Structure varies by method specification

This three-part structure provides both standardization (through the did: scheme) and flexibility (through method-specific implementations), enabling DIDs to work across different blockchain networks, decentralized systems, and identity platforms while maintaining interoperability through the common W3C DID Core specification.

Tags:#DIDs#VerifiableCredentials#Web3#SelfSovereignIdentity#W3C

Enjoyed this article?

Share it with your network

A

Amir Hameed Mir

Building the future of technology through innovative research and development. We explore cutting-edge solutions in AI, systems architecture, and computational theory.

Table of Contents