CBOR Serialization of ERIS Encoded Content

This document specifies a CBOR (RFC 8949) based serialization of content-addressed blocks as well as ERIS read capabilities.

The serialization can be used to transport ERIS encoded content in files. The serialization is easy to implement and is well-suited for constrained environments such as embedded devices or web applications.

In order to decode content, all encoded blocks might have to be first read. This makes the serialization inefficient for direct decoding.

CBOR Serialization

The serialization is a single CBOR array. The initial element is a map containing the blocks. The keys of the map are the Blake2b hashes as byte strings. The values are the blocks (either 1 KiB or 32 KiB) as byte strings.

Additional (optional) elements may be ERIS read capabilities encoded using the registered CBOR tag 276 (see CBOR Tags in the ERIS specification).

Both the array and the map MAY be encoded as CBOR indefinite length arrays and maps.

The CBOR tag 1701996915 MAY be used to tag the array containing blocks and read capabilities and SHOULD be present in contexts where the semantics of the array might be ambiguous. Furthermore this tag MAY be preceded by the self-describing CBOR tag 55799 to establish that the content following it is in fact a CBOR tagged array. This would as an example identify blocks serialized into a file-system as such. For a complete description of this tagging convention see RFC 9277.

The serialization is specified in CDDL (RFC 8610):

ERISBlocksAndReadCapabilities = [
  * ReadCapability

TaggedERISBlocksAndReadCapabilities = #6.1701996915(ERISBlocksAndReadCapabilities)

Blocks = { * bstr => bstr }
ReadCapability = #6.276(bstr)

IANA Considerations

CBOR Tags Registry

This specification requires the assignment of a CBOR tag:

The tags is added to the CBOR Tags Registry as defined in RFC 8949.