Categories
Crypto

GPG Key to Card

How to move your PGP private key across to a smartcard using gpg for Windows:

gpg --edit-key Key_ID_here

*
You should see some background on your key. Key line is “Secret key available.”

GPG will enter interactive mode – you will see gpg> at the start of the command line.

toggle

then

key 1

followed by

keytocard

When asked to select where to store the key, enter:

2

(It’s got an E flag, so can only be stored in the E slot on card). You will then need to enter your passphrase followed by the admin key on the card.

key 1

then

key 0
keytocard

Really move the primary key? (y/N)

y

Please select where to store the key:
(1) Signature key
(3) Authentication key
Your selection?

1

You will be asked for your passphrase and then your admin PIN again.

finally:

save

And you’re done.

One reply on “GPG Key to Card”

Leave a Reply to Finding your way around GPG | Milo Noblet Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.