Expand description
This file contains private-use constants for COSE encoded key types and algorithms. Standardized values from https://www.iana.org/assignments/cose/cose.xhtml should always be preferred unless there is a a clear benefit, such as a clear cryptographic benefit, which MUST be documented publicly.
Constantsยง
- SYMMETRIC_
KEY ๐ - XCHACH
A20_ ๐POLY1305 - XChaCha20 https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-xchacha-03 is used over ChaCha20 to be able to randomly generate nonces, and to not have to worry about key wearout. Since the draft was never published as an RFC, we use a private-use value for the algorithm.
Functionsยง
- decrypt_
xchacha20_ ๐poly1305 - Decrypts a COSE Encrypt0 message, using a XChaCha20Poly1305 key
- encrypt_
xchacha20_ ๐poly1305 - Encrypts a plaintext message using XChaCha20Poly1305 and returns a COSE Encrypt0 message