tree: 4796d2413ea0a400288505bf94cbffb8b0fbbbc5 [path history] [tgz]
  1. dbus_bindings/
  2. ftdi/
  3. generator/
  4. placeholders/
  5. resilience/
  6. tmpfiles.d/
  7. authorization_delegate.h
  8. background_command_transceiver.cc
  9. background_command_transceiver.h
  10. background_command_transceiver_test.cc
  11. blob_parser.cc
  12. blob_parser.h
  13. BUILD.gn
  14. com.android.Trunks.conf
  15. command_codes.cc
  16. command_codes.h
  17. command_parser.h
  18. command_transceiver.h
  19. CPPLINT.cfg
  20. creation_blob_fuzzer.cc
  21. dbus_interface.h
  22. dbus_transceiver.h
  23. DIR_METADATA
  24. error_codes.cc
  25. error_codes.h
  26. fuzzed_command_transceiver.cc
  27. fuzzed_command_transceiver.h
  28. hmac_authorization_delegate.cc
  29. hmac_authorization_delegate.h
  30. hmac_authorization_delegate_fuzzer.cc
  31. hmac_authorization_delegate_test.cc
  32. hmac_session.h
  33. hmac_session_impl.cc
  34. hmac_session_impl.h
  35. hmac_session_test.cc
  36. key_blob_fuzzer.cc
  37. Makefile
  38. mock_authorization_delegate.cc
  39. mock_authorization_delegate.h
  40. mock_blob_parser.cc
  41. mock_blob_parser.h
  42. mock_command_parser.h
  43. mock_command_transceiver.cc
  44. mock_command_transceiver.h
  45. mock_dbus_bus.h
  46. mock_dbus_transceiver.h
  47. mock_hmac_session.cc
  48. mock_hmac_session.h
  49. mock_policy_session.cc
  50. mock_policy_session.h
  51. mock_resource_manager.h
  52. mock_response_serializer.h
  53. mock_session_manager.cc
  54. mock_session_manager.h
  55. mock_tpm.cc
  56. mock_tpm.h
  57. mock_tpm_cache.cc
  58. mock_tpm_cache.h
  59. mock_tpm_state.cc
  60. mock_tpm_state.h
  61. mock_tpm_utility.cc
  62. mock_tpm_utility.h
  63. multiple_authorization_delegate.cc
  64. multiple_authorization_delegate.h
  65. multiple_authorization_delegate_test.cc
  66. openssl_utility.cc
  67. openssl_utility.h
  68. openssl_utility_test.cc
  69. org.chromium.Trunks.conf
  70. OWNERS
  71. password_authorization_delegate.cc
  72. password_authorization_delegate.h
  73. password_authorization_delegate_fuzzer.cc
  74. password_authorization_delegate_test.cc
  75. pinweaver.proto
  76. pinweaver_client.cc
  77. policy_session.h
  78. policy_session_impl.cc
  79. policy_session_impl.h
  80. policy_session_test.cc
  81. power_manager.cc
  82. power_manager.h
  83. power_manager_test.cc
  84. README.md
  85. real_command_parser.cc
  86. real_command_parser.h
  87. real_command_parser_test.cc
  88. real_response_serializer.cc
  89. real_response_serializer.h
  90. real_response_serializer_test.cc
  91. resource_manager.cc
  92. resource_manager.h
  93. resource_manager_fuzzer.cc
  94. resource_manager_test.cc
  95. response_serializer.h
  96. scoped_global_session.h
  97. scoped_global_session_test.cc
  98. scoped_key_handle.cc
  99. scoped_key_handle.h
  100. scoped_key_handle_test.cc
  101. session_manager.h
  102. session_manager_impl.cc
  103. session_manager_impl.h
  104. session_manager_test.cc
  105. tpm_alerts.h
  106. tpm_cache.h
  107. tpm_cache_impl.cc
  108. tpm_cache_impl.h
  109. tpm_cache_test.cc
  110. tpm_constants.h
  111. tpm_extended.cc
  112. tpm_generated.cc
  113. tpm_generated.h
  114. tpm_generated_test.cc
  115. tpm_handle.cc
  116. tpm_handle.h
  117. tpm_pinweaver.cc
  118. tpm_pinweaver.h
  119. tpm_pinweaver_fuzzer.cc
  120. tpm_simulator_handle.cc
  121. tpm_simulator_handle.h
  122. tpm_state.h
  123. tpm_state_impl.cc
  124. tpm_state_impl.h
  125. tpm_state_test.cc
  126. tpm_structure_parser.cc
  127. tpm_structure_parser.h
  128. tpm_structure_parser_test.cc
  129. tpm_u2f.cc
  130. tpm_u2f.h
  131. tpm_u2f_test.cc
  132. tpm_utility.h
  133. tpm_utility_impl.cc
  134. tpm_utility_impl.h
  135. tpm_utility_test.cc
  136. tpm_version
  137. trunks_client.cc
  138. trunks_client_test.cc
  139. trunks_client_test.h
  140. trunks_dbus_proxy.cc
  141. trunks_dbus_proxy.h
  142. trunks_dbus_proxy_test.cc
  143. trunks_dbus_service.cc
  144. trunks_dbus_service.h
  145. trunks_export.h
  146. trunks_factory.h
  147. trunks_factory_for_test.cc
  148. trunks_factory_for_test.h
  149. trunks_factory_impl.cc
  150. trunks_factory_impl.h
  151. trunks_factory_test.cc
  152. trunks_ftdi_spi.cc
  153. trunks_ftdi_spi.h
  154. trunks_interface.proto
  155. trunks_metrics.cc
  156. trunks_metrics.h
  157. trunks_send.cc
  158. trunks_testrunner.cc
  159. trunksd-seccomp-amd64.policy
  160. trunksd-seccomp-arm.policy
  161. trunksd-seccomp-arm64.policy
  162. trunksd-seccomp-x86_64.policy
  163. trunksd.cc
  164. trunksd.conf
  165. 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.