this post was submitted on 10 Aug 2023
556 points (97.9% liked)
Programmer Humor
19512 readers
366 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
In an ideal encryption, the resulting data should be indistinguishable from random when doing statistical analysis.
So yes, such data will be really hard to compress, so typically compression is done before encryption.
Now here's a twist. The compression before encryption can reveal some details about the encrypted data. This is especially true if attacker has a way to generate encrypted message with part of information that is being encrypted (for example some kind of token etc).
There were attacks on it. For example https://en.wikipedia.org/wiki/CRIME or https://en.wikipedia.org/wiki/BREACH (this was during that idiotic phase where vulnerabilities had those lame-ass names and they even created webpages)
Ideally compression would be done after encryption, but because of issues described earlier, that wouldn't give any benefit.
Bro what are you talking about? These names are ..bad ass! Like, lets do CRIME!