• takeda@kbin.social
    link
    fedilink
    arrow-up
    8
    ·
    1 year ago

    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.

    • TropicalDingdong@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      idiotic phase where vulnerabilities had those lame-ass names and they even created webpages

      Bro what are you talking about? These names are …bad ass! Like, lets do CRIME!