Score:0

File Size Shrinks After Encryption

us flag

I am a Bitcoin enthusiast, but I have never been formally trained in the study of computer science and cryptography.

Recently, I tried a new way to encrypt my private key: I wrote it down on a paper, and used my camera to take a photo of that paper sheet. Then, I encrypted the photo from pgp4win.

Then I noticed that the size of the photo is significantly smaller after encryption.

Can any expert in cryptography elaborate it to me why the size shrinks so much after encryption by pgp4win? Suppose I repeat encryption followed by decryption for, say, 10,000 times, can I still recover the original photo with all the details of pixels?

Score:8
my flag

PGP4Win (by default) does compression before encrypting. Many photos are extremely compressible, and so that compression shrinks the size a lot - rather more than the encryption overhead, resulting in an ciphertext that's smaller than the original plaintext.

However, encrypting the file again won't help - unlike a photo, an encrypted file is not compressible, and so encrypting it again won't shrink it any.

Libertarian Feudalist Bot avatar
us flag
Thank you very much for your explanation.
Score:3
cm flag

Encryption/decryption schemes are lossless, meaning you should be able to recover ALL of the original data with the proper decryption keys.

It's possible your pgp4win encryption includes some sort of compression as a part of their encryption process. This could be something as simple as zipping the files, and I think you would see a very similar (if not the exact same) size with multiple encryptions.

Only if they were employing some form of lossy compression would the file size continue getting smaller and smaller, and in that case no, you would not be able to recover the original photo with all the details of the pixels.

Libertarian Feudalist Bot avatar
us flag
Thanks for your answer.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.