Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Kleopatra (actually gpg4win) on Windows. I've created PGP Private keys, and I would like to store them on my usb stick (e.g. be able to encrypt files only if the private key is available - that is, if the usb stick is in the drive).

How can I do this?

Thanks!

share|improve this question

2 Answers 2

up vote 5 down vote accepted

You cannot move single keys or even keypairs, but you can move the entire keyring:

  1. Move GnuPG data directory (~/.gnupg; on Windows %APPDATA%\.gnupg) to your chosen location.
    • For extra security, copy and secure-wipe instead of just moving (which does an insecure deletion).
  2. Set the GNUPGHOME environment variable to the new location.
    1. System Properties → Advanced → Environment Variables. Alternatively, in Windows 7, search for "environ" in Control Panel.
    2. Click Add, enter GNUPGHOME as name and the new path as value.
      • For example, E:\private\gnupg or C:\mnt\jwir3 flash drive\GnuPG or whatever the hell you moved your keys to.
    3. The currently running programs will not see your changes. Exception: Windows Shell (explorer.exe), which receives a change notification. So you need to close Kleopatra and restart it from the Start menu.

EDIT: Looks like it's actually the GNUPGHOME environment variable, rather than GNUPG_HOME

share|improve this answer
    
Thanks, that's what I was looking for. –  jwir3 Feb 15 '11 at 22:14

I'm using Kleopatra (actually gpg4win) on Windows. I've created PGP Private keys, and I would like to store them on my usb stick (e.g. be able to encrypt files only if the private key is available - that is, if the usb stick is in the drive).

You actually don't ENcrypt files with your private keys. Normally, public-keys do the ENcryption, private keys do the DEcrpytion or signing.

You don't get advantages from carrying your private keys with you. When windows and Cleopatra are set up properly, the keyring-files are protected by passwords. For example when using SMIME on Windows-mashines, the Keys are encrypted with your windows-password.

If someone is able to extract your private keys from your computer, he would probably also be able to install a keylogger on this PC and copy your keyrings from your USB-drive at the moment when you attach it to that PC. Anyone could write a .com that searches for .pgp-files and copies them to a specific location, when a removeable drive is mounted (via autostart-routines).

I agree that it is absolutely reasonable to backup your Keyrings from time to time and store them away, but as soon as someone steals your PGP-keyrings, you have gained nothing. What kind of USB-drives would you use? Corsair Padlocks?

share|improve this answer
    
My motivation for putting it on a thumb drive, or in my case: dropbox, is that I wish to not have to synchronize the keyrings in different places. DRY, etc. For that having them in a self-syncing location would be advantagous, for example a truecrypt container. –  Cornelius Nov 26 '12 at 19:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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