Skip to main content

Module cose

Module cose 

Source
Expand description

This file contains helper functions to aid in COSE deserialization

Functionsยง

akp_priv ๐Ÿ”’
Helper function to parse the private key from an AKP CoseKey.
akp_pub ๐Ÿ”’
Helper function to parse the public key from an AKP CoseKey.
content_type ๐Ÿ”’
Helper function to extract the content type from a ProtectedHeader. The content type is a standardized header set on the protected headers of the signature object. Currently we only support registered values, but PrivateUse values are also allowed in the COSE specification.
cose_param ๐Ÿ”’
Helper function to look up a parameter in a CoseKey by its registered label.
ed25519_signing_key ๐Ÿ”’
Helper function to parse a ed25519 signing key from a CoseKey.
ed25519_verifying_key ๐Ÿ”’
Helper function to parse a ed25519 verifying key from a CoseKey.
key_id ๐Ÿ”’
Helper function to extract the key ID from a CoseKey. The key ID is a standardized header and always set in bitwarden-crypto generated encrypted messages or signatures.
mldsa44_verifying_key ๐Ÿ”’
Helper function to parse an ML-DSA-44 verifying key from a CoseKey.
mldsa_seed ๐Ÿ”’
Helper function to parse an ML-DSA signing key from a CoseKey. The Priv parameter contains the 32-byte seed, from which the full key pair is deterministically derived.
namespace ๐Ÿ”’
Helper function to extract the namespace from a ProtectedHeader. The namespace is a custom header set on the protected headers of the signature object.
okp_curve ๐Ÿ”’
Helper function to parse the OKP curve from a CoseKey.
okp_d ๐Ÿ”’
Helper function to parse the private key d from a CoseKey.
okp_x ๐Ÿ”’
Helper function to parse the public key x from a CoseKey.