Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use existing keys on a YubiKey with a fresh install #117

Open
rbreslow opened this issue Jan 18, 2023 · 2 comments
Open

How to use existing keys on a YubiKey with a fresh install #117

rbreslow opened this issue Jan 18, 2023 · 2 comments

Comments

@rbreslow
Copy link

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 under GPG 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 select Update 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.

@tlaurion
Copy link
Collaborator

@rbreslow : On fresh flash, without keeping persistence, Heads detects that no gpg key material exists inside of the firmware:

https://github.com/osresearch/heads/blob/e45980d33f46c9d3aa2855e1876e915a8fc53cdd/initrd/bin/gui-init#L281-L315

Resulting in what is showed in doc at https://osresearch.net/Configuring-Keys/#adding-your-pgp-key as this screenshot:
IMG_20720216_040452

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?

@rbreslow
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants