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”
[…] (for keytocard, see this post) […]