aboutsummaryrefslogtreecommitdiff
path: root/doc/eris.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/eris.adoc')
-rw-r--r--doc/eris.adoc46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/eris.adoc b/doc/eris.adoc
index 40234b2..19b2afc 100644
--- a/doc/eris.adoc
+++ b/doc/eris.adoc
@@ -359,6 +359,52 @@ A reference implementation is available in Guile: https://gitlab.com/openengiadi
[appendix]
== Test Vectors
+=== Machine Readable
+
+A set of test vectors are provided in the https://gitlab.com/openengiadina/eris/-/tree/main/test-vectors[ERIS repository]. Implementations of the ERIS encoding MUST be able to satisfy the test vectors.
+
+The test vectors are given as machine-readable JSON files. For example the test vector `eris-test-vector-00.json`:
+
+[source,json]
+----
+{
+ "id": 0,
+ "name": "short string (block size 1Kb)",
+ "description": "Encode the UTF-8 encoding of the string \"Hail ERIS!\" with block-size 1Kb and null convergence-secret.",
+ "content": "JBQWS3BAIVJESUZB",
+ "convergence-secret": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
+ "block-size": 1024,
+ "read-capability": {
+ "block-size": 1024,
+ "level": 0,
+ "root-reference": "BLY4QKPNR57OKIOA5BLPI5NHQHKN3GJR5F4RNY6TZFAXKSSLYYQQ",
+ "root-key": "JUNNKQN544MJJMGRABGDOTJAQCGF4U4Q6YW3VVHD4FGQYUSJ4YOA"
+ },
+ "urn": "urn:erisx2:AAAAV4OIFHWY67XFEHAOQVXUOWTYDVG5TEY6S6IW4PJ4SQLVJJF4MIKNDLKUDPPHDCKLBUIAJQ3U2IEARRPFHEHWFW5NJY7BJUGFESPGDQ",
+ "blocks": {
+ "BLY4QKPNR57OKIOA5BLPI5NHQHKN3GJR5F4RNY6TZFAXKSSLYYQQ": "Y5JKORBMSAMYSSNW5CJN3GPNMY6G6MJ3EWNEBE5W2KT6PTN3XETYGQ6N47ZK7NSE2VQZPH7RQOF53UATSC7HO7AK6K3K3VI7A2CQOIQIF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GWMOCSCFQF7TMLDA5BB7MZYTX7QSUYNCRUKHOBONPHYSFBIUZON5XBWRBXIIHJGDJYX5BBBCQZWWHJZXGPC7G45VXKT7Y6RUR254FF2OPJGQEHWNKJ47QR3EXQQIA3MYK542XBOAWLOIHSJCP447WF74DDVFK7LM2DRFHW2RVX3EX3C5VXQT6XHJLPED3XJ5EW75323XN2YLVKKNUP45P7GYOORBYMSNB4MM24H3UY7JAMYTIYOBGTMVV2W6PMVFWNPPSE3AXFPS6GNBTQTAUUPJDXFREUMZOZGLD5VGO7PWRSL2GQP7MDY2IPHQCMTCOFYKSPGMI6OFUELITQPFTZUM7V2IZOMPIXKHLTBSRZUFLABZXSPHWZ626OFJ6WI7KUW4AT3KMMEO33FH3QGTOKCAACPQYM7UCFHN5QGQCVB7SEH6WXISV6AJB7LCDLKRM6JCANOBLDD57Z44GHLIYEJI"
+ }
+}
+----
+
+The fields of JSON test vectors are:
+
+`id` :: Numeric identifier of the test vector.
+`name` :: Short human readable name.
+`description` :: Human readable description of the test.
+`content` :: The binary content to be encoded as Base32 (unpadded) string.
+`convergence-secret` :: The convergence secret to be used as Base32 string.
+`block-size` :: Block size that should be used for encoding in bytes (either 1024 or 32768).
+`read-capability` :: JSON map containing the components of the read capability. This is not used in tests but is here as a help for developers.
+`urn` :: The ERIS URN of the content.
+`blocks` :: A JSON map of blocks required to decode the content given the URN. Key and field are encoded as Base32 strings.
+
+Implementations MUST verify that the content encodes to the URN given the specified block size and convergence secret and verify that given the URN and blocks the content can be decoded.
+
+=== Large content
+
+TODO some test cases that are too big to fit into a JSON file. E.g. 1 TB of data that can be generated so is encoded to the URN so.
+
[appendix]
== Changelog