TPM-backed key signer
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-12 19:02:40 -07:00
tpm-signer-core initial commit 2026-10-12 19:02:40 -07:00
tpm-signer-pkcs11 initial commit 2026-10-12 19:02:40 -07:00
tpm-signer-tools initial commit 2026-10-12 19:02:40 -07:00
.gitignore initial commit 2026-10-12 19:02:40 -07:00
Cargo.lock initial commit 2026-10-12 19:02:40 -07:00
Cargo.toml initial commit 2026-10-12 19:02:40 -07:00
LICENSE initial commit 2026-10-12 19:02:40 -07:00
README.md initial commit 2026-10-12 19:02:40 -07:00

tpm-signer

TPM-backed key signer, with PKCS#11 support for OpenSSH.

The workspace is split into three crates:

  • tpm-signer-core handles TPM key generation, wrapped-key parsing, signing, and public-key encoding.
  • tpm-signer-pkcs11 exposes the signer as a PKCS#11 module for clients such as OpenSSH.
  • tpm-signer-tools provides the tpm-signer command-line interface.

Signing keys are generated and used inside the TPM. The key file stores TPM-wrapped public and private blobs; signing loads those blobs into the originating TPM and returns an ECDSA P-256 signature over a SHA-256 digest.

Usage

tpm-signer genkey
tpm-signer pubkey
ssh -I libtpm_signer_pkcs11.so ...

The key is stored at ${XDG_DATA_HOME:-$HOME/.local/share}/tpm-signer/keys/default.toml.

Key format:

public = "<base64 TPM2B_PUBLIC>"
private = "<base64 TPM2B_PRIVATE>"

Development

Build

cargo build

Run

cargo run -- <command> ...

Test

cargo test

License

Apache 2.0. See the LICENSE file.