aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2020-10-26 20:24:34 +0100
committerpukkamustard <pukkamustard@posteo.net>2020-10-26 20:38:35 +0100
commitca9c3ba6024e512de13d5dedebb4b8d09e80cd52 (patch)
tree5c9d2f754d0059b38e0b09251b2b87f3786981d2 /doc
parentd6d8409a9c2276562dc87bdd512b20bb92cbbef0 (diff)
*: update read-capability encoding
Diffstat (limited to 'doc')
-rw-r--r--doc/eris.adoc20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/eris.adoc b/doc/eris.adoc
index f469025..5e02f30 100644
--- a/doc/eris.adoc
+++ b/doc/eris.adoc
@@ -319,8 +319,27 @@ Random access is possible by only decoding selected sub-trees.
=== Binary Encoding of Read Capability
+The read-capability consisting of the block-size, level of root reference-key pair as well as the root reference-key pair form the necessary pieces of information required to decode content.
+
+We specify an binary encoding of the read-capability 66 bytes:
+
+|===
+|Byte offset | Content | Length (in bytes)
+
+| 0 | block size (`0x00` for block size 1Kb and `0x01` for block size 32Kb)| 1
+| 1 | level of root reference-key pair as unsigned integer | 1
+| 2 | root reference | 32
+| 34 | root key | 32
+|===
+
+The initial field (block size) also encodes the ERIS version. Future versions of ERIS MUST use different codes to encode block sizes.
+
+TODO using 1 byte to encode level limits size of content that can be encoded. Add a comment on that.
+
=== URN
+A read-capability can be encoded as an URN: `urn:eris:BASE32-READ-CAPABILITY`, where `BASE32-READ-CAPABILITY` is the unpadded Base32 <<RFC4648>> encoding of the read capability.
+
== Applications
=== Storage and Transport Layers
@@ -363,6 +382,7 @@ This work is licensed under a http://creativecommons.org/licenses/by-sa/4.0/[Cre
- [[[Polleres2020]]] Polleres, Kamdar, Fernández, Javier David, Tudorache & Musen. https://epub.wu.ac.at/6371/1/IPM_workingpaper_02_2018.pdf[A more decentralized vision for Linked Data]. 2020
- [[[ECRS]]] Grothoff, Grothoff, Horozov, & Lindgren. https://grothoff.org/christian/ecrs.pdf[An encoding for censorship-resistant sharing]. 2003
- [[[RFC2119]]] S. Bradner. https://tools.ietf.org/html/rfc2119[Key words for use in RFCs to Indicate Requirement Levels]. 1997
+- [[[RFC4648]]] S. Josefsson. https://tools.ietf.org/html/rfc4648[The Base16, Base32, and Base64 Data Encodings]. 2006
- [[[RFC7049]]] C. Bormann & P. Hoffman. https://tools.ietf.org/html/rfc7049[Concise Binary Object Representation (CBOR)]. 2013
- [[[RFC7693]]] M-J. Saarinen & J-P. Aumasson. https://tools.ietf.org/html/rfc7693[The BLAKE2 Cryptographic Hash and Message Authentication Code (MAC)]. 2015
- [[[RFC8439]]] Nir & Langley. https://tools.ietf.org/html/rfc8439[ChaCha20 and Poly1305 for IETF Protocols]. 2018