π― Goal
Understand the emerging decentralized identity ecosystem using DIDs (Decentralized Identifiers) and Verifiable Credentials (VCs). Learn to generate DIDs, issue/verify VCs, and explore tools for self-sovereign identity (SSI) and privacy-preserving reputation systems.
π§ 1. Why Decentralized Identity?
πͺͺ Problems with Centralized Identity
- Requires trust in issuers (Google, Facebook, governments)
- Pseudonymity is hard to maintain
- Data is siloed, monitored, or sold
- Revocation and portability are non-existent
β Goals of Self-Sovereign Identity (SSI)
- Portable, user-owned identifiers
- Cryptographically verifiable credentials
- Interoperable standards (W3C DIDs, VCs)
- No central root of trust
Identity without permission.
π§© 2. Core Concepts
π DID (Decentralized Identifier)
A URI-like format that resolves to a DID Document, e.g.:
did:key:z6MkiE3...
did:web:yourdomain.com
did:ion:EiDxyz...
π§Ύ Verifiable Credential (VC)
A signed JSON document that proves a claim (e.g. “This DID is a student at Cypherpunk School”).
π 3. Tools & Ecosystem
| Tool / Lib | Purpose |
|---|---|
didkit |
Generate, resolve, and verify DIDs |
veramo |
JavaScript DID/VC agent framework |
spruceid |
Rust + JS tools for SSI & login |
identity.com |
Identity validators & oracles |
π§ 4. Install didkit CLI
π¦ On Linux:
curl -L https://github.com/spruceid/didkit/releases/latest/download/didkit-linux-x64 -o didkit
chmod +x didkit
sudo mv didkit /usr/local/bin/
Test:
didkit --help
π§ͺ 5. Generate a DID
DID Method: did:key
didkit generate-ed25519-key > mykey.jwk
didkit key-to-did key < mykey.jwk
Output:
did:key:z6Mkr... (your DID)
DID Document:
didkit key-to-verification-method key < mykey.jwk
π 6. Issue a Verifiable Credential (VC)
Example JSON Credential:
{
"@context": ["https://www.w3.org/2018/credentials/v1"],
"id": "urn:uuid:12345678",
"type": ["VerifiableCredential"],
"issuer": "did:key:z6Mkr...",
"issuanceDate": "2025-06-04T00:00:00Z",
"credentialSubject": {
"id": "did:key:z6Mkstudent...",
"achievement": "Cypherpunk School 101 β Graduate"
}
}
Save as vc.json
Sign it:
didkit issue-credential --key mykey.jwk < vc.json > signed_vc.json
β 7. Verify the Credential
didkit verify-credential < signed_vc.json
If valid:
{"errors":[],"warnings":[],"checks":["proof"]}
π 8. Other DID Methods
| DID Method | Description |
|---|---|
did:web |
DID hosted on a domain |
did:ion |
Decentralized on Bitcoin (via IPFS) |
did:peer |
Private, local use |
To create a did:web:
didkit key-to-did web < mykey.jwk
Then host the DID document at:
https://yourdomain.com/.well-known/did.json
π§© 9. Explore with Veramo (JS)
If you code in JS/TS:
npm install @veramo/core @veramo/cli
npx veramo config
npx veramo identity create
Use agents to issue/verify credentials in apps.
π§ 10. Use Cases for DIDs/VCs
- Anonymous reputation systems
- Zero-trust proof of affiliation (e.g., age, group, org)
- Web3 identity (Ethereum address β DID)
- Cross-platform login (no passwords or emails)
- Proof-of-knowledge credentials (zkVCs)
π 11. Journal & Git Commit
βοΈ Reflect on DIDs & VCs
echo "Bonus 2: Created decentralized identifiers with didkit. Issued and verified a verifiable credential claiming Cypherpunk School graduation. Explored how DID methods work and how to host DID docs." >> notes/bonus2_did_identity.md
π¦ Git Commit
git add .
git commit -S -m "Bonus 2 β Decentralized ID and Verifiable Credentials"
β Bonus 2 Checklist
- Installed
didkitCLI - Generated a
did:keyDID and document - Issued and signed a Verifiable Credential (VC)
- Verified the credential cryptographically
- Explored other DID methods (
web,ion) - Wrote journal and signed Git commit
π§ Up Next Bonus Options
- Bonus 3: Metadata-Resistant Messaging (Mixnets, Nym, Sphinx)
- Bonus 4: Zero-Knowledge Proofs (zkSNARKs, Semaphore)
- Bonus 5: Privacy-Centric Smart Contracts (DarkFi, Noir, ZK-rollups)
π Notes
- DIDs are decentralized, cryptographically verifiable, and portable identifiers
- VCs can encode and prove claims about identities or events without relying on third parties
- This is the future of passport-less, permissionless identity