<p dir="ltr">Den 7 maj 2015 23:01 skrev "Bill Cox" <<a href="mailto:waywardgeek@gmail.com">waywardgeek@gmail.com</a>>:<br>
><br>
> On Wed, May 6, 2015 at 2:03 PM, Ben Laurie <<a href="mailto:ben@links.org">ben@links.org</a>> wrote:<br>
>><br>
>> Compression is fundamentally problematic.<br>
>><br>
>> <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security#CRIME_and_BREACH_attacks">http://en.wikipedia.org/wiki/Transport_Layer_Security#CRIME_and_BREACH_attacks</a><br>
>><br>
>> <a href="http://www.links.org/?p=127">http://www.links.org/?p=127</a><br>
><br>
> We need a way to tell the lower-level transport to not encrypt the most sensitive data, by inserting a marker into the stream that disables/enables compression.  This would not stop all data leakage, but at least it could help protect security tokens and other keys.</p>
<p dir="ltr">The easier method is to just pre-encrypt, as that requires no special treatment in the lower layers. Just feed in the data to send. Then you don't need to worry about overzealous compression or dumb optimization. No strange edge cases of accidental activation / deactivation of compression. </p>
<p dir="ltr">If you wish for the encryption to be done in the same software layer you could still add an API in the transport encryption for explicitly encrypting non-compressed sensitive data, with keys derived from the session key, so that the data then can be detected at the other end and decrypted by the software as necessary (no suggestions here for how to tag it as ciphertext decryptable by API).</p>
<p dir="ltr">In the context of a receiving browser, I wonder if it makes sense with anything but automatic transparent decryption acting as if there weren't a second layer of encryption, because otherwise how do you even define the access controls, why would access control to decryption be an improvement over trusting the data flow control in the browser? I think that if you need more control you should encrypt independently from transport encryption. Then you can at least attempt to enforce your own policy in your own code. </p>