$ show OmniOneID/did-doc-architecture
This repository is a comprehensive specification and documentation set for the OpenDID (Open Decentralized Identity) framework. It defines standards, protocols, and data models for a decentralized identity system based on W3C DID and VC specifications, with extensions for zero-knowledge proofs. The repository contains no executable code but provides detailed specifications through Markdown documents, GraphML diagrams, PlantUML sequence diagrams, and the OpenDID Schema Definition Language (OSD). It covers the full lifecycle of decentralized identities including DID document management, verifiable credential issuance and presentation, zero-knowledge proof-based verification, wallet management, and secure communication protocols between system components.
The LLM identified 4 files worth highlighting for reuse:
The OpenDID Schema Definition Language (OSD) provides a reusable language for defining JSON data structures with constraints. It includes presence markers (+/- for mandatory/optional fields), data type constraints (length, range, regex, enum), group/select constructs for complex structures, and inheritance via @spread annotation. This language is used consistently across VC, VP, ZKP, and profile definitions in the repository and could be extracted for defining other JSON-based data schemas in different projects.
The JSON serialization guidelines establish specific rules for JSON key sorting and formatting to ensure consistent serialization across implementations. This solves the recurring problem of inconsistent JSON serialization causing interoperability issues in distributed systems. The guidelines could be applied to any JSON-based API to ensure deterministic serialization, which is critical for cryptographic operations and signature verification where byte-for-byte equivalence is required.
The token specifications define standardized patterns for secure authentication: WalletToken generation using nonce-based SHA256 hashing, and ServerToken generation using ECDH key exchange followed by encryption and signing. These patterns represent well-established secure authentication techniques that could be extracted and applied to other systems requiring token-based authentication with replay protection and secure channel establishment.
The ZKP credential format specifications define well-structured data models for zero-knowledge proof-based credentials, including separated concerns for primary proofs, aggregated proofs, and requested proofs. The specifications include standardized structures for credentials, proofs, blinded secrets, and verification components. This modular approach to ZKP-based verification could be adapted for other ZKP implementations beyond the specific algorithms used in OpenDID.