tree: 20ed8021024637e492670d20fa5969a2ad75e4b6 [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_fuzzer.cc
  22. hmac_authorization_delegate_test.cc
  23. hmac_session.h
  24. hmac_session_impl.cc
  25. hmac_session_impl.h
  26. hmac_session_test.cc
  27. interface.proto
  28. key_blob_fuzzer.cc
  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_hmac_session.cc
  38. mock_hmac_session.h
  39. mock_policy_session.cc
  40. mock_policy_session.h
  41. mock_resource_manager.h
  42. mock_session_manager.cc
  43. mock_session_manager.h
  44. mock_tpm.cc
  45. mock_tpm.h
  46. mock_tpm_cache.cc
  47. mock_tpm_cache.h
  48. mock_tpm_state.cc
  49. mock_tpm_state.h
  50. mock_tpm_utility.cc
  51. mock_tpm_utility.h
  52. openssl_utility.cc
  53. openssl_utility.h
  54. openssl_utility_test.cc
  55. org.chromium.Trunks.conf
  56. OWNERS
  57. password_authorization_delegate.cc
  58. password_authorization_delegate.h
  59. password_authorization_delegate_fuzzer.cc
  60. password_authorization_delegate_test.cc
  61. pinweaver.proto
  62. pinweaver_client.cc
  63. policy_session.h
  64. policy_session_impl.cc
  65. policy_session_impl.h
  66. policy_session_test.cc
  67. power_manager.cc
  68. power_manager.h
  69. power_manager_test.cc
  70. README.md
  71. resource_manager.cc
  72. resource_manager.h
  73. resource_manager_fuzzer.cc
  74. resource_manager_test.cc
  75. scoped_global_session.h
  76. scoped_global_session_test.cc
  77. scoped_key_handle.cc
  78. scoped_key_handle.h
  79. scoped_key_handle_test.cc
  80. session_manager.h
  81. session_manager_impl.cc
  82. session_manager_impl.h
  83. session_manager_test.cc
  84. tpm_alerts.h
  85. tpm_cache.h
  86. tpm_cache_impl.cc
  87. tpm_cache_impl.h
  88. tpm_cache_test.cc
  89. tpm_constants.h
  90. tpm_extended.cc
  91. tpm_generated.cc
  92. tpm_generated.h
  93. tpm_generated_test.cc
  94. tpm_handle.cc
  95. tpm_handle.h
  96. tpm_pinweaver.cc
  97. tpm_pinweaver.h
  98. tpm_pinweaver_fuzzer.cc
  99. tpm_simulator_handle.cc
  100. tpm_simulator_handle.h
  101. tpm_state.h
  102. tpm_state_impl.cc
  103. tpm_state_impl.h
  104. tpm_state_test.cc
  105. tpm_utility.h
  106. tpm_utility_impl.cc
  107. tpm_utility_impl.h
  108. tpm_utility_test.cc
  109. tpm_version
  110. trunks_client.cc
  111. trunks_client_test.cc
  112. trunks_client_test.h
  113. trunks_dbus_proxy.cc
  114. trunks_dbus_proxy.h
  115. trunks_dbus_proxy_test.cc
  116. trunks_dbus_service.cc
  117. trunks_dbus_service.h
  118. trunks_export.h
  119. trunks_factory.h
  120. trunks_factory_for_test.cc
  121. trunks_factory_for_test.h
  122. trunks_factory_impl.cc
  123. trunks_factory_impl.h
  124. trunks_factory_test.cc
  125. trunks_ftdi_spi.cc
  126. trunks_ftdi_spi.h
  127. trunks_send.cc
  128. trunks_testrunner.cc
  129. trunksd-seccomp-amd64.policy
  130. trunksd-seccomp-arm.policy
  131. trunksd-seccomp-arm64.policy
  132. trunksd-seccomp-mips.policy
  133. trunksd-seccomp-x86.policy
  134. trunksd-seccomp-x86_64.policy
  135. trunksd-simulator.rc
  136. trunksd.cc
  137. trunksd.conf
  138. trunksd.conf.cr50
  139. trunksd.conf.tpm2_simulator
  140. 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.