How to use existing keys on a YubiKey with a fresh install
rbreslow opened this issue · 2 comments
From linuxboot/heads#1282:
It's not obvious how to store your private keys on a YubiKey.
OEM Factory Reset / Re-Ownership -->
is NOT your friend. Instead, you want to go underGPG Options -->
→Add GPG key to running BIOS and reflash
, which will prompt you to insert a USB drive containing your GPG public key. Then, the next time you selectUpdate checksums and sign all files in /boot
, Heads will prompt you to insert your GPG smartcard.
OEM Factory Reset / Re-Ownership -->
will generate keys on the device, OR, will prompt you to generate keys on a hardware token which led me to accidentally wipe my YubiKey.
I'm imagining some sort of guided menu that asks "Would you like to use an existing GPG key pair?" And then walks the user through flashing their public key to the BIOS, etc.
@rbreslow : On fresh flash, without keeping persistence, Heads detects that no gpg key material exists inside of the firmware:
Resulting in what is showed in doc at https://osresearch.net/Configuring-Keys/#adding-your-pgp-key as this screenshot:
Which proposes two alternatives: OEM Factory reset/Re-Ownership
or Add gpg key to running bios
.
@rbreslow My question to you would be: What would you want to see there instead? Or what would you replace into the OEM Factory reset/Re-Ownership wizard to make it clearer that current secrets will be wiped?
Honestly, I'm not sure. Looking at things now, the UI seems clear to me. But I know I was confused when I was first trying this.
I think that OEM Factory Reset / Re-Ownership
jumped out because my brain thought, "yes! new computer, I want to reset everything."
If that option is meant only for an OEM like Insurgo, I might make it more explicit that, as an end-user, this isn't what you want.
Also, the docs themselves felt dense, and I skimmed through rather than reading closely. Asking myself, "why," I think the Configuring-Keys page looks like an FAQ rather than a linear tutorial. So this made it difficult to find information about the exact type of setup I wanted.
I will have to sit and reflect on this. But I wanted to create an issue so my feeling was tracked.