Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

identus-did-jwk

identus-did-jwk is an independently selectable, effect-free DID-method package. It turns caller-owned public JWKs into deterministic did:jwk values, parses bounded duplicate-safe JSON, and projects local DID documents without a network, runtime, store, custody layer, or global registry.

Supported profile

SurfaceIncludedExcluded
Carriercanonical unpadded base64url over UTF-8 JSONpadding, alternate alphabets, duplicate names
Public keysEd25519, X25519, P-256, secp256k1private/symmetric keys, unsupported curves
JWK policyabsent use, explicit sig or enc, bounded public extensionskey_ops and extension-driven relationship policy
Verification methodJsonWebKey2020 with publicKeyJwk at fixed #0kid fragments and donor DTOs
Operationscreate, parse, deterministic local resolveupdate, deactivate, network resolution
Representationscontext-free DID JSON; DID Core + JWS 2020 contexts for DID JSON-LDJSON-LD processing or expansion

Carrier text is bounded at 21,846 bytes and decoded JSON at 16,384 bytes. The duplicate-safe parser additionally limits depth to 16, nodes to 1,024, and top-level members to 64. Creation applies the same serialized ceilings, and both entry paths preflight generic DID document projection limits. Accepted values therefore remain resolvable rather than deferring an extension-shape failure until projection. All four curve families receive actual public-key validation before use.

Explicit composition

use identus_did::DidMethodRegistry;
use identus_did_jwk::DidJwkResolver;

let registry = DidMethodRegistry::builder()
    .register(DidJwkResolver.into_method_binding())?
    .build();
Ok::<(), identus_did::Error>(())

Linking the package never changes a global default. Products continue to own custody, trust, persistence, transport, consent, telemetry, and runtime policy.

Evidence

The attributed fixture packet executes the pinned P-256 and X25519 examples. Property tests, alternate-serialization tests, security negatives, an opt-in registry E2E, bounded fuzz target, and directional benchmark cover the profile.

Run the readable local E2E:

cargo test -p identus-did-jwk --test registry_e2e

The manifest remains experimental at 0.0.0 with publication disabled. Portable compile evidence does not claim browser/device packaging, certification, consumer adoption, or production support.