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

FEAT | Support TPM keys #33

Open
sevenbitbyte opened this issue Oct 2, 2023 · 3 comments
Open

FEAT | Support TPM keys #33

sevenbitbyte opened this issue Oct 2, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@sevenbitbyte
Copy link
Member

🚀 Feature Proposal

Support TPM based private keys.

https://superuser.com/questions/1501628/how-to-store-gpg-keys-in-tpm

https://github.com/alonbl/gnupg-pkcs11-scd

https://github.com/tpm2-software/tpm2-pkcs11

@sevenbitbyte sevenbitbyte added the enhancement New feature or request label Oct 2, 2023
@sevenbitbyte
Copy link
Member Author

sevenbitbyte commented Oct 9, 2023

Making progress. Dev'ing against the swtpm in LXD for now. Seems ubuntu 22.04 based distros need gpg upgraded to 2.3.x or 2.4.x versions. Doesn't appear to be a nice package for this so have to build this manually.

GPG + TPM2.0

  • gpg --edit-key
  • keytotpm
  • <<password>>
  • <<password>>

Not much to it really, just select a key and call keytotpm on it and it'll be converted to TPM format.

https://gnupg.org/blog/20210315-using-tpm-with-gnupg-2.3.html

Simulated TPM2.0 in LXD

https://www.youtube.com/watch?v=iE1TN7YIqP0

https://documentation.ubuntu.com/lxd/en/latest/reference/devices_tpm/

Upgrading to GnuPG 2.4.x

https://www.procustodibus.com/blog/2023/02/gpg-2-4-on-ubuntu-22-04/

https://askubuntu.com/questions/1242572/how-to-upgrade-to-gnupg-2-2-8

@sevenbitbyte
Copy link
Member Author

sevenbitbyte commented Oct 9, 2023

apt install libtss2-dev

Needed additional package not mentioned in install guide to get TPM enabled.

Screenshot_2023-10-08_20-08-07

@sevenbitbyte
Copy link
Member Author

sevenbitbyte commented Oct 9, 2023

Not finding container's virtual TPM...

Install ibmtss2 manually from the repo below. Needed additional packages:

  • autoconf
  • libtool

https://sourceforge.net/projects/ibmtpm20tss/

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

No branches or pull requests

1 participant