2

What are pros and cons for using disk level encryption like VeraCrypt and then turning on compression on mounted (virtually decrypted) drive? It seams to me that this can even increase some performance if data is compressed very good as it will decrease size of files that need to be encrypted. Did anyone do benchmarks of configuration like this?

I can see that compression of already encrypted drive is futile as encrypted data will compress very bad so this will give me only performance downgrade, but encryption of compressed files looks interesting.

10
  • 2
    one pro: ciphertext has less entropy and hence is harder to attack
    – SEJPM
    Apr 21, 2015 at 15:20
  • Ciphertext has less entropy?
    – RoraΖ
    Apr 21, 2015 at 15:28
  • 3
    I think he means that, once compressed, the (compressed) clear text has more entropy (more information per data block) which, in turn, should increase the entropy of the resulting cyphertext as well. That being said, this last thing isn't always true.
    – Stephane
    Apr 21, 2015 at 15:36
  • 1
    Have you run a test? This seems easier to test in practice than to guess in theory. Apr 21, 2015 at 19:04
  • 1

3 Answers 3

1

Compression is Often a Bad Idea, It is a performance killer (unless your using Hardware compression), Most Binary information Compresses very poorly. Only Text is known to save you a lot of disk space when storing. But compressing a volume exposes it to more risk of data loss (not only the encryption but also the compression algorithm can leak data or lose data.)

I have not done any measurements myself recently but I would suspect it only adds complexity and does not do a performance enhancement.

9
  • On what do you base the assumption that compression is a performance killer ? It all depends on the context. On the contrary: many binary data is highly structured and will therefore compress pretty well.
    – Stephane
    Apr 21, 2015 at 15:39
  • 1
    Compression is a 'search and replace' sort of algorithm. you have to pass through the whole file/block find all the common elements, rewrite them into a way that takes less space and store/send it. This means iterating over the same data set N-times. When you do this, your performance is decreased significantly. As opposed to an Cartographic Solution where a block/file is Arithmetically altered to produce a Ciphered text. This can be Heavy as well but it does not contain any intricate loops (unless your Crypto suite Does).
    – LvB
    Apr 21, 2015 at 15:46
  • Most Binary data is less structured than Human readable text. For a simple reason. Humans have a much narrower set of allowed states to communicate meaning over. (26*2 letters 10 digits about 10 'signs') where as a computer uses the full spectrum of the binary slot (so 256 values per byte). This difference is the root cause why text compresses well and Binary data does not.
    – LvB
    Apr 21, 2015 at 15:49
  • 2
    I have to disagree by nature binary data is structured because programs need to know how data is presented to process it. Beginning of an ELF header: 7F 45 4C 46 02 01 01 00 00 00 00 00 00 00 00 00 03 00 3E 00 01 00 00 00 60 16 00 00 00 00 00 00 40 00 00 00 00 00 00 00 40 64 00 00 00 00 00 00 Pretty sure those zeros will compress.
    – RoraΖ
    Apr 21, 2015 at 16:31
  • 1
    There is big difference between binary and compressed binary in this case, being binary does not imply compressed, although most music, video and images will be usually compressed, so one should consider this when choosing which drive/folder to compress. It would be best if one could compress entire drive but algorithm skips known compressed formats. Apr 22, 2015 at 6:06
0

I'm copying a lot of data to a USB hard drive and noticed that it copies data at about 12.4 MB/s unencrypted and only 9.8 MB/s encrypted. This is on an old Core 2 duo computer and so the loss of performance will likely be significantly less with newer faster processors. The drive was encrypted using standard Windows encryption.

0

The advantage of compression comes in when you have something like a backup device (like for your documents), a volume where you do not alter the date (edit the files/ increase their size). If you data is working data, that alters very often, it's not recommended to do any compression. Also, if you have videos or very large files, it's not at all useful to do any compression because the difference in space would be insignificant.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .