Skip to main content

DID Key Recovery Enterprise - Mathematically Correct Feldman VSS

Project description

Sirraya DID Key Recovery (DID-KR) Enterprise v2.1

License Python 3.8+

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sirraya_did_kr-2.1.1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sirraya_did_kr-2.1.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file sirraya_did_kr-2.1.1.tar.gz.

File metadata

  • Download URL: sirraya_did_kr-2.1.1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.3

File hashes

Hashes for sirraya_did_kr-2.1.1.tar.gz
Algorithm Hash digest
SHA256 80d12bea54aaaf2f492c32b74c480ce82f1cc99995eace085b031b3d0e074420
MD5 4dd2a00eb1a073de9139aa23269aae14
BLAKE2b-256 308a6baef477a81a375ab342b9f169c4ef5bd8bee9206b1eaabc060d994f2477

See more details on using hashes here.

File details

Details for the file sirraya_did_kr-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: sirraya_did_kr-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.3

File hashes

Hashes for sirraya_did_kr-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9155831f21b615fec461cd7021590cd32e99c9273ad1adc22e62b12b01e67f7
MD5 ac32d4e7c9f092d438a7b1459bacebe2
BLAKE2b-256 656024074abb9e3f50a760838c0e55bad120aeaf0eeda8686b2a4433d04e0bbb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page