aboutsummaryrefslogtreecommitdiff
path: root/Documentation/file-format.md
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-12-19 14:41:39 +0100
committerJakob Unterwurzacher2015-12-19 15:02:29 +0100
commit1caa9258685fa5fad8935d3bfcd0eac7d7f84f1e (patch)
treeabc1e46f269f9ef8f05d812e13fcdf2bae68d298 /Documentation/file-format.md
parent88826dc51d7919ef8b190c079955230e653323e2 (diff)
Increase GCM IV size from 96 to 128 bits
This pushes back the birthday bound for collisions to make it virtually irrelevant.
Diffstat (limited to 'Documentation/file-format.md')
-rw-r--r--Documentation/file-format.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/Documentation/file-format.md b/Documentation/file-format.md
new file mode 100644
index 0000000..b0d4b55
--- /dev/null
+++ b/Documentation/file-format.md
@@ -0,0 +1,32 @@
+File Format
+===========
+
+Header
+
+ 2 bytes header version (big endian uint16, currently 2)
+ 16 bytes file id
+
+Data block
+
+ 16 bytes GCM IV (nonce)
+ 1-4096 bytes encrypted data
+ 16 bytes GHASH
+
+
+Example: 1-byte file
+--------------------
+
+ Header 18 bytes
+ Data block 33 bytes
+
+Total: 51 bytes
+
+
+Example: 5000-byte file
+-----------------------
+
+ Header 18 bytes
+ Data block 4128 bytes
+ Data block 936 bytes
+
+Total: 5082 bytes