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