When encrypting a file symmetrically with
gpg -c file.txt, when and how does it compress the file?
I was working on a cryptopals challenge and wanted to test out my AES ECB detection function. I made a simple text-file that was around 1KB and encrypted it through the python package PyCrypto, the output file was also 1KB. I took this same file and encrypted it via
gpg and got a file that was only 100B. My ECB detection function completely failed to tell it was 128 AES-ECB.
Edit: I've noticed that no matter the file, when the contents are encoded to b64 the first string is always
jA0EBwMC, yet even removing these first bytes from the data doesn't yield any repeat blocks.
I tried to decompress the file with
bz2, but it put out an error saying it wasn't a bzip2 file. I also can't tell if the file was compressed before the cipher was applied or before. How can you deal with something like this?