Skip to main content

Module canonical

Module canonical 

Source
Expand description

RFC 8785 / JSON Canonicalization Scheme helpers.

These helpers canonicalize arbitrary JSON values before they are signed, verified, or hashed. The output is UTF-8 JSON with deterministic object key ordering, no insignificant whitespace, and RFC 8785-compatible number and string serialization.

Constants§

HOLDER_AUTHORIZATION_CANONICAL_TYPE
Canonicalized payload type string for holder authorization signatures.
ISSUER_AUTHORITY_CANONICAL_TYPE
Canonicalized payload type string for issuer authority signatures.
PBRSA_BLIND_MSG_CANONICAL_TYPE
Canonicalized payload type string for holder-hidden blind-message information.
PBRSA_PUBLIC_INFO_CANONICAL_TYPE
Canonicalized payload type string for issuer-visible public credential information.
REVOCATION_CANONICAL_TYPE
Canonicalized payload type string for signed revocations.

Functions§

canonicalize_credential
Build JCS canonical bytes for a credential payload.
canonicalize_holder_authorization
Build JCS canonical bytes for a holder authorization statement.
canonicalize_issuer_authority
Build JCS canonical bytes for the issuer metadata signed in an issuer authority.
canonicalize_pbrsa_blind_msg
Build JCS canonical bytes for the PBRSA blind message.
canonicalize_pbrsa_info
Build JCS canonical bytes for the PBRSA public credential info.
canonicalize_revocation
Build JCS canonical bytes for a signed revocation payload.