stpm-keygen(1)

✨ stpm-keygen ✨

okay bestie, welcome to stpm-keygen, part of the simple-tpm-pk11 family πŸ’–


πŸ’« NAME πŸ’«

stpm-keygen β€” generate a key pair for use with simple-tpm-pk11 πŸ”‘βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

stpm-keygen [ -hps ] -o output file

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. stpm-keygen generates a 2048 RSA key inside the TPM chip, and saves the public key plus the SRK-encrypted private key (that's the "blob", iykyk) into the output file. that's it. that's the whole vibe. πŸ’…


🌸 OPTIONS 🌸

  • -h β€” show usage info. help me help you, bestie 🫢
  • -o output file β€” the output file, where the public key and the key blob get written. this one's not optional, no cap.
  • -p β€” create the key with a PIN / password. the password gets prompted for interactively ✨
  • -s β€” ask for the SRK password interactively. by default the "Well Known Secret" (that's 20 nulls) is used. the SRK password is an access token that has to be presented for the TPM to perform any operation that involves the TPM, and an actual secret password is usually not required or useful. so like, mostly it's just vibes 😌
  • -S β€” generate the key in software instead of hardware. and bestie, the choice between generating in software vs hardware is not an obvious one, fr fr. it's hard to verify the quality of keys generated in hardware (bugs? backdoors? πŸ™ˆ), but software keys have existed in RAM at some point. and because software generated keys have to be generated as migratable keys, they can be extracted by someone who knows the TPM owner password. 😭 so the recommended choice is to generate in hardware β€” which is also the default. slay πŸ‘‘

🌈 EXAMPLES 🌈

the classic:

stpm-keygen -o ~/.simple-tpm-pk11/my.key

with a PIN:

stpm-keygen -p -o ~/.simple-tpm-pk11/my.key
Enter key PIN: my secret password here

with both the SRK PIN and the key PIN:

stpm-keygen -sp -o ~/.simple-tpm-pk11/my.key
Enter SRK PIN: 12345678
Enter key PIN: my secret password here

πŸ’€ DIAGNOSTICS πŸ’€

most errors will probably be related to interacting with the TPM chip. 😩 resetting the TPM chip and taking ownership should take care of most of them. see the TPM-TROUBLESHOOTING section of simple-tpm-pk11(7). go read it, bestie, it's giving lifesaver 🫢


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

Simple-TPM-PK11 was written By Thomas Habets <habets@google.com> / <thomas@habets.se>.

git clone https://github.com/ThomasHabets/simple-tpm-pk11.git

okay that's the whole page, you ate that πŸ’… this was simple-tpm-pk11, version dated 1th December, 2013 β€” yes the "1th" is canon, don't come for me 😭 periodt βœ¨πŸŽ€πŸ’–