Let's say I have a txt file, called harry_potter.txt. I can easily compress it with any compression algorithm.
So the entropy of the file is "smaller" than its size on the disk.
But if I encrypt the file with AES-256-CBC or AES-256-BCB (I used openssl, and enabled -nosalt option), the encrypted file can't be compressed anymore.
Why?
- Does the result encrypted file have more information/entropy? Or is it the weakness of the current compression algorithm?
- If the encrypted file does have more entropy, how does the additional entropy come from?
In the sense of Kolmogorov complexity, the encrypted file doesn't contain much more information than the original, because it can be represented as
encrypt(<your key>, decompress(<compressed file contents>)). But discovering this representation would require knowing your key or cracking the encryption, and that's not the business of compression algorithms.