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