Uniot Core
0.8.1
Loading...
Searching...
No Matches
COSE (CBOR Object Signing and Encryption)

CBOR Object Signing and Encryption (COSE) implementation. More...

Collaboration diagram for COSE (CBOR Object Signing and Encryption):

Classes

class  uniot::COSEMessage
 Implementation of COSE_Sign1 message format as specified in RFC 8152. More...
 
class  uniot::ICOSESigner
 Interface for CBOR Object Signing and Encryption (COSE) signing operations. More...
 

Enumerations

enum  uniot::COSETag {
  uniot::Sign = 98 , uniot::Sign1 = 18 , uniot::Encrypted = 96 , uniot::Encrypted1 = 16 ,
  uniot::Mac = 97 , uniot::Mac0 = 17
}
 CBOR tag values that identify the type of COSE message. More...
 
enum  uniot::COSEHeaderLabel {
  uniot::Algorithm = 1 , uniot::Critical = 2 , uniot::ContentType = 3 , uniot::KeyIdentifier = 4 ,
  uniot::IV = 5 , uniot::PartialIV = 6 , uniot::CounterSignature = 7 , uniot::CounterSignature0 = 9
}
 Common header parameter labels for COSE messages. More...
 
enum  uniot::COSEAlgorithm {
  uniot::PS256 = -37 , uniot::PS384 = -38 , uniot::PS512 = -39 , uniot::ES256 = -7 ,
  uniot::ES384 = -35 , uniot::ES512 = -36 , uniot::EdDSA = -8
}
 Cryptographic algorithm identifiers for COSE. More...
 

Detailed Description

CBOR Object Signing and Encryption (COSE) implementation.

Provides enumerations for working with COSE (RFC 8152), which defines how to create and process signatures, message authentication codes, and encryption using CBOR for IoT applications.

COSE uses CBOR encoding and provides similar functionality to JOSE (JSON Object Signing and Encryption) but with a more compact representation.

See also
https://tools.ietf.org/html/rfc8152

Enumeration Type Documentation

◆ COSEAlgorithm

Cryptographic algorithm identifiers for COSE.

These values identify cryptographic algorithms used in COSE messages. Negative values are used for crypto algorithms as per the COSE standard. The algorithms are described in RFC 8152 Sections 8, 9, and 10.

Enumerator
PS256 -37 

RSASSA-PSS w/ SHA-256.

PS384 -38 

RSASSA-PSS w/ SHA-384.

PS512 -39 

RSASSA-PSS w/ SHA-512.

ES256 -7 

ECDSA w/ SHA-256.

ES384 -35 

ECDSA w/ SHA-384.

ES512 -36 

ECDSA w/ SHA-512.

EdDSA -8 

EdDSA signature algorithm.

◆ COSEHeaderLabel

Common header parameter labels for COSE messages.

These integer values identify header parameters in the protected and unprotected header maps of COSE messages, as defined in RFC 8152 Section 3.

Enumerator
Algorithm 

Cryptographic algorithm used (label 1)

Critical 

Critical headers that must be understood (label 2)

ContentType 

Content type of the payload (label 3)

KeyIdentifier 

Key identifier (kid) (label 4)

IV 

Initialization Vector (label 5)

PartialIV 

Partial Initialization Vector (label 6)

CounterSignature 

Counter signature (label 7)

CounterSignature0 

Counter signature w/o countersigner (label 9)

◆ COSETag

CBOR tag values that identify the type of COSE message.

These tags are used in CBOR encoding to indicate the COSE message type. Each tag corresponds to a specific security operation defined in RFC 8152.

Enumerator
Sign 98 

Multiple signature (tag 98) - COSE_Sign.

Sign1 18 

Single signature (tag 18) - COSE_Sign1.

Encrypted 96 

Multiple recipient encrypted data (tag 96) - COSE_Encrypt.

Encrypted1 16 

Single recipient encrypted data (tag 16) - COSE_Encrypt0.

Mac 97 

Multiple recipient MAC (tag 97) - COSE_Mac.

Mac0 17 

Single recipient MAC (tag 17) - COSE_Mac0.