Skip to content

COSE_Encrypt and COSE_Encrypt0 messages can be read, decrypted, and created/encrypted #32123

@bartonjs

Description

@bartonjs

Implement COSE Encryption, IETF RFC 8152, section 5

  • Read and expose metadata for tagged and untagged COSE_Encrypt messages
  • Read and expose metadata for tagged and untagged COSE_Encrypt0 messages
  • Decrypt content using ECDiffieHellman
    • KDFs
      • HKDF-SHA256
      • HKDF-SHA512
    • Symmetric Algorithms
      • AES-GCM
      • AES-CCM
  • Create new encrypted messages.

We do not currently have a concrete use case for this support, but:

  1. Theoretically, any time someone wants CMS support, they could desire COSE/CBOR support as an alternate format
  2. For maintaining consistency with other APIs where we have Sign/Encrypt, we always carry both together
  3. If there was a scenario that arose that needed this, it would likely be needed urgently

With this rationale, we will proceed with this functionality within the same release as #32121.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions