Skip to main content

Module did_document

Module did_document 

Source
Expand description

Choosing a DID’s assertion key from its DID document, with the rules of the Python reference (vouch.did_web.DIDDocument.assertion_key and publishes_mldsa44_assertion_key).

The core never fetches a DID document. These rules run on a document the caller already holds, such as the verified state of a did:webvh log (crate::did_webvh::verify_log).

Structs§

ProofKeys
The keys a DID document gives a DID for one proof (see proof_keys).
ProofMethodRefs
The verificationMethods a proof names, by suite.

Constants§

ED25519
The Ed25519 algorithm name, as multikey::decode reports it.
MLDSA44
The ML-DSA-44 algorithm name, as multikey::decode reports it.
SLHDSA128
The SLH-DSA-SHA2-128s algorithm name, as multikey::decode reports it.

Functions§

assertion_key
The raw public key a proof names, when document lets did use it for assertions. Every rule must hold, or the key is refused:
method_key
The raw key of one verification method, checked strictly (the method’s type, one kind of key material, the algorithm, the strict decoding), with no rule about the document it sits in: for display and tooling that lists a document’s keys. A proof’s key comes from assertion_key.
proof_keys
proof_keys_for for a proof with an Ed25519 member and, in a set, an ML-DSA-44 member.
proof_keys_for
The keys document gives did for a proof whose members name methods (only the Ed25519 one for a single classical proof), each chosen with the rules of assertion_key, and whether the document publishes a post-quantum assertion key (publishes_mldsa44_assertion_key, publishes_slhdsa128_assertion_key). A key the document does not allow is None.
publishes_mldsa44_assertion_key
True when the document lists, for did’s assertions, a method whose Multikey names the ML-DSA-44 codec. A verifier then requires the post-quantum proof, so it cannot be dropped from a credential.
publishes_slhdsa128_assertion_key
True when the document lists, for did’s assertions, a method whose Multikey names the SLH-DSA-SHA2-128s codec (base64url, as that key is written). A verifier then requires the SLH-DSA proof, so it cannot be dropped from a credential.