tree: 1deb25cd4340cc1a1ec2cd7bc0415c3074e217af [path history] [tgz]
  1. ftdi/
  2. generator/
  3. authorization_delegate.h
  4. background_command_transceiver.cc
  5. background_command_transceiver.h
  6. background_command_transceiver_test.cc
  7. blob_parser.cc
  8. blob_parser.h
  9. BUILD.gn
  10. com.android.Trunks.conf
  11. command_transceiver.h
  12. CPPLINT.cfg
  13. creation_blob_fuzzer.cc
  14. dbus_interface.h
  15. error_codes.cc
  16. error_codes.h
  17. fuzzed_command_transceiver.cc
  18. fuzzed_command_transceiver.h
  19. hmac_authorization_delegate.cc
  20. hmac_authorization_delegate.h
  21. hmac_authorization_delegate_test.cc
  22. hmac_session.h
  23. hmac_session_impl.cc
  24. hmac_session_impl.h
  25. hmac_session_test.cc
  26. interface.proto
  27. key_blob_fuzzer.cc
  28. libtrunks.pc.in
  29. Makefile
  30. mock_authorization_delegate.cc
  31. mock_authorization_delegate.h
  32. mock_blob_parser.cc
  33. mock_blob_parser.h
  34. mock_command_transceiver.cc
  35. mock_command_transceiver.h
  36. mock_dbus_bus.h
  37. mock_dbus_object_proxy.h
  38. mock_hmac_session.cc
  39. mock_hmac_session.h
  40. mock_policy_session.cc
  41. mock_policy_session.h
  42. mock_resource_manager.h
  43. mock_session_manager.cc
  44. mock_session_manager.h
  45. mock_tpm.cc
  46. mock_tpm.h
  47. mock_tpm_state.cc
  48. mock_tpm_state.h
  49. mock_tpm_utility.cc
  50. mock_tpm_utility.h
  51. org.chromium.Trunks.conf
  52. OWNERS
  53. password_authorization_delegate.cc
  54. password_authorization_delegate.h
  55. password_authorization_delegate_test.cc
  56. pinweaver.proto
  57. pinweaver_client.cc
  58. policy_session.h
  59. policy_session_impl.cc
  60. policy_session_impl.h
  61. policy_session_test.cc
  62. power_manager.cc
  63. power_manager.h
  64. power_manager_test.cc
  65. README.md
  66. resource_manager.cc
  67. resource_manager.h
  68. resource_manager_fuzzer.cc
  69. resource_manager_test.cc
  70. scoped_global_session.h
  71. scoped_global_session_test.cc
  72. scoped_key_handle.cc
  73. scoped_key_handle.h
  74. scoped_key_handle_test.cc
  75. session_manager.h
  76. session_manager_impl.cc
  77. session_manager_impl.h
  78. session_manager_test.cc
  79. tpm_alerts.h
  80. tpm_constants.h
  81. tpm_generated.cc
  82. tpm_generated.h
  83. tpm_generated_test.cc
  84. tpm_handle.cc
  85. tpm_handle.h
  86. tpm_pinweaver.cc
  87. tpm_pinweaver.h
  88. tpm_simulator_handle.cc
  89. tpm_simulator_handle.h
  90. tpm_state.h
  91. tpm_state_impl.cc
  92. tpm_state_impl.h
  93. tpm_state_test.cc
  94. tpm_utility.h
  95. tpm_utility_impl.cc
  96. tpm_utility_impl.h
  97. tpm_utility_test.cc
  98. tpm_version
  99. trunks_client.cc
  100. trunks_client_test.cc
  101. trunks_client_test.h
  102. trunks_dbus_proxy.cc
  103. trunks_dbus_proxy.h
  104. trunks_dbus_proxy_test.cc
  105. trunks_dbus_service.cc
  106. trunks_dbus_service.h
  107. trunks_export.h
  108. trunks_factory.h
  109. trunks_factory_for_test.cc
  110. trunks_factory_for_test.h
  111. trunks_factory_impl.cc
  112. trunks_factory_impl.h
  113. trunks_factory_test.cc
  114. trunks_ftdi_spi.cc
  115. trunks_ftdi_spi.h
  116. trunks_send.cc
  117. trunks_testrunner.cc
  118. trunksd-seccomp-amd64.policy
  119. trunksd-seccomp-arm.policy
  120. trunksd-seccomp-arm64.policy
  121. trunksd-seccomp-mips.policy
  122. trunksd-seccomp-x86.policy
  123. trunksd-seccomp-x86_64.policy
  124. trunksd-simulator.rc
  125. trunksd.cc
  126. trunksd.conf
  127. trunksd.conf.cr50
  128. trunksd.conf.tpm2_simulator
  129. trunksd.rc
trunks/README.md

Trunks

Trunks is a daemon and library for interfacing with a Trusted Platform Module (TPM).

Be aware that trunks does not comply with the Trusted Computing Group (TCG) Software Stack (TSS) specification.

Components

trunksd

A daemon that centralizes access by other system daemons to a single shared TPM. Other daemons send D-Bus requests to trunksd with TPM commands, trunksd sends them through /dev/tpm0 (which can only be opened by a single process) and responds over D-Bus with the TPM response.

Trunksd also performs resource management for the TPM, loading and unloading objects transparently for the calling daemons.

libtrunks

The calling-daemon side shared library that provides a C++ API for serializing and deserializing various TPM commands and performing higher-level operations.

It is possible to use libtrunks independent of trunksd by providing a custom CommandTransceiver to perform communication directly with a TPM, but the default scenario is when libtrunks and trunksd are used together and communicate over a D-Bus based transceiver.

TPM Specification

See http://www.trustedcomputinggroup.org. This version of trunks is based on TPM 2.0 rev 00.99.

Structures

generator/raw_structures.txt

generator/raw_structures_fixed.txt

This file is a direct PDF scrape (*) of ‘Part 2 - Structures’. The _fixed version includes some manual fixes to make processing easier.

Commands

generator/raw_commands.txt

generator/raw_commands_fixed.txt

This file is a direct PDF scrape (*) of ‘Part 3 - Commands’. The _fixed version includes some manual fixes to make processing easier.

(*) Scraping for this version of trunks used Poppler's pdftotext utility v0.18.4.

Code Generation

generator/extract_structures.sh

Extracts structured information about types, constants, structures, and unions from generator/raw_structures_fixed.txt. The output of this script is intended to be parsed by generator.py.

generator/extract_commands.sh

Extracts structured information about commands from generator/raw_commands_fixed.txt. The output of this script is intended to be parsed by generator.py.

generator/generator.py

Generates C++ serialization and parsing code for TPM commands. Inputs must be formatted as by the extract_* scripts.