A.4. Example MACed CWT
A.4. Example MACed CWT
This section shows a MACed CWT with a single recipient, a full CWT Claims Set, and a CWT tag.
The MAC is generated using the 256-bit symmetric key from Appendix A.2.2 with a 64-bit truncation. Line breaks are for display purposes only.
d83dd18443a10104a1044c53796d6d65747269633235365850a70175636f6170
3a2f2f61732e6578616d706c652e636f6d02656572696b77037818636f61703a
2f2f6c696768742e6578616d706c652e636f6d041a5612aeb0051a5610d9f006
1a5610d9f007420b7148093101ef6d789200
Figure 12: MACed CWT with CWT Tag as Hex String
61(
17(
[
/ protected / << {
/ alg / 1: 4 / HMAC-256-64 /
} >>,
/ unprotected / {
/ kid / 4: h'53796d6d6574726963323536' / 'Symmetric256' /
},
/ payload / << {
/ iss / 1: "coap://as.example.com",
/ sub / 2: "erikw",
/ aud / 3: "coap://light.example.com",
/ exp / 4: 1444064944,
/ nbf / 5: 1443944944,
/ iat / 6: 1443944944,
/ cti / 7: h'0b71'
} >>,
/ tag / h'093101ef6d789200'
]
)
)
Figure 13: MACed CWT with CWT Tag in CBOR Diagnostic Notation