I would like to use dropbox for backing up my gpg keys, IMHO even if dropbox admins gets a copy of the keys they still need the passphrase to use it so is it ok to assume this is safe to do so?

  • I don't actually know what kind of encryption GPG uses to protect its private keys, so I can't comment on the security of it, but I would not do this. I'd just create a different key for each computer I need one on, so that each key never leaves the computer it's created on.
    – David Z
    Sep 14, 2010 at 3:45
  • 1
    I also keep encrypted files in drop box that i need to access from multiple machines so i need to sync the same gpg key. Sep 14, 2010 at 4:33
  • in which case can you encrypt the keys with something you can unencrypt anywhere (an OTFE volume maybe) and stick that on DropBox? Or carry the key files around with you on a USB stick?
    – DMA57361
    Sep 14, 2010 at 7:55

2 Answers 2


I would advise against doing this. True, they need the passphrase, but you should still always keep your private keys under your own direct control. GPG depends on the security model of requiring something you know (the passphrase) and something you have (the key). By letting your key get out there, you're running the risk of completely defeating half of the authentication scheme. I doubt that DropBox employees would ever cross you intentionally, but if they were to have a security breach allowing a 3rd party attacker to gain access, you would be in a bad situation. It would be much safer to keep your keys backed up on some type of physical media like a flash drive.

  • 2
    +1 You password is the weakest link in the chain (it's much smaller and so much easier to brute force (or guess!) than any other part) - if you give someone everything but the password, well, you see my point...
    – DMA57361
    Sep 14, 2010 at 7:53

First, understand that "safe" is always relative. You should be thinking in terms of "safe enough for my use case", and that's ultimately going to be up to you.

GnuPG's scheme for protecting the secret keys is the best anyone currently knows how to do; it generates a symmetric key from your passphrase, and uses that protect the secret key. This symmetric key is never stored; it's derived from the passphrase each time it is required.

This provides fairly strong protection of the secret key. Enough that the best attack for recovering your secret key is guessing your passphrase. Or, put another way, making your secret key "semi-public" by putting it on something like Dropbox means that your key is only as secure as the passphrase you chose to protect it.

Since there are purpose-built tools for cracking GnuPG passphrases, and since Moore's law means cracking passwords gets exponentially easier over time, you need a really strong passphrase to make this any kind of safe.

Depending on what your secret key protects, choosing a decent passphrase may be secure enough to risk putting the key on Dropbox; and the convenience could be worth the risk. But best practice is to only ever allow the secret key on the machine that generated it and one backup/escrow location under your direct control (e.g. printed out and placed in a fireproof safe).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .