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