<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 7, 2015 at 12:16 AM, Hanno Böck <span dir="ltr"><<a href="mailto:hanno@hboeck.de" target="_blank">hanno@hboeck.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, 6 May 2015 10:15:02 +0200<br>
Francois BERENGER <<a href="mailto:francois.berenger.fun@gmail.com">francois.berenger.fun@gmail.com</a>> wrote:<br>
<br>
> then, instead of encrypting the whole resulting pair (to save some<br>
> time), we would send over the wire<br>
><br>
> (symmetric_encrypt(compression_dictionary, secret_key),<br>
> compressed_text)<br>
<br>
</span>That almost certainly would result in an insecure construction. While<br>
an attacker can not regenerate the full secret text he'll learn a lot<br>
about it, e.g. things like "this starts with a pattern that is then<br>
repeated 3 times at certain locations in the text". That doesn't<br>
fulfill any reasonable definition of encryption security.<br>
<br>
It also hardly makes sense. Performance of symmetric encryption is<br>
largely a non-issue these days. Compression performance is a trade-off.<br>
There are very fast algos, but obviously they aren't the best<br>
compressing ones.<br>
<br>
I don't see any reasonable performance gain in a combined algorithm.<br></blockquote><div><br></div><div>If such method exists, I can measure how fast it is compared<br></div><div>to compressing then encrypting the whole output of compression.<br></div><div>I guess it will matter on large data, which my system is supposed to handle smoothly.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
BUT and here comes the big BUT: It is tricky to combine compression and<br>
encryption at all. Numerous attacks in the past have shown that this<br>
combination is super-dangerous, e.g. the CRIME and BREACH attack.<br>
<br>
I think for HTTP/2 there was some work done on creating a compression<br>
system that is immune to these kinds of attacks (hpack), but I am not<br>
familiar with the details.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Hanno Böck<br>
<a href="http://hboeck.de/" target="_blank">http://hboeck.de/</a><br>
<br>
mail/jabber: <a href="mailto:hanno@hboeck.de">hanno@hboeck.de</a><br>
GPG: BBB51E42<br>
</font></span><br>_______________________________________________<br>
The cryptography mailing list<br>
<a href="mailto:cryptography@metzdowd.com">cryptography@metzdowd.com</a><br>
<a href="http://www.metzdowd.com/mailman/listinfo/cryptography" target="_blank">http://www.metzdowd.com/mailman/listinfo/cryptography</a><br></blockquote></div><br></div></div>