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 π«Ά-ooutput 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 π
simple-tpm-pk11(7)stpm-sign(1)http://blog.habets.se/2013/11/Should-I-generate-my-keys-in-software-or-hardware
π 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 β¨ππ
π¦ where this page comes from
- debian bookworm: simple-tpm-pk11 0.06-4+b1 Β· Apache-2.0
- debian trixie: simple-tpm-pk11 0.06-5+b1 Β· Apache-2.0
- nixos 26.05: simple-tpm-pk11 0.07
- nixpkgs unstable: simple-tpm-pk11 0.07
- ubuntu jammy: simple-tpm-pk11 0.06-4build1 Β· Apache-2.0
- ubuntu noble: simple-tpm-pk11 0.06-5build2 Β· Apache-2.0
- ubuntu questing: simple-tpm-pk11 0.06-5build2
- ubuntu resolute: simple-tpm-pk11 0.07-1 Β· Apache-2.0
- ubuntu stonking: simple-tpm-pk11 0.07-1build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms