simple-tpm-pk11(7)
π simple-tpm-pk11 π
okay bestie, sit down, grab a strawberry π, because we're talking about simple-tpm-pk11 β that's the page you're reading, section 7 of the manual, and it's literally a PKCS11 provider for TPM chips. β¨
π¦ NAME π¦
simple-tpm-pk11 β the simple PKCS11 provider for TPM chips. that's it, that's the name, and it's giving main character energy fr fr.
β¨ DESCRIPTION β¨
so like, simple-tpm-pk11 is a PKCS11 provider for TPM chips. its whole primary purpose β and I mean the entire point, no cap β is to protect SSH client keys so that they literally cannot be copied or stolen if the machine they're chilling on gets compromised. π‘οΈ
think of it like this: your keys stay safe in the TPM, and if some hacker girly pops onto your machine, she's not walking away with your keys. periodt. π
π OPTIONS π
okay so here's the thing: PKCS11 modules are .so files, right? they get loaded by other binaries. and because of that, they don't take command line options. no flags, no -h, nothing. so instead, simple-tpm-pk11 options get set up through environment variables. slay. π
SIMPLE_TPM_PK11_DEBUGβ if you set this, it enables debug level logging. that's it, just set it and watch the logs go brrr. π₯SIMPLE_TPM_PK11_CONFIG=/path/to/configβ this overrides the default config location. and the default? it's~/.simple-tpm-pk11/config. πSIMPLE_TPM_PK11_LOG_STDERRβ if set, this copies all the log output toSTDERR. all of it. every last crumb. π«Ά
πΈ CONFIGURATION FILE πΈ
the config file is a key/value situation, and comment lines start with "#". classic. iconic.
keykey file β full path to the key file, or a path relative to~/.simple-tpm-pk11. and listen β this is the only required configuration option. everything else is optional, bestie. πdebugβ enables debug level logging. same vibe as the env var, just in file form. β¨srk_pinPIN β sets the SRK PIN. and the default? the Well Known Secret, which is literally20nulls. not me being dramatic, that's just what it is. πkey_pinPIN β sets the key PIN. πloglog file β full path to the log file, or a path relative to~/.simple-tpm-pk11. π
π EXAMPLES π
# Load key from ~/.simple-tpm-pk11/my.key.
key my.key
# Load key from /keys/foo/my.key, and the empty string as SRK PIN.
key /keys/foo/my.key
srk_pin
like, look at that. first one loads a key from ~/.simple-tpm-pk11/my.key. second one loads a key from /keys/foo/my.key and uses the empty string as the SRK PIN. obsessed. π«Ά
π§ TPM-TROUBLESHOOTING π§
TODO.
yeah. that's the whole section. we love a placeholder. π
π©Ί DIAGNOSTICS π©Ί
most errors are probably gonna be about interacting with the TPM chip, ngl. and the fix for most of them? reset the TPM chip and take ownership. that should take care of most of them, fr fr. and if you're lost, go peek at the TPM-TROUBLESHOOTING section. β¨
π BUGS π
okay so this is the part where we're honest: the password is read from stdin without turning off echo. it should be read from the terminal without echo. it's not. that's the bug. π
lowkey important: your password will be visible while you type it. just so you know. π
π SEE ALSO π
go read those too, bestie, they're the supporting cast. π
π AUTHOR π
Simple-TPM-PK11 was written By Thomas Habets <habets@google.com> / <thomas@habets.se>.
and if you wanna clone it (which you should, obviously):
git clone https://github.com/ThomasHabets/simple-tpm-pk11.git
and that's the whole page, bestie!! this was simple-tpm-pk11, manual section 7, and the source is simple-tpm-pk11, dated 1th December, 2013. yeah, "1th" β I'm not fixing it, it's iconic, it's staying. πβ¨ thanks for reading, now go protect those SSH keys. mwah. π
π¦
π¦ 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