5 ms·
Would adding some tiny random size help? Based on my poorly understanding, if after compress, but before encrypt we add random 0 to 16 bytes or 1% of size that
by jakozaur 10y ago
Would adding some tiny random size help? Based on my poorly understanding, if after compress, but before encrypt we add random 0 to 16 bytes or 1% of size that could defeat quite a lot of attacks (like CRIME).
- phlo 10y agoThat'll make an attack significantly more time-consuming, but won't prevent it. Instead of instand feedback whether they guessed correctly, an attacker would instead need to send a bunch of requests to determine if the average request size has decreased.
- dllthomas 10y agoWhat if the number of padding bytes is a function of the contents?
- lmm 10y agoThat would add noise to the information the attacker gets, but ultimately the "output" length has to be correlated with the input length, so you can't ever get the amount of information the attacker gets down to zero which is what's needed to make a cipher secure.
- dllthomas 10y ago'ultimately the "output" length has to be correlated with the input length' But perhaps not relative to the size of the secret data, right? (Note that I'm not saying, "Oh, obviously we should just do this to avoid that attack" - I'm hoping to learn by carefully understanding where it breaks down).
- phlo 10y agoCRIME works because the compression/encryption algorithms aren't aware of which data is secret and which isn't. They treat the whole HTTP stream as a stream of text and operate on that. To them, text within the page is just the same as cookie data in the corresponding header field or (for example) the URI in the header. If such a distinction were possible, the system could just not compress secret data. But if that were the case, nonsecret data wouldn't even need to be encrypted; it's nonsecret after all.
- hatsunearu 10y agoYou can achieve this effect by having the compressed content have the same length regardless of attacker input. i.e. don't include any mutable information in your compression.
- deleted 10y ago[deleted]
- cvwright 10y agoIt's really going to depend on what kind of data you're dealing with. For VoIP, if you're smart you can even fool the attacker into guessing a wrong answer of your choosing. See my comment upthread for a link to our NDSS 2009 paper on traffic morphing. I'm not familiar enough with the CRIME attack to say how well such a defense might work. Maybe someone who knows more can chime in.