COSEKey
COSEKey refers to the COSE_Key data structure used in the COSE (CBOR Object Signing and Encryption) framework. It provides a portable, CBOR-encoded representation of cryptographic keys that can be used with COSE messages such as signing, verification, encryption, and decryption.
A COSE_Key is encoded as a CBOR map containing a mandatory key type field (kty) and a
- EC2: elliptic-curve keys for ECDSA or related algorithms, with parameters such as crv (curve identifier), x
- OKP: octet key pair used for EdDSA schemes, with parameters such as crv and x, and possibly
- Symmetric: shared secret keys for symmetric algorithms, with the parameter k representing the key value.
A COSE_Key can be transported as part of COSE structures, such as COSE_Sign, COSE_Sign1, COSE_Encrypt, or COSE_Decrypt,
Standardization and references: COSE_Key is defined in RFC 8152, within the COSE specification set. The format