Decentralized Identifiers (DIDs) are a type of globally unique identifier that enables verifiable, decentralized digital identity. Unlike traditional identifiers, DIDs are:
- Self-sovereign: Controlled by the identity owner, not a central authority
- Persistent: Do not require the continued operation of an underlying organization
- Cryptographically verifiable: Allow the controller to prove control without requiring permission
A DID looks like this: did:method:specific-idstring, where the method specifies how the DID operates.
graph TD
subgraph "DID Structure"
DID["did:method:specificId"]
DID --> Method["Method (e.g., key, web, ethereum)"]
DID --> Identifier["Method-Specific Identifier"]
DID --- Document["DID Document"]
Document --> VerificationMethods["Verification Methods (Keys)"]
Document --> Authentication["Authentication Methods"]
Document --> Services["Service Endpoints"]
end
LearnCard supports multiple DID methods, each with different characteristics:
| DID Method | Description | Common Use Case |
|---|---|---|
| did:key | Generates a digital ID directly from a cryptographic key, often stored locally (e.g., in a JWK file). | Simple IDs tied directly to a specific crypto key. |
| did:web | Uses a standard website address (domain name) to make a digital ID's information publicly and securely findable online. | Digital IDs for organizations or websites. |
| did:pkh | Creates a digital ID directly from a public blockchain address (like a crypto wallet address), supporting multiple blockchain types through a common standard (CAIP). | Linking digital IDs to various blockchain accounts. |
| did:jwk | Directly transforms a cryptographic key (in JWK format) into a full digital ID and its associated information. | Representing a cryptographic key as a complete digital ID. |
| did:test | Generates sample digital IDs and related data, specifically for testing software that uses DIDs. | Testing and ensuring DID systems work correctly. |
| did:ethr | A widely-used method for digital IDs on the Ethereum blockchain, common in many Web3 applications. | Digital IDs for apps and services on Ethereum. |
| did:ion | Creates highly scalable and decentralized digital IDs using the Bitcoin network, secured by the Sidetree protocol. | Scalable and secure IDs on the Bitcoin blockchain. |
| did:tezos | Creates digital IDs that are linked to accounts on the Tezos blockchain. | Digital IDs for users and apps on Tezos. |
| Proof Type | Description | Common Use Case |
| RSASignature2018 | A widely recognized digital signature method using RSA cryptography, common in traditional web security. | Verifying authenticity in systems familiar with established RSA standards. |
| Ed25519VerificationKey2018 / Ed25519Signature2018 | A modern, fast, and secure digital signature method using Ed25519 keys. | High-performance, secure verification in newer systems and many blockchains. |
| EcdsaSecp256k1Signature2019 | A digital signature method widely used by Bitcoin, Ethereum, and other blockchain platforms (uses the secp256k1 curve). | Securing transactions and identities in many popular blockchain ecosystems. |
| EcdsaSecp256r1Signature2019 | A digital signature method commonly used in web security (like TLS/SSL) and various industry standards (uses the P-256 curve). | Ensuring authenticity in standard web communications and enterprise applications. |
| EcdsaSecp256k1RecoverySignature2020 | A specialized digital signature (secp256k1 curve) where the signer's public key (or address) can be found directly from the signature itself. | Creating compact proofs in systems like Ethereum where sender identity is derived. |
| Eip712Signature2021 | A way to sign structured, human-readable data on Ethereum, making it clearer to users what they are approving. | User-friendly signing of detailed information in Ethereum applications. |
| JsonWebSignature2020 (JWS) | A standard method for creating digital signatures using JSON, offering flexibility with different signature algorithms. | Securely signing data for web applications and APIs, commonly used with JWTs. |
When using the LearnCard Wallet SDK, the ID control plane provides standardized methods for working with DIDs:
sequenceDiagram
participant App as Application
participant LC as LearnCard Wallet SDK
participant IdPlane as ID Control Plane
App->>LC: learnCard.id.did("key")
LC->>IdPlane: Generate DID using key method
IdPlane-->>LC: Return "did:key:z6Mk..."
LC-->>App: "did:key:z6Mk..."
App->>LC: learnCard.id.keypair("Ed25519")
LC->>IdPlane: Generate Ed25519 keypair
IdPlane-->>LC: Return JWK
LC-->>App: {kty: "OKP", crv: "Ed25519", ...}