Clone this repo:
  1. 4ec0b67 tests: create StartAuthSession tests by Jarkko Sakkinen · 11 hours ago main
  2. 4e2148b refactor(integer): use tpm_integer! for u8 by Jarkko Sakkinen · 13 hours ago
  3. f5f6331 fix(message): correct wrong field type in StartAuthSession by Jarkko Sakkinen · 15 hours ago
  4. 86d7c3e refactor!(message): decouple TpmHeader from the build trait by Jarkko Sakkinen · 21 hours ago
  5. 15800ad perf(message): avoid buffer copy during command parsing by Jarkko Sakkinen · 22 hours ago queue

TPM 2.0 marshaller/unmarshaller

A unipolar no_std TPM 2.0 implementation that does not require heap allocator and has zero dependencies.

Development

Mailing List

The list can be subscribed by sending an empty message to tpm-protocol+subscribe@lists.linux.dev, Unsubscribing follows the same exact pattern except that the subaddress is +unsubscribe. With that all out of the way it is good to remark that the process is relaxed in the sense that opening a thread in the list, or submitting a patch does not require a subscription.

As already denoted in the previous section, patches and other messages can be posted to tpm-protocol@lists.linux.dev. The mailing list archive is available at https://lore.kernel.org/tpm-protocol/.

NOTE: emails must be in text/plain. format. Emails in any other format, e.g. text/html, will be automatically discarded by the list server, and they won't appear in the mailing list.

Build System

The project provides a Makefile with make test target. The unit test is by design compiling with GNU make and rustc, and it outputs kselftest compatible exit codes. This ensures that is code that can be imported to Linux kernel.

Architecture

tpm2_protocol is a low-level and policy-free library for TPM 2.0 command and response building and parsing.

The primary design goal is to be correct against TCG specifications, and to be usable in constrained environments.

The correctness is validated to the point that no rules will be introduced that could be considered as policy. In particular the number of sessions is limited against MAX_SESSIONS but not against number of allowed sessions specified for a particular command.

Licensing

The tpm2-protocol library is licensed under the permissive MIT OR Apache-2.0 license to allow for wide adoption.