Hi Anders,
> On 10. May 2021, at 11:24, Anders Rundgren <[email protected]>
> wrote:
> I took this simple sample:
> https://datatracker.ietf.org/doc/html/rfc8152#appendix-C.4.1
>
> and adjusted it to fit Carsten's http://cbor.me/
>
> 16(
> [
> {
> 1:10
> } ,
> {
> 5:h'89f52f65a1c580933b5261a78c'
> },
> h'5974e1b99a3a4cc09a659aa2e9e7fff161d38ce71cb45ce460ffb569'
> ]
>
> It returns 51 bytes but the RFC says 52 bytes.
The example in the RFC is (comments removed)
16([h'A1010A', {5: h'89F52F65A1C580933B5261A78C'},
h'5974E1B99A3A4CC09A659AA2E9E7FFF161D38CE71CB45CE460FFB569’])
Or, if you enable cbor.me to show embedded CBOR [1],
16([<< {1: 10} >>, {5: h'89F52F65A1C580933B5261A78C'},
h'5974E1B99A3A4CC09A659AA2E9E7FFF161D38CE71CB45CE460FFB569’])
http://cbor.me/?bytes=D0(83(43(A1010A)-A1(05-4D(89F52F65A1C580933B5261A78C))-58.1C(5974E1B99A3A4CC09A659AA2E9E7FFF161D38CE71CB45CE460FFB569)))
Your example however is missing the 43 byte: The map {1:10} needs to be, CBOR
encoded, kept in a byte string.
Grüße, Carsten
[1]: https://datatracker.ietf.org/doc/html/rfc8610#appendix-G.3
_______________________________________________
COSE mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/cose