From cc1f7a47652a5b0b0581c94ae6a122c74fa2356e Mon Sep 17 00:00:00 2001
From: Daniel Huigens <d.huigens@protonmail.com>
Date: Sun, 29 Apr 2018 22:24:06 +0200
Subject: [PATCH] Lower chunk_size_byte to 12 (256KiB)

- In anticipation of streaming decryption
- Firefox 34 does not support chunk_size_byte > 24

256KiB is almost as fast as no chunks (although both of those can be up to
~1.5x slower than optimally using threads for very large message sizes).
The optimal chunk size would be something like:

    max(data.length / navigator.hardwareConcurrency, 128KiB)

But we don't do so currently because

- We don't know the hardwareConcurrency of the decrypting machine
- Smaller chunk sizes are better for streaming decryption
---
 src/config/config.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/config/config.js b/src/config/config.js
index 404e7298..bb644fa4 100644
--- a/src/config/config.js
+++ b/src/config/config.js
@@ -75,7 +75,7 @@ export default {
    * @memberof module:config
    * @property {Integer} aead_chunk_size_byte
    */
-  aead_chunk_size_byte:     46,
+  aead_chunk_size_byte:     12,
   /**
    * {@link https://tools.ietf.org/html/rfc4880#section-3.7.1.3|RFC4880 3.7.1.3}:
    * Iteration Count Byte for S2K (String to Key)