Closed nedmsmith closed 3 years ago
Someone thought CBOR defines endianness in all cases. Is this true?
Someone thought CBOR defines endianness in all cases. Is this true?
Is JSON aligned similarly?
In other words can someone reading CDDL be unambiguous about endianness regardless of which encoding is selected (JSON/CBOR)?
Is JSON aligned similarly? In other words can someone reading CDDL be unambiguous about endianness regardless of which encoding is selected (JSON/CBOR)?
https://datatracker.ietf.org/doc/html/rfc8259#section-8.1 first para: UTF-8 is a MUST so there is no ambiguity.
For all practical purposes, then, CDDL is big-endian?
For all practical purposes, then, CDDL is big-endian?
yes
The current convention for endianness seems workable for reference measurements (aka 'vendor' decides endianness and constructs both tag and evidence such that verifier doesn't care about endianness). However, for endorsed claims and instance claims verifier might need to know endianness semantics. For example, if a policy expects to inspect specific element-name / element-value / etc... values against values specified in a policy, then the verifier will need to understand endianness.
One option is to encode endianness into the data set.
Another option is to declare the endianness convention for each attribute in a spec.
Other options?