diff options
author | Jakob Unterwurzacher | 2021-08-26 08:43:41 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-08-26 08:43:41 +0200 |
commit | 91d3b30c1c813a56ae057a373f045803fb788d60 (patch) | |
tree | 23d49fa3ba8f36b2b35962c90caaf1063719bd8f | |
parent | 7b25ff39c81aea559e7a2fd3a5f6143e95521ce2 (diff) |
doc: file-format.md: describe XChaCha20-Poly1305
Different nonce size.
-rw-r--r-- | Documentation/file-format.md | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/Documentation/file-format.md b/Documentation/file-format.md index 04bd2fe..7cce72c 100644 --- a/Documentation/file-format.md +++ b/Documentation/file-format.md @@ -18,22 +18,46 @@ Data block, AES-SIV mode (used in reverse mode, or when explicitly enabled with 16 bytes SIV 1-4096 bytes encrypted data -Full block overhead = 32/4096 = 1/128 = 0.78125 % +Data block, XChaCha20-Poly1305 (enabled via `-init -xchacha`) -Example: 1-byte file --------------------- + 24 bytes nonce + 1-4096 bytes encrypted data + 16 bytes Poly1305 tag + +Full block overhead (AES-GCM and AES-SIV mode) = 32/4096 = 1/128 = 0.78125 % + +Full block overhead (XChaCha20-Poly1305 mode) = 40/4096 = \~1 % + +Example: 1-byte file, AES-GCM and AES-SIV mode +---------------------------------------------- Header 18 bytes Data block 33 bytes Total: 51 bytes - -Example: 5000-byte file ------------------------ +Example: 5000-byte file, , AES-GCM and AES-SIV mode +--------------------------------------------------- Header 18 bytes Data block 4128 bytes Data block 936 bytes Total: 5082 bytes + +Example: 1-byte file, XChaCha20-Poly1305 mode +---------------------------------------------- + + Header 18 bytes + Data block 41 bytes + +Total: 59 bytes + +Example: 5000-byte file, XChaCha20-Poly1305 mode +---------------------------------------------- + + Header 18 bytes + Data block 4136 bytes + Data block 944 bytes + +Total: 5098 bytes |