🆔 Chapter 2: Decentralized Identifiers (DIDs)

WIA-FIN-010 Digital Identity Standard | Part 2 of 8

In this chapter: We explore Decentralized Identifiers (DIDs), the W3C standard that provides globally unique, user-controlled identifiers. You'll learn DID syntax, methods, document structure, resolution, and how DIDs enable self-sovereign identity.

2.1 What Are Decentralized Identifiers?

At the heart of self-sovereign identity lies a deceptively simple innovation: a new type of identifier that you create and control yourself, without permission from any central authority. These are called Decentralized Identifiers, or DIDs.

Traditional identifiers—email addresses, usernames, social security numbers—are all issued and controlled by someone else. Your email address belongs to Gmail or Outlook. Your username is subject to the platform's terms of service. Your SSN is assigned and managed by the government. You're merely the subject of these identifiers, not their owner.

DIDs flip this model completely. When you create a DID:

💡 Key Insight

A DID is to traditional identifiers what Bitcoin is to traditional currency: a way to have ownership and control without depending on a central authority. Just as you can create a Bitcoin address yourself and hold the private keys, you can create a DID and hold the cryptographic keys that prove it's yours.

2.2 W3C DID Specification

The World Wide Web Consortium (W3C)—the standards body that maintains the web's core technologies—published the Decentralized Identifiers specification as an official standard in July 2022. This was a landmark moment: DIDs became as official and standardized as URLs, HTML, and other web technologies.

2.2.1 DID Syntax

A DID follows a simple, standardized format:

did:method:method-specific-identifier

Let's break this down:

Examples of real DIDs:

did:ethr:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736
did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH
did:web:example.com
did:ion:EiClkZMDxPKqC9c-umQfTkR8vvZ9JPhl_xLDI9Nfk38w5w
did:sov:WRfXPg8dantKVubE3HX8pw

2.2.2 DID Methods

Different DID methods store and resolve DID documents in different ways. Each method has trade-offs regarding decentralization, cost, performance, and features. Here are the most important methods:

Method Full Name Storage Best For
did:ethr Ethereum DID Ethereum blockchain Ethereum ecosystem integration
did:key Key DID No storage (derived from key) Simple, offline use cases
did:web Web DID Web server Organizations with existing domains
did:ion ION (Bitcoin) Bitcoin blockchain High security, Bitcoin users
did:sov Sovrin Sovrin ledger Enterprise SSI deployments
did:peer Peer DID Peer-to-peer Private, pairwise relationships

did:ethr (Ethereum): Stores DID documents on Ethereum or Ethereum-compatible blockchains. Widely adopted in crypto/DeFi. Gas fees apply for updates. Fully decentralized and censorship-resistant.

did:key: The simplest method. The DID is derived directly from a cryptographic public key. No blockchain or storage needed. Perfect for simple peer-to-peer use cases. Limitation: can't update or rotate keys.

did:web: Uses existing web infrastructure. The DID document is hosted at a well-known URL on your domain. Easy to deploy, leverages DNS and HTTPS. Trade-off: relies on centralized web infrastructure.

did:ion: Built on Bitcoin using the Sidetree protocol. Offers Bitcoin's security with efficient, scalable operations. No cryptocurrency required to use it. Good balance of decentralization and usability.

did:sov: The Sovrin Network, one of the earliest SSI implementations. Permissioned ledger operated by trusted stewards. Strong governance model. Popular in enterprise deployments.

did:peer: For private, peer-to-peer relationships. Two parties exchange DIDs directly without any public registration. Perfect for private messaging, confidential business relationships, etc.

2.3 DID Documents

A DID by itself is just a string—an identifier. The real power comes from what it points to: a DID Document. This is a JSON-LD document that contains public keys, authentication methods, service endpoints, and other metadata about the DID.

2.3.1 Anatomy of a DID Document

Here's a complete example of a DID document:

{
  "@context": [
    "https://www.w3.org/ns/did/v1",
    "https://w3id.org/security/suites/ed25519-2020/v1"
  ],
  "id": "did:example:123456789abcdefghi",
  "authentication": [
    {
      "id": "did:example:123456789abcdefghi#keys-1",
      "type": "Ed25519VerificationKey2020",
      "controller": "did:example:123456789abcdefghi",
      "publicKeyMultibase": "zH3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
    }
  ],
  "assertionMethod": [
    "did:example:123456789abcdefghi#keys-1"
  ],
  "keyAgreement": [
    {
      "id": "did:example:123456789abcdefghi#keys-2",
      "type": "X25519KeyAgreementKey2020",
      "controller": "did:example:123456789abcdefghi",
      "publicKeyMultibase": "z9hFgmPVfmBZwRvFEyniQDBkz9LmV7gDEqytWyGZLmDXE"
    }
  ],
  "service": [
    {
      "id": "did:example:123456789abcdefghi#messaging",
      "type": "MessagingService",
      "serviceEndpoint": "https://example.com/messaging"
    },
    {
      "id": "did:example:123456789abcdefghi#credentials",
      "type": "CredentialRepositoryService",
      "serviceEndpoint": "https://credentials.example.com"
    }
  ]
}

2.3.2 Core Components

@context: Defines the JSON-LD context, specifying what vocabularies and standards this document uses. Required for interoperability.

id: The DID this document describes. Must match the DID being resolved.

authentication: Public keys or methods used to authenticate as the DID subject. When you prove you control a DID, you typically sign something with a key listed here.

assertionMethod: Keys used for making claims or issuing credentials. If you issue a verifiable credential using this DID, you'd sign it with an assertion method key.

keyAgreement: Keys for encrypted communication. When someone wants to send you an encrypted message, they use your key agreement key.

service: Endpoints for services related to this DID. Could be messaging services, credential repositories, social media profiles, etc.

Additional optional properties include capabilityInvocation (for invoking capabilities), capabilityDelegation (for delegating capabilities to others), and controller (who controls this DID).

2.4 Cryptographic Keys in DIDs

Cryptographic keys are fundamental to DIDs. They prove ownership, enable authentication, sign credentials, and encrypt communications. Understanding key types and their uses is crucial.

2.4.1 Common Key Types

Ed25519: Fast, secure signature algorithm. Most common choice for DIDs. Small key and signature sizes. Widely supported. Good default choice.

secp256k1: The same curve used by Bitcoin and Ethereum. Choose this if integrating with crypto wallets and blockchain systems. Allows using existing Ethereum keys as DIDs.

RSA: Traditional public-key cryptography. Larger keys but widely supported in legacy systems. Good for compatibility with existing infrastructure.

X25519: Designed for key agreement (Diffie-Hellman). Perfect for encrypted communication. Often paired with Ed25519 (same elliptic curve, different purposes).

2.4.2 Key Purposes

Different keys serve different purposes in DID documents:

Purpose Use Case Example
Authentication Prove you control the DID Logging into a website with your DID
Assertion Method Sign claims and credentials University issuing your degree credential
Key Agreement Encrypted communication Receiving encrypted messages
Capability Invocation Invoke authorized capabilities Executing smart contract functions
Capability Delegation Delegate authority to others Allowing assistant to act on your behalf

2.4.3 Key Management and Rotation

One of DIDs' most powerful features is the ability to rotate keys without changing the identifier. If your private key is compromised, you can update your DID document with a new key. The DID stays the same, but the old compromised key is removed.

This is impossible with traditional identifiers. If your email password is compromised, you can change it, but if the email address itself is burned, you need a new address. DIDs separate the identifier from the cryptographic material, enabling safer key management.

🔐 Best Practice: Key Rotation

Regularly rotate your keys even if not compromised. Like changing passwords periodically, key rotation limits the damage if keys are ever stolen. The frequency depends on security requirements: every 90 days for high-security applications, yearly for personal use.

2.5 DID Resolution

Creating a DID and a DID document is only half the picture. The other half is resolution—how does someone take a DID string and retrieve the associated DID document?

2.5.1 The Resolution Process

When you encounter a DID like did:ethr:0x123..., resolution happens in these steps:

  1. Parse the DID: Extract the method (ethr) and method-specific identifier
  2. Identify the resolver: Use the appropriate DID method resolver for that method
  3. Retrieve the document: The resolver fetches the DID document from wherever it's stored (blockchain, web server, etc.)
  4. Validate: Ensure the document is properly formatted and hasn't been tampered with
  5. Return: Provide the DID document to the application

2.5.2 Universal Resolver

Because different DID methods resolve differently, the Decentralized Identity Foundation created the Universal Resolver—a service that can resolve any DID method. You send it any DID, and it routes to the appropriate method-specific resolver.

This is crucial for interoperability. Applications don't need to implement every DID method; they just integrate with the Universal Resolver.

// Resolving a DID using the Universal Resolver
const response = await fetch(
  'https://resolver.identity.foundation/1.0/identifiers/did:ethr:0x123...'
);
const didDocument = await response.json();

2.6 Creating and Managing DIDs

Let's walk through practical examples of creating and managing DIDs using different methods.

2.6.1 Creating a did:key

The simplest method—create a DID from a cryptographic key pair:

import { generateKeyPair } from '@noble/ed25519';
import { base58btc } from 'multiformats/bases/base58';

// Generate Ed25519 key pair
const privateKey = generateKeyPair();
const publicKey = privateKey.slice(32); // Ed25519 public key

// Encode as multibase
const publicKeyMultibase = 'z' + base58btc.encode(publicKey);

// DID is just the key
const did = `did:key:${publicKeyMultibase}`;

console.log(did);
// did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH

The DID document is deterministically generated from the key. No storage needed!

2.6.2 Creating a did:ethr

For Ethereum-based DIDs:

import { Wallet } from 'ethers';
import { EthrDID } from 'ethr-did';

// Create Ethereum wallet
const wallet = Wallet.createRandom();

// Create DID (Ethereum address)
const did = `did:ethr:${wallet.address}`;

// Create DID instance
const ethrDid = new EthrDID({
  identifier: wallet.address,
  privateKey: wallet.privateKey
});

console.log(did);
// did:ethr:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736

2.6.3 Creating a did:web

For web-based DIDs, you host the DID document on your domain:

  1. Create a DID document (like the example in section 2.3.1)
  2. Host it at https://yourdomain.com/.well-known/did.json
  3. Your DID is did:web:yourdomain.com

For a subdomain or path:

2.7 Advanced DID Concepts

2.7.1 DID Controllers

A DID can be controlled by a different DID. This enables powerful delegation and guardian scenarios:

{
  "id": "did:example:child123",
  "controller": "did:example:parent456",
  "authentication": ["did:example:parent456#key-1"]
}

Here, the child's DID is controlled by the parent's DID. The parent can authenticate as the child. Useful for:

2.7.2 Pairwise DIDs

For privacy, create a unique DID for each relationship. Instead of one DID for everything, generate a new DID for each person or organization you interact with. They can't correlate your activities across different contexts.

Example: You have DID-A for your bank, DID-B for your employer, DID-C for healthcare provider. Even if they collude, they can't link these DIDs to the same person.

2.7.3 DID Deactivation

DIDs can be deactivated when no longer needed. The DID document includes a deactivated flag. After deactivation, the DID cannot be reactivated (preventing resurrection attacks).

{
  "id": "did:example:123",
  "deactivated": true
}

Chapter Summary

Korea Industrial, Research, Education Infrastructure Mapping

Korea operates its industrial ecosystem and standardization system through the following core infrastructure. Korea Top 5 Groups: Samsung, Hyundai Motor, LG, SK, Lotte. Each group operates standardization committees and ISO/IEC TC Korean secretariats. Samsung Electronics (semiconductors, displays, home appliances, telecom)·Hyundai Motor (automobiles, mobility)·LG Electronics (home appliances, displays, OLED)·SK hynix (memory)·LG Energy Solution·Samsung SDI (batteries)·POSCO Future M (materials)·Hyundai Mobis (parts). Korean IT Big Tech: NAVER (search, cloud, AI HyperCLOVA)·Kakao (messenger, payment, mobility, banking)·Coupang (e-commerce, logistics)·Karrot Market·Toss·Woowa Brothers. Korea Telcos: SK Telecom·KT·LG U+. 5G·5G dedicated networks·B2B cloud·AI businesses operating. Korea Top 7 Research Universities: Seoul National University·KAIST·POSTECH·Yonsei University·Korea University·UNIST·DGIST·GIST. All serve as standardization R&D bases and ISO/IEC/IEEE Korean chairs. Korea Government-affiliated National Research Institutes (26): KIST, KAERI, KIMM, KIER, KFRI, KRICT, KRIBB, KARI, KASI, KIGAM, KICT, KISTI, KETI, ETRI, NIMS, KIMS, KISDI, KOTRA, STEPI, KOEN, KICCE, KIET, KIPF, KIHASA, KICJ, KLRI. Korea Industrial Complexes / Tech Valleys: Pangyo Techno Valley·Dongtan·Gwanggyo·Songdo IBD·Yeouido·Gangnam·Sihwa·Banwol·Gumi·Ulsan·Changwon·Geoje·Yeosu·Onsan·Cheongju·Iksan·Gwangyang·POSCO Gwangyang Steel Mill·Asan Bay·Seosan·Songdo·Incheon Airport·Sejong·Cheongna·Geomdan. Korea Trade and Finance Infrastructure: Korea International Trade Association (KITA)·Korea Trade-Investment Promotion Agency (KOTRA)·Export-Import Bank of Korea (KEXIM)·Bank of Korea·Kookmin Bank·Shinhan·Hana·Woori·NH Nonghyup·IBK Industrial Bank·SC First Bank·Citi Bank Korea·HSBC Korea·DBS Korea — 14 Korean major banks and foreign banks. Korea K-POP / K-Content: HYBE·SM·YG·JYP 4 major entertainment companies·CJ ENM·tvN·MBC·KBS·SBS·EBS·YTN·Yonhap News TV·JTBC Korean broadcasting·NETFLIX Korea·Disney Plus·TVING·Wavve·Watcha·Coupang Play. Korea Gaming Industry: Nexon·NCsoft·Krafton·Netmarble·Kakao Games·Pearl Abyss·Com2uS·Gamevil·NHN·Smilegate·Webzen. Korea Automotive / Battery: Hyundai Motor·Kia·Genesis·LG Energy Solution·Samsung SDI·SK On·POSCO Future M·EcoPro·L&F battery cathode material suppliers. Korea Semiconductor: Samsung Electronics (HBM3E·HBM4)·SK hynix (HBM3E 12-Hi)·DB HiTek·SK siltron·SK Enpulse·Dongjin Semichem·Seoul Semiconductor·Simmtech·Samsung Display·LG Display.

Korea Standardization Infrastructure Mapping

Korea operates a comprehensive standards governance system through inter-ministerial cooperation. National Standards Council (under Prime Minister's Office, per Framework Act on National Standards Article 5) coordinates KATS (Korean Agency for Technology and Standards), MFDS (Ministry of Food and Drug Safety), MOTIE (Ministry of Trade, Industry and Energy), MSIT (Ministry of Science and ICT), MOIS (Ministry of the Interior and Safety), MOE (Ministry of Environment), MOHW (Ministry of Health and Welfare), MND (Ministry of National Defense), MCST (Ministry of Culture, Sports and Tourism), MOFA (Ministry of Foreign Affairs), MOJ (Ministry of Justice), and FSC (Financial Services Commission). Accreditation and Testing: KOLAS (Korea Laboratory Accreditation Scheme) accredits 800+ testing laboratories. KAS (Korea Accreditation System) accredits 50+ certification bodies. KTC (Korea Testing Certification), KTR (Korea Testing & Research Institute), KTL (Korea Testing Laboratory), and KCL (Korea Conformity Laboratories) provide conformance testing. Telecom and Cyber: KCC (Korea Communications Commission), KCA (Korea Communications Agency), TTA (Telecommunications Technology Association), IITP (Institute for Information & Communications Technology Planning & Evaluation), NIPA (National IT Industry Promotion Agency), KISA (Korea Internet & Security Agency), KCMVP (Korea Cryptographic Module Validation Program), NIS (National Intelligence Service), NSR (National Security Research Institute), and NCSC (National Cyber Security Center). National R&D Centers: KIST, ETRI, KAIST, Seoul National University, Yonsei University, Korea University, POSTECH, UNIST, GIST, DGIST, KISTI, KIER, KIMM, KRICT, KFRI, KRIBB. International Standards Cooperation: ISO TC/SC Korean secretariats, IEC TC/SC Korean secretariats, ITU-T Study Group Korean chairs, 3GPP RAN/SA Korean chairs, IEEE 802 Korean chairs, W3C Korea office, OASIS Korea office, IETF Korea cooperation, OECD CSTP, UN ESCAP, APEC SCSC Korean cooperation. Korean Industrial Standards (KS) Catalog: KS X (Information) 25,000+, KS A (Basic) 15,000+, KS B (Machinery) 25,000+, KS C (Electrical) 18,000+, KS D (Metallurgy) 12,000+, KS E (Mining) 5,000+, KS F (Construction) 18,000+, KS H (Food) 8,000+, KS I (Environment) 5,000+, KS J (Biology) 3,000+, KS K (Textile) 15,000+, KS L (Ceramics) 7,000+, KS M (Chemistry) 12,000+, KS P (Medical) 5,000+, KS Q (Quality Mgmt) 4,000+, KS R (Transport) 12,000+, KS S (Service) 3,000+, KS T (Packaging) 4,000+, KS V (Shipbuilding) 5,000+, KS W (Aerospace) 3,000+ — totaling 220,000+ Korean Industrial Standards. Key Acts: Personal Information Protection Act (Act 19234, effective Sept 15, 2024), Electronic Government Act, Electronic Signature Act, Act on Promotion of Information and Communications Network Utilization and Information Protection, Information and Communications Infrastructure Protection Act, Data Industry Act, Public Data Act, AI Framework Act (Act 20212, effective July 2026), Industrial Technology Innovation Promotion Act, Framework Act on Science and Technology — 70+ Korean standardization-related laws.

Korea Digital Transformation Detailed Mapping

Korea operates digital transformation through a comprehensive governance system. Digital Government: Digital Platform Government Committee (established September 2022, under the President)·Ministry of the Interior and Safety Digital Government Bureau·e-Government Support Center·Gov.kr·National Citizen Service·KDIS (Korea Digital Information Society)·NIA (National Information Society Agency)·MOIS (Ministry of the Interior and Safety). K-DNS Infrastructure: Korea Internet & Security Agency (KISA) Korea Internet Center·KISA DNS Root Server·KRNIC (Korea Network Information Center)·BGP Korea·National Cyber Security Center (NCSC)·KCC (Korea Communications Commission)·MSIT (Ministry of Science and ICT)·NIA·NIPA. Korean Cloud Infrastructure: KT Cloud·NAVER Cloud (NCloud)·Samsung SDS Cloud·LG U+ Cloud·NHN Cloud·Kakao Enterprise Cloud·SK Telecom Cloud·KISA Cloud Security Assurance Program (CSAP)·KCMVP-validated cloud·ISMS-P (Information Security & Personal Information Management System). Korean Security Certifications: KISA ISMS-P certification·KCMVP (Korean Cryptographic Module Validation Program)·NIS (National Intelligence Service) "National Cryptographic Technology Operation Standards"·NCSC "National Cyber Security Strategy 2024-2028"·CC (Common Criteria) Korean evaluation bodies·EAL4·EAL5·KS X ISO/IEC 15408·19790·24759 Korean Profile. Korean Data Standards: NIA AI Hub·National Data Standardization Committee·Statistics Korea (KOSTAT)·MyData 4 Designated Combination Specialists (Samsung SDS, KICI, KOSTAT, KFTC)·National Institute of Korean Language·National Law Information Center·National Spatial Information Platform·National Spatial Data Center·Korean Spatial Information Standards. Finance and Fintech Standards: FSC (Financial Services Commission)·FSS (Financial Supervisory Service)·FIU (Financial Intelligence Unit)·BOK (Bank of Korea)·FSEC (Financial Security Institute)·KFTC (Korea Financial Telecommunications)·KSD (Korea Securities Depository)·KRX (Korea Exchange) 8-agency cooperation. 5G/6G Communications Infrastructure: 5G subscribers 35 million (2024)·5G base stations 350,000·6G commercialization target 2028·5G dedicated networks 16 operators·6G Acceleration Council (MSIT, 2024). K-Content: KOCCA (Korea Creative Content Agency)·MCST (Ministry of Culture, Sports and Tourism)·KCA (Korea Communications Agency)·Korea Culture Information Service Agency·Korean Film Archive·Korea Publishing Industry Promotion Agency. Data 3 Acts (Personal Information Protection Act·Credit Information Act·Telecommunications Network Act, 2020 enforcement)·Data Industry Act (2021)·Public Data Act (2013)·AI Framework Act (2026)·Digital Platform Government Framework Act (2024 proposed) — Korea digital transformation core legislation.