Yubikey pgp config
Last modification:
gpg --expert --full-gen-key
- Enter
RSA - Enter
4096 - Enter expiration date
- Enter user information and email
- Enter random input (mouse, keyboard) to gain entropy
Output:
gpg: key <keyID> marked as ultimately trusted
Add authentication key (if not default)
gpg --expert --edit-key <keyID>
addkey
- Enter the
passphrase - Enter
8for RSA - Enter
Sfor disabling “sign” - Enter
Efor disabling “encrypt” - Enter
Afor enabling “authentication” - Enter
Qfor leaving dialoge - Enter key size
- Enter same expiration date as before
- Enter
Yto safe the changes
Back pgp-Key up
gpg --export-secret-key --armor <keyID>
- Store output safe
Add pgp-keys to the YubiKey
- Insert YubiKey into a USB port
gpg --expert --edit-key <keyID>
addkey
- Signature subkey:
- Enter
keytocard - Enter
Yto continue - Enter
1to move the signature subkey to a slot in the yubikey - Enter
key 1
- Enter
- Encryption subkey:
- Enter
keytocard - Enter
Yto continue - Enter
2to move the encryption subkey to a slot in the yubikey - Enter
key 1 - Enter
key 2
- Enter
- Authentication subkey
- Enter
keytocard - Enter
3to move the authentication subkey to a slot in the yubikey
- Enter
- Enter
quitto leave
When asked do not safe your changes enabling you to copy the key to another Yubikey.