Skip to main content

Crate oxirs_did

Crate oxirs_did 

Source
Expand description

§OxiRS DID

Version

Status: Production Release (v0.1.0)

W3C Decentralized Identifiers (DID) and Verifiable Credentials (VC) implementation for OxiRS, enabling signed RDF graphs and trust layer for data sovereignty.

§Features

  • DID Methods: did:key (Ed25519), did:web (HTTP-based)
  • Verifiable Credentials: W3C VC Data Model 2.0
  • Signed Graphs: RDF Dataset Canonicalization + Ed25519 signatures
  • Key Management: Secure key storage and derivation

§Example

use oxirs_did::{Did, DidResolver, VerifiableCredential, CredentialIssuer};

// Create DID from key
let did = Did::new_key(&public_key)?;

// Issue credential
let issuer = CredentialIssuer::new(keystore);
let vc = issuer.issue(subject, types, &issuer_did).await?;

// Verify credential
let verifier = CredentialVerifier::new(resolver);
let result = verifier.verify(&vc).await?;

Re-exports§

pub use did::methods::DidEthr;
pub use did::methods::DidEthrMethod;
pub use did::methods::EthNetwork;
pub use did::methods::DidIon;
pub use did::methods::DidIonMethod;
pub use did::methods::IonCreateOperation;
pub use did::methods::IonDocument;
pub use did::methods::IonKeyDescriptor;
pub use did::methods::IonKeyPurpose;
pub use did::methods::IonOperationType;
pub use did::methods::IonService;
pub use did::ChainNamespace;
pub use did::Did;
pub use did::DidDocument;
pub use did::DidPkh;
pub use did::DidPkhMethod;
pub use did::DidResolver;
pub use key_management::generate_rotation_key;
pub use key_management::KeyExpiry;
pub use key_management::KeyRotation;
pub use key_management::KeyRotationManager;
pub use key_management::KeyRotationReason;
pub use key_management::KeyRotationRecord;
pub use key_management::KeyRotationRegistry;
pub use key_management::Keystore;
pub use key_management::LifecycleKeyRotationRecord;
pub use key_management::VerificationKey as ManagedVerificationKey;
pub use kms::create_mock_kms;
pub use kms::KeyUsage;
pub use kms::KmsAlgorithm;
pub use kms::KmsBackend;
pub use kms::KmsDidSigner;
pub use kms::KmsKeyMetadata;
pub use kms::KmsProvider;
pub use kms::MockAwsKms;
pub use kms::MockAzureKms;
pub use kms::MockGcpKms;
pub use proof::jws::attach_jws_proof;
pub use proof::jws::extract_jws_proof;
pub use proof::jws::sign_document;
pub use proof::jws::verify_document;
pub use proof::jws::CompactJws;
pub use proof::jws::JsonWebSignature2020;
pub use proof::jws::JwsAlgorithm;
pub use proof::jws::JwsHeader;
pub use proof::jws::JwsSigner;
pub use proof::jws::JwsVerifier;
pub use proof::Proof;
pub use proof::ProofPurpose;
pub use proof::ProofType;
pub use revocation::BloomFilter;
pub use revocation::CredentialStatus;
pub use revocation::RevocationEntry;
pub use revocation::RevocationList2020;
pub use revocation::RevocationRegistry;
pub use revocation::RevocationRegistry2020;
pub use revocation::RevocationStatus;
pub use revocation::StatusList2021;
pub use revocation::StatusList2021Inner;
pub use revocation::StatusListCredential;
pub use revocation::StatusPurpose;
pub use revocation::MIN_LIST_SIZE;
pub use signatures::BbsKeyPair;
pub use signatures::BbsPlusSignature;
pub use signatures::BbsProof;
pub use signatures::BbsProofRequest;
pub use signatures::EcdsaJwsSigner;
pub use signatures::EcdsaJwsVerifier;
pub use signatures::Ed25519JwsSigner;
pub use signatures::Ed25519JwsVerifier;
pub use signatures::Es256Signer;
pub use signatures::Es256Verifier;
pub use signatures::JwsAlgorithm as SignaturesJwsAlgorithm;
pub use signatures::JwsHeader as SignaturesJwsHeader;
pub use signatures::JwsPayload;
pub use signatures::JwsSignature;
pub use signatures::JwsSignatureHeader;
pub use signatures::JwsSigner as SignaturesJwsSigner;
pub use signatures::JwsSignerTrait;
pub use signatures::JwsVerifier as SignaturesJwsVerifier;
pub use signatures::JwsVerifierTrait;
pub use signatures::MockJwsSigner;
pub use signatures::MockJwsVerifier;
pub use signatures::P256KeyPair;
pub use signatures::Rs256Signer;
pub use signatures::Rs256Verifier;
pub use signatures::RsaKeyPair;
pub use signed_graph::SignedGraph;
pub use url::DereferencedResource;
pub use url::DidDereferencer;
pub use url::DidUrl;
pub use vc::CredentialIssuer;
pub use vc::CredentialSubject;
pub use vc::CredentialVerifier;
pub use vc::VerifiableCredential;
pub use vc::VerifiablePresentation;
pub use zkp::prove_selective;
pub use zkp::verify_selective;
pub use zkp::AttributeCommitment;
pub use zkp::CredentialAttribute;
pub use zkp::DisclosurePresentation;
pub use zkp::PedersenParams;
pub use zkp::PedersenSelectiveDisclosureProof;
pub use zkp::SchnorrProof;
pub use zkp::SelectiveDisclosureCredential;
pub use zkp::SelectiveDisclosureProof;
pub use zkp::SelectiveDisclosureRequest;
pub use zkp::ZkpProofRequest;

Modules§

authentication
Authentication
credential_exchange
Verifiable Credential exchange protocols (W3C VC Data Model inspired).
credential_schema
Credential Schema Validation
did
DID (Decentralized Identifiers) module
did_resolver
DID Resolver
did_web
DID:web Method Resolver
document_versioning
DID Document Versioning
identity_registry
DID identity registry with resolution and caching.
key_agreement
Key agreement protocols for DID-based communication.
key_management
Key management module
key_manager
DID Key Manager
kms
Cloud KMS Integration for DID key management
presentation_builder
Verifiable Presentation Builder
presentation_request
Presentation Request
proof
Cryptographic proof module
proof_purpose
Linked Data Proof Purpose Validation
rdf_integration
RDF integration for DID/VC
revocation
Revocation support for Verifiable Credentials
signatures
Advanced signature suite implementations
signed_graph
Signed RDF Graphs module
trust_chain
Trust Chain
url
DID URL Dereferencing — W3C DID Core §7.2
vc
Verifiable Credentials module
vc_presenter
Verifiable Credential Presenter
vc_verifier
Verifiable Credential verification (W3C VC Data Model).
zkp
Zero-Knowledge Proof module for credential selective disclosure

Structs§

Service
Service endpoint in DID Document
VerificationCheck
Individual verification check
VerificationMethod
Verification method in DID Document
VerificationResult
Verification result

Enums§

DidError
DID error types

Type Aliases§

DidResult