🆔 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

한국 일반 인프라 매핑 (제2장)

한국 일반 인프라 — 과기정통부(MSIT)·행정안전부(MOIS)·KISA·KCMVP·NIS·NIA·TTA·KATS·KOLAS·ETRI·KAIST·KIST·KISTI·POSTECH·서울대·연세대·고려대·삼성·LG·SK·KT·LG U+·NAVER·카카오 협력 표준화 작업반 운영 중. 「개인정보 보호법」(법률 제19234호, 2024년 9월 시행)·「전자정부법」·「전자서명법」·「정보통신망법」·「정보통신기반 보호법」·「데이터 산업법」·「공공데이터법」·「인공지능 기본법」 적용. KS X ISO/IEC 27001/27017/27018/27040/27701·ISMS-P·KCMVP·KS X ISO/IEC 18033 (암호)·KS X ISO/IEC 19790 (암호모듈)·KS X ISO/IEC 15408 (Common Criteria) 한국 프로파일 적용. NIA「ICT 표준화 추진체계 운영」·KISA「개인정보보호 종합 포털」·MSIT「K-디지털 2030」 로드맵 운영 중.

한국 산업·연구·교육 인프라 종합 매핑

한국의 산업 생태계와 표준화 체계는 다음 핵심 인프라로 구성된다. 한국 5대 그룹: 삼성·현대자동차·LG·SK·롯데. 각 그룹별 표준화 위원회와 ISO/IEC TC 한국 간사 활동. 삼성전자(반도체·디스플레이·가전·통신)·현대차(자동차·모빌리티)·LG전자(가전·디스플레이·OLED)·SK하이닉스(메모리)·LG에너지솔루션·삼성SDI(이차전지)·POSCO퓨처엠(소재)·현대모비스(부품). 한국 IT 빅테크: NAVER (검색·클라우드·AI 하이퍼클로바)·카카오(메신저·결제·모빌리티·뱅킹)·쿠팡(이커머스·물류)·당근마켓·토스·우아한형제들. 한국 통신3사: SK텔레콤·KT·LG U+. 5G·5G 특화망·B2B 클라우드·AI 사업 운영. 한국 7대 거점 대학: 서울대·KAIST·POSTECH·연세대·고려대·UNIST·DGIST·GIST. 모두 표준화 R&D 거점이며 ISO/IEC/IEEE 한국 의장 활동 중. 한국 정부 산하 출연연구기관(국립연구원·정출연 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. 한국 산업단지·테크밸리: 판교 테크노밸리·동탄·광교·송도 IBD·여의도·강남·시화·반월·구미·울산·창원·거제·여수·울산미포·온산·청주·익산·광양·여수·포스코 광양제철소·아산만·서산·송도·인천공항·세종·청라·검단. 한국 무역·금융 인프라: 한국무역협회(KITA)·대한무역투자진흥공사(KOTRA)·한국수출입은행(KEXIM)·한국은행·국민은행·신한·하나·우리·NH농협·기업은행·SC제일·시티·HSBC 한국·DBS 한국 등 14대 한국 은행과 외국계 은행. 한국 K-POP·K-콘텐츠: HYBE·SM·YG·JYP 4대 엔터테인먼트 회사·CJ ENM·tvN·MBC·KBS·SBS·EBS·YTN·연합뉴스TV·JTBC 한국 방송사·NETFLIX 코리아·디즈니플러스·티빙·웨이브·왓챠·쿠팡플레이. 한국 게임 산업: 넥슨·엔씨소프트·크래프톤·넷마블·카카오게임즈·펄어비스·컴투스·게임빌·NHN·스마일게이트·웹젠. 한국 자동차·이차전지: 현대자동차·기아·제네시스·LG에너지솔루션·삼성SDI·SK On·POSCO퓨처엠·에코프로·엘앤에프 이차전지 양극재 공급사. 한국 반도체: 삼성전자(HBM3E·HBM4)·SK하이닉스(HBM3E 12-Hi)·DB하이텍·SK실트론·SK엔펄스·동진세미켐·서울반도체·심텍·삼성디스플레이·LG디스플레이.

한국 표준화 인프라 종합 매핑

한국의 산업·기술 표준화는 다음 협력 체계를 통해 운영된다. 국가표준 거버넌스: 국가표준심의회(국무총리실 소속, 「국가표준기본법」 제5조)·국가기술표준원(KATS)·식품의약품안전처(MFDS)·산업통상자원부(MOTIE)·과학기술정보통신부(MSIT)·행정안전부(MOIS)·환경부(MOE)·보건복지부(MOHW)·국방부(MND)·문화체육관광부(MCST)·외교부(MOFA)·법무부(MOJ)·금융위원회(FSC). 한국 인정기구·시험기관: 한국인정기구(KOLAS, Korea Laboratory Accreditation Scheme)·한국제품인정기관(KAS)·한국시험인증연구원(KTC)·한국화학융합시험연구원(KTR)·한국산업기술시험원(KTL)·한국건설생활환경시험연구원(KCL)·KOLAS 인정 시험기관 800+개·KAS 인정 인증기관 50+개. 전기·전자·통신 인증: 방송통신위원회(KCC)·한국방송통신전파진흥원(KCA)·정보통신기술협회(TTA)·정보통신기획평가원(IITP)·정보통신산업진흥원(NIPA)·한국인터넷진흥원(KISA, Korea Internet & Security Agency)·KCMVP (국가용 암호모듈 검증제도)·NIS(국가정보원)·NSR(국가보안기술연구소)·NCSC(국가사이버안보센터). 국가 R&D 거점: 한국과학기술연구원(KIST)·한국전자통신연구원(ETRI)·한국과학기술원(KAIST)·서울대학교·연세대학교·고려대학교·POSTECH·UNIST·GIST·DGIST·한국과학기술정보연구원(KISTI)·한국에너지기술연구원(KIER)·한국기계연구원(KIMM)·한국화학연구원(KRICT)·한국식품연구원(KFRI)·한국생명공학연구원(KRIBB). 국제 표준 협력: ISO TC/SC 한국 간사·IEC TC/SC 한국 간사·ITU-T SG 한국 의장·3GPP RAN/SA 한국 의장·IEEE 802 한국 의장·W3C 한국지부·OASIS 한국지부·IETF 한국 협력단·OECD CSTP·UN ESCAP·APEC SCSC 한국 협력. 한국 표준 카탈로그: KS X (정보) 25,000+종·KS A (기본) 15,000+종·KS B (기계) 25,000+종·KS C (전기) 18,000+종·KS D (금속) 12,000+종·KS E (광산) 5,000+종·KS F (건설) 18,000+종·KS H (식품) 8,000+종·KS I (환경) 5,000+종·KS J (생물) 3,000+종·KS K (섬유) 15,000+종·KS L (요업) 7,000+종·KS M (화학) 12,000+종·KS P (의료) 5,000+종·KS Q (품질) 4,000+종·KS R (수송기계) 12,000+종·KS S (서비스) 3,000+종·KS T (포장) 4,000+종·KS V (조선) 5,000+종·KS W (항공) 3,000+종 — 총 220,000+ 한국산업표준(KS). 「개인정보 보호법」(법률 제19234호, 2024년 9월 15일 시행)·「전자정부법」·「전자서명법」·「정보통신망법」·「정보통신기반 보호법」·「데이터 산업법」·「공공데이터법」·「인공지능 기본법」(법률 제20212호, 2026년 7월 시행)·「산업기술혁신 촉진법」·「과학기술기본법」 등 70+개 한국 표준화 관련 법령이 운영된다.

한국 디지털 전환·표준화 상세 매핑

한국의 디지털 전환과 표준화는 다음 협력 체계로 운영된다. 디지털 정부: 디지털플랫폼정부위원회(2022년 9월 신설, 대통령 직속)·행정안전부 디지털정부국·전자정부지원센터·정부24·국민비서·KDIS(한국정보화진흥원)·NIA(한국지능정보사회진흥원)·MOIS(행정안전부). K-DNS 인프라: 한국인터넷진흥원(KISA) Korea Internet Center·KISA DNS Root Server·KRNIC(한국인터넷정보센터)·BGP Korea·국가사이버안보센터(NCSC)·KCC(방송통신위원회)·과기정통부(MSIT)·NIA·NIPA. 한국 클라우드 인프라: KT 클라우드·NAVER 클라우드 (NCloud)·삼성 SDS 클라우드·LG U+ 클라우드·NHN 클라우드·카카오엔터프라이즈 클라우드·SK텔레콤 클라우드·KISA 「클라우드 보안 인증제(CSAP)」·KCMVP 검증 클라우드·ISMS-P (정보보호 및 개인정보보호 관리체계). 한국 보안 인증: KISA ISMS-P 인증·KCMVP (국가용 암호모듈 검증제도)·국가정보원 NIS 「국가용 암호기술 운영기준」·NCSC 「국가사이버안보전략 2024-2028」·CC (Common Criteria) 한국 평가기관·EAL4·EAL5·KS X ISO/IEC 15408·19790·24759 한국 프로파일. 한국 데이터 표준: 한국지능정보사회진흥원(NIA) AI Hub·국가 데이터 표준화 위원회·통계청(KOSTAT)·MyData 4개 결합전문기관 (삼성SDS·한국신용정보원·통계청·금융결제원)·국립국어원 한국어 정보처리 표준·국가법령정보센터·국가공간정보플랫폼·국가공간데이터센터·한국공간정보표준. 금융·핀테크 표준: 금융위원회(FSC)·금융감독원(FSS)·금융정보분석원(FIU)·한국은행(BOK)·금융보안원(FSEC)·금융결제원(KFTC)·한국예탁결제원(KSD)·한국거래소(KRX) 8개 기관 협력. 5G/6G 통신 인프라: 5G 가입자 3,500만 명 (2024)·5G 기지국 350,000개·6G 상용화 목표 2028년·5G 특화망 16개 사업자·6G 가속화 추진단(MSIT, 2024) 운영. K-콘텐츠: 한국콘텐츠진흥원(KOCCA)·문화체육관광부(MCST)·한국방송통신전파진흥원(KCA)·한국문화정보원·한국영상자료원·한국출판문화산업진흥원. 「데이터3법」 (개인정보 보호법·신용정보법·정보통신망법, 2020년 시행)·「데이터 산업법」(2021)·「공공데이터법」(2013)·「인공지능 기본법」(2026)·「디지털플랫폼정부 기본법」(2024 발의) 등 한국 디지털 전환 핵심 법령이 운영 중이다.