3 ms·
That's sounds like a very quick and easy fix. You would need to include a random string of random length in the responce before compression. If it wasn't random
by samwillis 13y ago
That's sounds like a very quick and easy fix. You would need to include a random string of random length in the responce before compression. If it wasn't random the 'padding' itself would just get compressed.
On a html page this could just be an automatically inserted comment after the /body tag. Although there may be attack against it if it is in a predictable location in the compressed output. Maybe it should be inserted somewhere random in the html?
- peterwwillis 13y agoThe way you implement it will be subject to a myriad of application-specific statistical analysis. To my mind, the best way to look at it is like a jigsaw puzzle. If you just took out or added a couple pieces, the whole of the jigsaw remains the same, and it can be trivial to determine what the image is. But shuffle all the pieces into random positions each time and the picture is impossible to decipher. Consider an HTML text that was 500KB, and included a social security number. You add some random padding in a couple places, but not much. There's still 499KB that the attacker probably already knows; he can probably filter out this familiar ciphertext until he's down to the ~1KB of ciphertext he's not positive about, and start drilling down from there. Don't put it past a clever hacker to find more techniques to discover the secret. Randomize the whole thing as much as you can, and pray. (Or disable gzip compression for sensitive content)