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

Sign generated files with PCKS#7 (and maybe OpenBSD signify) #624

Open
poettering opened this issue Jan 14, 2021 · 0 comments
Open

Sign generated files with PCKS#7 (and maybe OpenBSD signify) #624

poettering opened this issue Jan 14, 2021 · 0 comments
Labels

Comments

@poettering
Copy link
Member

Currently mkosi can sign generated artifacts with gpg. I'd like to move away from that, hence I'd like to see support for alternative signature schemes. Specifically:

  1. I'd particularly love to see PKCS#7 being used for this. This would be particularly interesting since we could use the SecureBoot signature keys for this we already read anyway. You'd thus just need a single key pair/certificate, not many. This would simplify things greatly: if we could sign both the UEFI kernels and the disk images, all the same way things would become so much simpler. Implementation idea: add mkosi.sign.crt + mkosi.sign.key that are preferably used for signing the artifacts if they exist. If they don't, use mkosi.crt + mkosi.key and then change the secureboot logic to follow a similar loic: if mkosi.secure-boot.crt+ mkosi.secure-boot.key exists use tht, but otherwise fall back to the common mkosi.crt+ mkosi.key. That way people can either just have one pair if they want everything signed with the same key, or have two pairs, if they want distinct keys.
  2. The other option is OpenBSD signify. This is simpler and more modern. It's just ed25519 ultimately. very pretty in its simplicity. Trivial to implement if you link to openssl. Drawback: we could use this only for signing the images, it's not suitable for signing UEFI kernels. Matching the PKCS#7 idea we'd introduce mkosi.sign.pub + mkosi.sign.sec (as .pub + .sec are how signify likes to name its key pair files).

(Oh, and maybe we should update the gpg code to look for mkosi.sign.gpg or so as a keyring to extract the gpg keys from, to match the PKCS#7 and signify idea)

I intend to update systemd-importd with the ability to verify downloads with either PKCS#7 and signify signatures.

@poettering poettering added the RFE label Jan 14, 2021
@poettering poettering changed the title RFE: signing generated files with PCKS#7 RFE: signing generated files with PCKS#7 (and maybe OpenBSD signify) Jan 14, 2021
@DaanDeMeyer DaanDeMeyer changed the title RFE: signing generated files with PCKS#7 (and maybe OpenBSD signify) Sign generated files with PCKS#7 (and maybe OpenBSD signify) Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant