Since I am new to encryption and have recently been losing stuff, I decided to start a file that contains some passwords for online accounts and whatnot, encrypt it, back it up (and keep a single copy on Google Drive....cloud storage seems insecure to me.)

I was wondering about using GPG though.

Is the default algorithm, CAST5, sufficient? gpg -c file uses it

Is there any chance that my file could be broken by Google? It uses a long password that seems secure.

Should I add extra information throughout to act as "additional entropy"? Maybe dd if=/dev/random >> file

And the most important question...is GPG even right for this job-encrypting basic text files. Is there a better, mroe secure option, or a faster option?

  • 4
    Google Drive IS cloud storage ... – schroeder Jul 8 '14 at 23:13
  • Why not a password manager? KeePass, LastPass, Password1, etc.? – schroeder Jul 8 '14 at 23:14
  • @schroeder I don't know...what if I forget my master password to one of those? And yes, I know GD is cloud, but I still feel weird. They suddenly have all of my data, but they probably did before anyways. – user50625 Jul 8 '14 at 23:18
  • What happens if you lose your password to the GPG-encrypted file? – schroeder Jul 8 '14 at 23:18
  • A password manager also has the ability to use 2FA, which is a huge boost to the security of the data. – schroeder Jul 8 '14 at 23:20

CAST-5 aka CAST-128 is a fine choice of algorithm. It probably hasn't had as much cryptanalysis as, say, AES, but there are no significant publicly-known weaknesses in the algorithm. It's a 128-bit cipher, which is computationally infeasible to brute force, and so all of the security depends on the security of your passphrase. GPG performs a technique known as "key stretching" (see the s2k options) to make it harder to brute force passphrases as well.

GPG is a great tool for encrypting text files -- that's basically what it's designed to do. (Encrypt arbitrary blocks of data.) You can use a password manager if you prefer to have your data structured/managed for you, or select something that plugs in to your browser.

Should I add extra information throughout to act as "additional entropy"? Maybe dd if=/dev/random >> file

This won't do any good. Modern crypto algorithms are not dependent upon any entropy present in the plaintext, but only in the key being used. A known-plaintext attack on a cipher would render it dead from a cryptography point-of-view, so this should not be your concern.

  • Alright, so suing GPG is fine, and the default of CAST-128 is also fine. I assume it wouldn't even compare to AES-256, but then I'd have to actually learn how to use GPG because trying that it asks for UIDs and whatnot – user50625 Jul 8 '14 at 23:55
  • 2
    gpg --cipher-algo AES256 if you want it. – David Jul 8 '14 at 23:59
  • Will I have to remember that when I go to decrypt it or will GPG automatically handle that? – user50625 Jul 9 '14 at 0:30
  • GPG adds a header to the file that includes the algorithm used, so it will know which algorithm to use when decrypting. – David Jul 9 '14 at 3:38
  • I think choosing a good password is more important than the algorithm. If the password was a simple dictionary word, then no cipher algo can save – balki Dec 17 '14 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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