Expand description
RFC 9679 COSE Key Thumbprints.
A COSE Key Thumbprint is a deterministic hash of a COSE_Key — the COSE analogue of the JWK thumbprint (RFC 7638). It is computed by:
- Collecting only the parameters required for that key type (e.g. for an OKP key
kty,crv, andx), excludingkid,key_ops, and any private material. - Encoding those parameters as a CBOR map using the deterministic encoding of RFC 8949 §4.2.1 (definite-length map, shortest-form integers, map keys sorted bytewise-lexicographically by their encoded bytes).
- Hashing the result. This implementation only supports the RFC 9679 default hash, SHA-256.
Because the thumbprint is computed over public material for asymmetric keys, a private key and its corresponding public key produce the same thumbprint. The same applies for signature key pairs / their verification key.
Structs§
- Cose
KeyThumbprint - An RFC 9679 COSE Key Thumbprint.
Traits§
- Cose
KeyThumbprint Ext - Computes the RFC 9679 COSE Key Thumbprint of a key.
Functions§
- encoded_
label 🔒 - Returns the CBOR encoding of an integer label, used as the sort key for canonical ordering.
- thumbprint_
from_ 🔒required_ params - Builds the RFC 9679 thumbprint from a key type’s required parameters.