oxirs-did
W3C DID and Verifiable Credentials implementation with Signed RDF Graphs
Full implementation of W3C Decentralized Identifiers (DID) and Verifiable Credentials (VC) specifications, with support for cryptographically signed RDF graphs.
Features
- DID Core 1.0: W3C Recommendation compliant
- VC Data Model 2.0: Verifiable Credentials with Ed25519 proofs
- did:key: Deterministic DIDs from public keys (no network)
- did:web: HTTPS-based DID resolution (optional)
- RDFC-1.0: RDF Dataset Canonicalization for graph signing
- Ed25519Signature2020: Cryptographic proof suite
Standards Compliance
- ✅ W3C DID Core 1.0
- ✅ W3C VC Data Model 2.0
- ✅ Ed25519Signature2020
- ✅ RDFC-1.0
- ✅ Multicodec
- ✅ Multibase
Quick Start
DID Creation and Resolution
use ;
use Ed25519Signer;
async
Issue Verifiable Credential
use ;
use Ed25519Signer;
use json;
async
Verify Credential
use ;
async
Sign RDF Graph
use ;
use Ed25519Signer;
use ;
async
DID Methods
did:key (Default)
No network required, deterministic from public key:
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK
└─ Base58btc(0xed01 + Ed25519_public_key)
did:web (Optional, feature = "did-web")
HTTPS-based resolution:
did:web:example.com
→ https://example.com/.well-known/did.json
did:web:example.com:users:alice
→ https://example.com/users/alice/did.json
did:web:example.com%3A8080
→ https://example.com:8080/.well-known/did.json
Feature Flags
[]
= { = "0.1", = ["did-web", "signed-graphs"] }
Available features:
did-key(default) - did:key methoddid-web- did:web method (requires reqwest)did-ebsi- European Blockchain Services Infrastructurevc-data-model-2(default) - W3C VC 2.0signed-graphs- RDF graph signing/verificationkey-management- Key storage
Use Cases
- Trustworthy AI: Sign training datasets for provenance tracking
- IoT Identity: Decentralized identity for edge devices
- Supply Chain: Verifiable product certifications
- Research Data: Signed datasets for reproducibility
- Federated Systems: Self-sovereign identity across systems
Dependencies
ed25519-dalek- Ed25519 signaturesmultibase,bs58- Multiformat encodingsha2- Cryptographic hashingscirs2-core- Secure random number generation
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.