What is Linux kernel keystore and why you should use it in your next app
summary
Linux exposes a kernel keystore that holds keys as kernel objects so applications never need to keep private key bytes in their address space; it supports types like readable user keys, nonreadable logon keys, asymmetric keys for signing, and encrypted keys backed by TPM/HSM. The kernel APIs add_key and the fetch-on-demand request_key pair with a configurable helper (the request-key binary) so a demo shows a session key ring destroyed on logout (observed via BPF), and an OpenSSH POC and a Python plugin that provisions per‑app TPM‑wrapped keys by path or checksum work end to end using keyctl.
AI-written summary · about
chapters (15)
- 0:00Introduction and speaker intro
- 1:11What is Linux keystore
- 2:36Keys in memory vulnerabilities
- 9:28Agent model limitations
- 11:11Linux kernel key store explained
- 13:42Key rings and sharing secrets
- 15:07Key ring lifecycle and destruction
- 17:11Key types and use cases
- 19:18Provisioning keys securely
- 22:49Encrypted keys and TPM integration
- 23:09Request key system call
- 26:06Decoupling apps from key stores
- 26:49TPM plugin proof of concept
- 31:43Resources and closing
- 32:23Q&A session
