Skip to main content

Module signature

Module signature 

Source
Expand description

The Signature-Input and Signature structured fields.

RFC 9421 §3.2 step 7 builds @signature-params by serializing the parsed signature parameters, never by copying the field’s wire bytes. SignatureParams::serialize is that serialization, and signers use it to write Signature-Input, so a conforming client produces the same bytes on the wire and in the signature base. Whitespace that Structured Fields allows on the wire therefore cannot change the signature base, and neither can any other difference between what was parsed and what was signed.

Structs§

SignatureParams
The parsed value of the integrity member of Signature-Input.

Enums§

NonceError
Why a request nonce was refused.
Param
A signature parameter of the profile. The profile accepts exactly these three.
SignatureFieldError
Why a Signature field was refused.
SignatureInputError
Why a Signature-Input field was refused.

Constants§

MIN_NONCE_BYTES
Decoded length a request nonce must reach.

Functions§

generate_nonce
A fresh request nonce: MIN_NONCE_BYTES bytes from the OS CSPRNG, padded base64.
parse_signature
Parses a Signature field value into the signature bytes.
signature_field
The Signature field value carrying signature.
validate_nonce
Checks a request nonce: canonical padded base64 decoding to at least MIN_NONCE_BYTES.