HELLO, THIS IS

DAN

I ARCHITECT PRAGMATIC AND BEAUTIFUL SOFTWARE.

Change your GPG passphrase


Authors note: The passphrase is an additional layer of encryption on top of your private key. If your private key has already been compromised, changing your passphrase will not help. You need to generate and distribute a revocation certificate for your compromised key(s) immediately.


TL;DR

$ gpg --edit-key dan@example.com
gpg> passwd
gpg> save

Full Text

I spent a little bit of time this weekend coming up with a more secure passphrase for my GPG keys. GPG makes the process very simple, and took maybe a total of 5 minutes (a good 20% of that was just my typing in my new passphrase!).

First, let’s open up our private key:

$ gpg --edit-key dan@example.com

This will run the GPG console and open your private key:

gpg (GnuPG/MacGPG2) 2.0.22; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

<Key stuff>

Now, run GPG’s passwd to set a new passphrase. You’ll be prompted to enter a new passphrase and verification (output omitted below). Lastly, save your key.

gpg> passwd
gpg> save

Done!

Was this helpful?   BTC: 19yX3KZ7bMPdxChtefZ4RhVCzmvpXnYZYj    LTC: LZ1DxLdZEnwpoQvNRtJsifMe28Kt7ijV9n