Sirraya DID Key Recovery (DID-KR) Enterprise v2.1
A production-hardened implementation of Decentralized Identifier (DID) key recovery by Sirraya Labs.
🏢 Sirraya Labs - Enterprise Implementation
This is the official reference implementation from Sirraya Labs, designed for enterprise-grade DID key recovery with production-ready security and mathematical rigor.
🔥 Key Features
-
Three Recovery Architectures:
- 🔐 Social ZKP Recovery - Feldman Verifiable Secret Sharing with t-of-n guardians
- ⏰ Deterministic Temporal Recovery - Seed-based recovery with PBKDF2
- 🤝 MPC-Mediated Recovery - Threshold cryptography with proactive refresh
-
Enterprise-Grade Security:
- AES-256-GCM encryption with AAD
- Circuit breakers for fault tolerance
- Comprehensive audit logging
- Metrics collection
-
Multiple Interfaces:
- 🖥️ CLI tool
- 🌐 REST API (Flask)
- 📦 Python library
📦 Installation
# Basic installation (core crypto)
pip install sirraya-did-kr
# With API server support
pip install sirraya-did-kr[flask]
# With Ethereum DID support
pip install sirraya-did-kr[eth]
# Full installation (all features)
pip install sirraya-did-kr[full]
🚀 Quick Start
As a CLI tool:
# Generate DIDs
sirraya-did-kr generate-dids --count 5
# Setup social recovery
sirraya-did-kr social-setup --did did:key:z6Mk... --guardians did:key:z6Mk... --threshold 2
# Start API server
sirraya-did-kr --api --port 8080
As a Python library:
from sirraya_did_kr import RecoveryService, RecoveryDatabase, MemoryCache
# Initialize
db = RecoveryDatabase("did_kr.db")
cache = MemoryCache()
service = RecoveryService(db, cache)
# Setup social recovery
result = service.setup_social_recovery(
did="did:key:z6Mk...",
guardian_dids=["did:key:z6Mk...", "did:key:z6Mk..."],
threshold=2
)
print(f"Recovery setup: {result['recovery_id']}")
As an API server:
# Terminal 1: Start the server
sirraya-did-kr --api --port 8080
# Terminal 2: Test the API
curl -X POST http://localhost:8080/api/v1/did/generate \
-H "Content-Type: application/json" \
-d '{"method": "key"}'
📚 Documentation
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /metrics |
System metrics |
| POST | /api/v1/did/generate |
Generate new DID |
| POST | /api/v1/recovery/social/setup |
Setup social recovery |
| POST | /api/v1/recovery/social/refresh/<did> |
Proactive refresh |
| POST | /api/v1/recovery/deterministic/setup |
Setup seed recovery |
| POST | /api/v1/recovery/deterministic/recover |
Recover with seed |
| POST | /api/v1/recovery/mpc/setup |
Setup MPC recovery |
| GET | /api/v1/recovery/validate/<did> |
Validate recovery graph |
| GET | /api/v1/recovery/status/<did> |
Get recovery status |
CLI Commands
sirraya-did-kr generate-dids [--count N] [--method key|ethr]
sirraya-did-kr social-setup --did DID --guardians DIDS... [--threshold N] [--auto-refresh DAYS]
sirraya-did-kr refresh --did DID
sirraya-did-kr det-setup --did DID --seed-phrase WORDS...
sirraya-did-kr det-recover --did DID --seed-phrase WORDS...
sirraya-did-kr mpc-setup --did DID --providers DIDS...
sirraya-did-kr status --did DID
sirraya-did-kr validate --did DID
sirraya-did-kr --api [--port PORT]
👨💻 Author
Amir Hameed Mir - Principal Architect - Sirraya Labs
📄 License
Apache 2.0 - See LICENSE file.
Built by Sirraya Labs for production-grade decentralized identity systems
Metadata
Release files for sirraya-did-kr 2.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sirraya_did_kr-2.1.2.tar.gz | 19.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sirraya_did_kr-2.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.8 kB
Release files / sirraya_did_kr-2.1.2.tar.gz
| Download URL | sirraya_did_kr-2.1.2.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
caee3090c0927840540b6560bb9b19578d0891064be2a49633716bec2ea1fc53
|
|
BLAKE2b-256 checksum How to use checksums |
4169cdfa10e62c529befade184f0db1ceef0471a13e52a689336635e08883a94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.3
|
Release files / sirraya_did_kr-2.1.2-py3-none-any.whl
| Download URL | sirraya_did_kr-2.1.2-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
065cfb50ea4c6bca1e17fdf51114a1a74836e07ac837bfe9309a3ed650be7f05
|
|
BLAKE2b-256 checksum How to use checksums |
ae38c3314ac9ba6e7ffbc27b515223d5360c0e33bfcccf6f7c2e6ddebbd50494
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.3
|