Factory Reset YubiKey Components

Generate GPG Keys #

1. Create Primary GPG Key #

  1. Run the following command: gpg2 --expert --full-generate-key.
    1. These options allows all the options to be presented interactively for the Key Generation.
      1. This step will allow you to create a passphrase.
  2. We can verify the Primary key has been created: gpg2 --list-keys.
    1. Save the Key ID for the next step!

Now the Primary Key has been created, we can proceed with creating the Subkey pairs.

2. Subkeys #

  1. We would first need to access the key through this command: gpg2 --expert --edit-key <Key ID>.
  2. We can now add the keys as so: addkey.
    1. This is an interactive prompt, we will repeat this for the following types of keys:
      1. Sign
      2. Encrypt
      3. Authenticate
  3. Once we have went through and created all the keys, we can save the changes like so: quit.
  4. Once we quit, we should check to make sure the keys that we created are available: gpg2 --list-keys.