25 ms·
Compression already makes a compressed file roughly indistinguishable from random noise (module access to the decompressor). So the patterns have been removed.
by stouset 7y ago
Compression already makes a compressed file roughly indistinguishable from random noise (module access to the decompressor). So the patterns have been removed.
That doesn’t make this good, but it means that one specific example isn’t immediately applicable.
- monocasa 7y agoThere's more in the stream than just compressed data. There'll be metadata info that you can make reasonable guesses about. ECB mode lets you take that information and apply it to other blocks in the ciphertext.
- _jal 7y agoThis thread is an excellent illustration of why you don't want your encryption implemented by merely good coders. You need people who know what they are doing.
- stouset 7y agoI’m literally one of those people who “knows what they’re doing”. This is the problem with discussing ECB on an online forum. There’s no space to have a nuanced discussion without people cargo culting “ECB bad” over every comment. Yes, ECB is almost always the wrong choice. Yes, there are other ways it’s going to fail in this use case. Yes, compression before encryption itself often enables other attacks. No, I should not have to prefix a comment about ECB with this type of disclaimer when I’m making (what should be) an uncontroversial statement that the tux attack doesn’t directly apply to compressed image data. Ironically, when designing a protocol for my company, one of the reasons we didn’t use ECB when it would have been entirely justified (each chunk of data was precisely one block in size and keys were only ever used once) was because of potential backlash from people who only know “ECB bad” and nothing more.
- stouset 7y agoI’m not arguing that. I’m saying that for compressed data, underlying patterns in data aren’t trivially exposed by ECB. Ergo, the “tux” attack on bitmap image files doesn’t really apply here. I meant nothing more and nothing less than that.
- monocasa 7y agoAnd I'm saying that they aren't just sending compressed data, nor would hardly any practical communication application, which makes the "well maybe they have enough entropy that it doesn't matter?" argument moot.
- stouset 7y agoLiterally nobody is making that argument or in any way suggesting that ECB is a great choice. Just that this one specific attack doesn’t apply.