I am new to encryption in general and GPG in particular. My use case is storing personal documents on a network drive. These documents are scans (e.g. diplomas, papers). I generated a GPG key using gpg --gen-key, then encrypted a few images using gpg -e -r <name> <file>. By default it seems to output files named after the original and suffixed by .gpg, for instance diploma.jpg becomes diploma.jpg.gpg.

If the type of the document is known, am I opening the door to a known plaintext attack?

Also, what steps should I take to backup my key (print it on paper...)?

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

i would not worry about the filename and possible knowledge of the first few bytes. but if you are uneasy with that, consider this:

  • you might use a container, either .7z or .zip with aes encryption
  • you might use a container program such as truecrypt

keep in mind:

  • gpg encrypts your file in mixed mode, meaning: it uses the asymetric key to encrypt a "session key" and then use that session key to encrypt the actual data. so, you actually gain nothing by using asymetric keys to encrypt stuff that only you care about (remember: asymetric encryption is only useful for something like key-exchange when the amount of data is relatively small)

  • there is no reason to not use symetric encryption since you want to memorize the passphrase to your files / the container anyway: gpg --symmetric -e

since you described yourself as a newbie to the topic: read a little bit about it in the gnupg-manual:

http://www.gnupg.org/gph/en/manual.html#CONCEPTS

link|improve this answer
Thanks for the info, I did not know about the symmetric encryption feature. – Rom1 Aug 19 '11 at 8:26
feedback

AFAIK knowing the data type an encrypted file holds is of no use at all for cracking, since encryption doesn't care about the type of data. For encryption, they're mere bits (numbers) with no meaning at all.

About your key, most secure option is to remember it because your mind cannot be accessed ;)

link|improve this answer
It does not care about the type of the data, but if a bad guy knows that my cleartext file begins with PNG it might tell something about the key...? Also the key is not something that I can commit to memory (unlike the passphrase), it is much too long. – Rom1 Aug 19 '11 at 8:10
Even if he knows it begins with PNG that tells nothing about the key. He might even know the whole data and still no go (unless brute-forcing or doing dictionary attacks). You can store your key in a keyring, or on another encrypted file with a different encryption scheme. I don't like the paper solution since paper is more easily accessable than one might think. – m0skit0 Aug 19 '11 at 8:16
feedback

Your Answer

 
or
required, but never shown

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