<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 19, 2015 at 10:51 AM, Donald Stufft <span dir="ltr"><<a href="mailto:donald@stufft.io" target="_blank">donald@stufft.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is a fairly obvious way of handling that. However it’ll write a whole bunch of data to decrypted.txt and only fail after the very last chunk.</blockquote></div><br>That is definitely a concern, and it cannot be readily mitigated, as not keeping everything in memory is exactly what is required. <br><br>However, I'm not sure the chunk based approach necessarily mitigates this problem either, as you could write out hundreds of chunks, only to have the final chunk fail. Also, having multiple chunks also requires that we somehow manage to ensure that we can identify missing or out-of-order chunks. </div><div class="gmail_extra"><br></div><div class="gmail_extra">I'd also be concerned about the cryptographic implications of this. I'm not sure if this is entirely correct, but it seems if you set your chunk size = AES block size, you essentially are encrypting in ECB mode. </div><div class="gmail_extra"><br></div><div class="gmail_extra">I would presume there is a block size sufficiently large to mitigate this problem, but I get chills up my spine when I use the word 'presume' in any sentence about cryptography. <br><br></div><div class="gmail_extra"><div><br></div>
</div></div>