google/go-tpm

Go

672

289 commits

updated Oct 1, 2026

See the code

README

Go-TPM

Go-TPM is a Go library that communicates directly with a TPM device on Linux or Windows machines.

The libraries don't implement the entire spec for neither 1.2 nor 2.0. If you need a command that's missing, contributions are welcome!

Please note that this is not an official Google product.

Structure

The tpm directory contains TPM 1.2 client library. This library is in "maintenance mode".

The legacy/tpm2 directory contains the legacy TPM 2.0 client library.

The tpm2 directory contains the prototype "TPMDirect" TPM 2.0 API, which is intended to (eventually) be 1:1 with the TPM 2.0 spec. Please report issues, complaints, or suggestions using the label https://github.com/google/go-tpm/labels/tpmdirect.

The examples directory contains some simple examples for both legacy versions of the spec.

TPM 1.2

TPM 1.2 support currently has no maintainer. None of the TPM 2.0 maintainers have expertise on 1.2 either.

As such, TPM 1.2 library is in "maintenance" mode - all PRs with new functionality or non-critical fixes will be rejected.

If you'd like to volunteer to maintain the TPM 1.2 library, you can do so via an issue. You don't have to be a Googler to volunteer.

google/go-tpm

Go

672

289 commits

updated Oct 1, 2026

See the code

README

Go-TPM

Go-TPM is a Go library that communicates directly with a TPM device on Linux or Windows machines.

The libraries don't implement the entire spec for neither 1.2 nor 2.0. If you need a command that's missing, contributions are welcome!

Please note that this is not an official Google product.

Structure

The tpm directory contains TPM 1.2 client library. This library is in "maintenance mode".

The legacy/tpm2 directory contains the legacy TPM 2.0 client library.

The tpm2 directory contains the prototype "TPMDirect" TPM 2.0 API, which is intended to (eventually) be 1:1 with the TPM 2.0 spec. Please report issues, complaints, or suggestions using the label https://github.com/google/go-tpm/labels/tpmdirect.

The examples directory contains some simple examples for both legacy versions of the spec.

TPM 1.2

TPM 1.2 support currently has no maintainer. None of the TPM 2.0 maintainers have expertise on 1.2 either.

As such, TPM 1.2 library is in "maintenance" mode - all PRs with new functionality or non-critical fixes will be rejected.

If you'd like to volunteer to maintain the TPM 1.2 library, you can do so via an issue. You don't have to be a Googler to volunteer.

Project health

Overall

6.2/10

Maintained

1/10

Code review

9/10
OpenSSF Scorecard

Latest release

v0.9.8 · Dec 29, 2025

Releases this year

2

Significant stargazers

Matt Layher

2,094 followers · starred Feb 2017

Jonathan Rudenberg

732 followers · starred Jul 2018

Travis Cline

1,966 followers · starred Feb 2017

Emmanuel T Odeke

716 followers · starred Jan 2025