2
$\begingroup$

When using symmetric encryption is it important to compress the data first?

I think that compression will make data look "more random" and therefore be more difficult to crack, but I am not sure if this is a requirement.

Could compression be necessary for some ciphers but not for others?

$\endgroup$
4
$\begingroup$

When using symmetric encryption is it important to compress the data first?

No, not really (unless you're concerned with bandwidth usage). On the other hand, compressing the message can leak data (for example, how compressible the data is).

Could it be the case for some ciphers but not for others?

No, or at least, not for any cipher that we would consider secure. If there is a cipher that is marginal enough for this to matter, we would consider that cipher to be insecure (and ought to be replaced by something where this doesn't matter).

It might be of some marginal help if the key is weak. For example, if the key is based on a guessable password, compressing the plaintext might make it marginally more difficult (because, to test a trial password, the attacker would need to decrypt slightly more before being able to check to see if the decryption is plausible). On the other hand, if you were close enough to the margin where this matters, you're in danger anyways.

$\endgroup$
  • 2
    $\begingroup$ Compressing can leak far more than that, as evidenced by the CRIME and BREACH attacks against compressed TLS connections. $\endgroup$ – Stephen Touset Jun 15 '15 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.