tpm2_gettime.1 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. .\" Automatically generated by Pandoc 1.19.2.4
  2. .\"
  3. .TH "tpm2_gettime" "1" "" "tpm2\-tools" "General Commands Manual"
  4. .hy
  5. .SH NAME
  6. .PP
  7. \f[B]tpm2_gettime\f[](1) \- Get the current time and clock from the TPM
  8. in a signed form.
  9. .SH SYNOPSIS
  10. .PP
  11. \f[B]tpm2_gettime\f[] [\f[I]OPTIONS\f[]] [\f[I]ARGUMENT\f[]]
  12. .SH DESCRIPTION
  13. .PP
  14. \f[B]tpm2_gettime\f[](1) \- Provides a signed copy of the current time
  15. and clock from the TPM.
  16. It returns both a signature, and the data in the standard TPM
  17. attestation form, a TPMS_ATTEST structure.
  18. .PP
  19. It outputs to stdout, in YAML format, the TPMS_TIME_INFO structure from
  20. the TPM.
  21. The structure contains the current setting of Time, Clock, resetCount,
  22. and restartCount.
  23. The structure is output as YAML defined as:
  24. .IP
  25. .nf
  26. \f[C]
  27. time:\ 13673142\ \ \ \ \ #\ 64\ bit\ value\ of\ time\ since\ last\ _TPM_Init\ or\ TPM2_Startup
  28. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ in\ ms.
  29. clock_info:
  30. \ \ clock:\ 13673142\ \ #\ 64\ bit\ value\ of\ time\ TPM\ has\ been\ powered\ on\ in\ ms.
  31. \ \ reset_count:\ 0\ \ \ #\ 32\ bit\ value\ of\ the\ number\ of\ TPM\ Resets\ since\ the\ last
  32. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ TPM2_Clear.
  33. \ \ restart_count:\ 0\ #\ 32\ bit\ value\ of\ the\ number\ of\ times\ that\ TPM2_Shutdown\ or
  34. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ _TPM_Hash_Start\ have\ occurred\ since\ the\ last\ TPM\ Reset\ or
  35. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ TPM2_Clear.
  36. \ \ safe:\ yes\ \ \ \ \ \ \ \ #\ boolean\ yes|no\ value\ that\ no\ value\ of\ Clock\ greater\ than
  37. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ the\ current\ value\ of\ Clock\ has\ been\ previously\ reported\ by
  38. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ the\ TPM.
  39. \f[]
  40. .fi
  41. .SH OPTIONS
  42. .IP \[bu] 2
  43. \f[B]\-c\f[], \f[B]\-\-key\-context\f[]=\f[I]OBJECT\f[]:
  44. .RS 2
  45. .PP
  46. Context object pointing to the the key used for signing.
  47. Either a file or a handle number.
  48. See section "Context Object Format".
  49. .RE
  50. .IP \[bu] 2
  51. \f[B]\-p\f[], \f[B]\-\-auth\f[]\f[I]AUTH\f[]:
  52. .RS 2
  53. .PP
  54. Optional authorization value to use the key specified by \f[B]\-c\f[].
  55. Authorization values should follow the "authorization formatting
  56. standards", see section "Authorization Formatting".
  57. .RE
  58. .IP \[bu] 2
  59. \f[B]\-P\f[], \f[B]\-\-endorse\-auth\f[]\f[I]AUTH\f[]:
  60. .RS 2
  61. .PP
  62. Optional authorization value for the endorsement hierarchy.
  63. Authorization values should follow the "authorization formatting
  64. standards", see section "Authorization Formatting".
  65. .RE
  66. .IP \[bu] 2
  67. \f[B]\-g\f[], \f[B]\-\-hash\-algorithm\f[]=\f[I]ALGORITHM\f[]:
  68. .RS 2
  69. .PP
  70. The hash algorithm used to digest the message.
  71. Algorithms should follow the "formatting standards", see section
  72. "Algorithm Specifiers".
  73. Also, see section "Supported Hash Algorithms" for a list of supported
  74. hash algorithms.
  75. .RE
  76. .IP \[bu] 2
  77. \f[B]\-s\f[], \f[B]\-\-scheme\f[]=\f[I]ALGORITHM\f[]:
  78. .RS 2
  79. .PP
  80. The signing scheme used to sign the message.
  81. Optional.
  82. Signing schemes should follow the "formatting standards", see section
  83. "Algorithm Specifiers".
  84. Also, see section "Supported Signing Schemes" for a list of supported
  85. signature schemes.
  86. If specified, the signature scheme must match the key type.
  87. If left unspecified, a default signature scheme for the key type will be
  88. used.
  89. .RE
  90. .IP \[bu] 2
  91. \f[B]\-q\f[], \f[B]\-\-qualification\f[]=\f[I]FILE_OR_HEX_STR\f[]:
  92. .RS 2
  93. .PP
  94. Optional, the policy qualifier data that the signer can choose to
  95. include in the signature.
  96. Can be either a hex string or path.
  97. .RE
  98. .IP \[bu] 2
  99. \f[B]\-o\f[], \f[B]\-\-signature\f[]=\f[I]FILE\f[]:
  100. .RS 2
  101. .PP
  102. The signature file, records the signature structure.
  103. .RE
  104. .IP \[bu] 2
  105. \f[B]\-f\f[], \f[B]\-\-format\f[]=\f[I]FORMAT\f[]:
  106. .RS 2
  107. .PP
  108. Format selection for the signature output file.
  109. See section "Signature Format Specifiers".
  110. .RE
  111. .IP \[bu] 2
  112. \f[B]\-\-attestation\f[]=\f[I]FILE\f[]:
  113. .RS 2
  114. .PP
  115. The attestation data of the type TPMS_ATTEST signed with signing key.
  116. .RE
  117. .IP \[bu] 2
  118. \f[B]\-\-cphash\f[]=\f[I]FILE\f[]
  119. .RS 2
  120. .PP
  121. File path to record the hash of the command parameters.
  122. This is commonly termed as cpHash.
  123. NOTE: When this option is selected, The tool will not actually execute
  124. the command, it simply returns a cpHash.
  125. .RE
  126. .IP \[bu] 2
  127. \f[B]ARGUMENT\f[] the command line argument specifies the file data for
  128. sign.
  129. .SS References
  130. .SH Context Object Format
  131. .PP
  132. The type of a context object, whether it is a handle or file name, is
  133. determined according to the following logic \f[I]in\-order\f[]:
  134. .IP \[bu] 2
  135. If the argument is a file path, then the file is loaded as a restored
  136. TPM transient object.
  137. .IP \[bu] 2
  138. If the argument is a \f[I]prefix\f[] match on one of:
  139. .RS 2
  140. .IP \[bu] 2
  141. owner: the owner hierarchy
  142. .IP \[bu] 2
  143. platform: the platform hierarchy
  144. .IP \[bu] 2
  145. endorsement: the endorsement hierarchy
  146. .IP \[bu] 2
  147. lockout: the lockout control persistent object
  148. .RE
  149. .IP \[bu] 2
  150. If the argument argument can be loaded as a number it will be treat as a
  151. handle, e.g.
  152. 0x81010013 and used directly.\f[I]OBJECT\f[].
  153. .SH Authorization Formatting
  154. .PP
  155. Authorization for use of an object in TPM2.0 can come in 3 different
  156. forms: 1.
  157. Password 2.
  158. HMAC 3.
  159. Sessions
  160. .PP
  161. \f[B]NOTE:\f[] "Authorizations default to the \f[B]EMPTY PASSWORD\f[]
  162. when not specified".
  163. .SS Passwords
  164. .PP
  165. Passwords are interpreted in the following forms below using prefix
  166. identifiers.
  167. .PP
  168. \f[B]Note\f[]: By default passwords are assumed to be in the string form
  169. when they do not have a prefix.
  170. .SS String
  171. .PP
  172. A string password, specified by prefix "str:" or it\[aq]s absence (raw
  173. string without prefix) is not interpreted, and is directly used for
  174. authorization.
  175. .SS Examples
  176. .IP
  177. .nf
  178. \f[C]
  179. foobar
  180. str:foobar
  181. \f[]
  182. .fi
  183. .SS Hex\-string
  184. .PP
  185. A hex\-string password, specified by prefix "hex:" is converted from a
  186. hexidecimal form into a byte array form, thus allowing passwords with
  187. non\-printable and/or terminal un\-friendly characters.
  188. .SS Example
  189. .IP
  190. .nf
  191. \f[C]
  192. hex:0x1122334455667788
  193. \f[]
  194. .fi
  195. .SS File
  196. .PP
  197. A file based password, specified be prefix "file:" should be the path of
  198. a file containing the password to be read by the tool or a "\-" to use
  199. stdin.
  200. Storing passwords in files prevents information leakage, passwords
  201. passed as options can be read from the process list or common shell
  202. history features.
  203. .SS Examples
  204. .IP
  205. .nf
  206. \f[C]
  207. #\ to\ use\ stdin\ and\ be\ prompted
  208. file:\-
  209. #\ to\ use\ a\ file\ from\ a\ path
  210. file:path/to/password/file
  211. #\ to\ echo\ a\ password\ via\ stdin:
  212. echo\ foobar\ |\ tpm2_tool\ \-p\ file:\-
  213. #\ to\ use\ a\ bash\ here\-string\ via\ stdin:
  214. tpm2_tool\ \-p\ file:\-\ <<<\ foobar
  215. \f[]
  216. .fi
  217. .SS Sessions
  218. .PP
  219. When using a policy session to authorize the use of an object, prefix
  220. the option argument with the \f[I]session\f[] keyword.
  221. Then indicate a path to a session file that was created with
  222. tpm2_startauthsession(1).
  223. Optionally, if the session requires an auth value to be sent with the
  224. session handle (eg policy password), then append a + and a string as
  225. described in the \f[B]Passwords\f[] section.
  226. .SS Examples
  227. .PP
  228. To use a session context file called \f[I]session.ctx\f[].
  229. .IP
  230. .nf
  231. \f[C]
  232. session:session.ctx
  233. \f[]
  234. .fi
  235. .PP
  236. To use a session context file called \f[I]session.ctx\f[] \f[B]AND\f[]
  237. send the authvalue mypassword.
  238. .IP
  239. .nf
  240. \f[C]
  241. session:session.ctx+mypassword
  242. \f[]
  243. .fi
  244. .PP
  245. To use a session context file called \f[I]session.ctx\f[] \f[B]AND\f[]
  246. send the \f[I]HEX\f[] authvalue 0x11223344.
  247. .IP
  248. .nf
  249. \f[C]
  250. session:session.ctx+hex:11223344
  251. \f[]
  252. .fi
  253. .SS PCR Authorizations
  254. .PP
  255. You can satisfy a PCR policy using the "pcr:" prefix and the PCR
  256. minilanguage.
  257. The PCR minilanguage is as follows:
  258. \f[C]<pcr\-spec>=<raw\-pcr\-file>\f[]
  259. .PP
  260. The PCR spec is documented in in the section "PCR bank specifiers".
  261. .PP
  262. The \f[C]raw\-pcr\-file\f[] is an \f[B]optional\f[] the output of the
  263. raw PCR contents as returned by \f[I]tpm2_pcrread(1)\f[].
  264. .PP
  265. PCR bank specifiers (common/pcr.md)
  266. .SS Examples
  267. .PP
  268. To satisfy a PCR policy of sha256 on banks 0, 1, 2 and 3 use a specifier
  269. of:
  270. .IP
  271. .nf
  272. \f[C]
  273. pcr:sha256:0,1,2,3
  274. \f[]
  275. .fi
  276. .PP
  277. specifying \f[I]AUTH\f[].
  278. .SH Algorithm Specifiers
  279. .PP
  280. Options that take algorithms support "nice\-names".
  281. .PP
  282. There are two major algorithm specification string classes, simple and
  283. complex.
  284. Only certain algorithms will be accepted by the TPM, based on usage and
  285. conditions.
  286. .SS Simple specifiers
  287. .PP
  288. These are strings with no additional specification data.
  289. When creating objects, non\-specified portions of an object are assumed
  290. to defaults.
  291. You can find the list of known "Simple Specifiers Below".
  292. .SS Asymmetric
  293. .IP \[bu] 2
  294. rsa
  295. .IP \[bu] 2
  296. ecc
  297. .SS Symmetric
  298. .IP \[bu] 2
  299. aes
  300. .IP \[bu] 2
  301. camellia
  302. .SS Hashing Algorithms
  303. .IP \[bu] 2
  304. sha1
  305. .IP \[bu] 2
  306. sha256
  307. .IP \[bu] 2
  308. sha384
  309. .IP \[bu] 2
  310. sha512
  311. .IP \[bu] 2
  312. sm3_256
  313. .IP \[bu] 2
  314. sha3_256
  315. .IP \[bu] 2
  316. sha3_384
  317. .IP \[bu] 2
  318. sha3_512
  319. .SS Keyed Hash
  320. .IP \[bu] 2
  321. hmac
  322. .IP \[bu] 2
  323. xor
  324. .SS Signing Schemes
  325. .IP \[bu] 2
  326. rsassa
  327. .IP \[bu] 2
  328. rsapss
  329. .IP \[bu] 2
  330. ecdsa
  331. .IP \[bu] 2
  332. ecdaa
  333. .IP \[bu] 2
  334. ecschnorr
  335. .SS Asymmetric Encryption Schemes
  336. .IP \[bu] 2
  337. oaep
  338. .IP \[bu] 2
  339. rsaes
  340. .IP \[bu] 2
  341. ecdh
  342. .SS Modes
  343. .IP \[bu] 2
  344. ctr
  345. .IP \[bu] 2
  346. ofb
  347. .IP \[bu] 2
  348. cbc
  349. .IP \[bu] 2
  350. cfb
  351. .IP \[bu] 2
  352. ecb
  353. .SS Misc
  354. .IP \[bu] 2
  355. null
  356. .SS Complex Specifiers
  357. .PP
  358. Objects, when specified for creation by the TPM, have numerous
  359. algorithms to populate in the public data.
  360. Things like type, scheme and asymmetric details, key size, etc.
  361. Below is the general format for specifying this data:
  362. \f[C]<type>:<scheme>:<symmetric\-details>\f[]
  363. .SS Type Specifiers
  364. .PP
  365. This portion of the complex algorithm specifier is required.
  366. The remaining scheme and symmetric details will default based on the
  367. type specified and the type of the object being created.
  368. .IP \[bu] 2
  369. aes \- Default AES: aes128
  370. .IP \[bu] 2
  371. aes128\f[C]<mode>\f[] \- 128 bit AES with optional mode
  372. (\f[I]ctr\f[]|\f[I]ofb\f[]|\f[I]cbc\f[]|\f[I]cfb\f[]|\f[I]ecb\f[]).
  373. If mode is not specified, defaults to \f[I]null\f[].
  374. .IP \[bu] 2
  375. aes192\f[C]<mode>\f[] \- Same as aes128\f[C]<mode>\f[], except for a 192
  376. bit key size.
  377. .IP \[bu] 2
  378. aes256\f[C]<mode>\f[] \- Same as aes128\f[C]<mode>\f[], except for a 256
  379. bit key size.
  380. .IP \[bu] 2
  381. ecc \- Elliptical Curve, defaults to ecc256.
  382. .IP \[bu] 2
  383. ecc192 \- 192 bit ECC
  384. .IP \[bu] 2
  385. ecc224 \- 224 bit ECC
  386. .IP \[bu] 2
  387. ecc256 \- 256 bit ECC
  388. .IP \[bu] 2
  389. ecc384 \- 384 bit ECC
  390. .IP \[bu] 2
  391. ecc521 \- 521 bit ECC
  392. .IP \[bu] 2
  393. rsa \- Default RSA: rsa2048
  394. .IP \[bu] 2
  395. rsa1024 \- RSA with 1024 bit keysize.
  396. .IP \[bu] 2
  397. rsa2048 \- RSA with 2048 bit keysize.
  398. .IP \[bu] 2
  399. rsa4096 \- RSA with 4096 bit keysize.
  400. .SS Scheme Specifiers
  401. .PP
  402. Next, is an optional field, it can be skipped.
  403. .PP
  404. Schemes are usually \f[B]Signing Schemes\f[] or \f[B]Asymmetric
  405. Encryption Schemes\f[].
  406. Most signing schemes take a hash algorithm directly following the
  407. signing scheme.
  408. If the hash algorithm is missing, it defaults to \f[I]sha256\f[].
  409. Some take no arguments, and some take multiple arguments.
  410. .SS Hash Optional Scheme Specifiers
  411. .PP
  412. These scheme specifiers are followed by a dash and a valid hash
  413. algorithm, For example: \f[C]oaep\-sha256\f[].
  414. .IP \[bu] 2
  415. oaep
  416. .IP \[bu] 2
  417. ecdh
  418. .IP \[bu] 2
  419. rsassa
  420. .IP \[bu] 2
  421. rsapss
  422. .IP \[bu] 2
  423. ecdsa
  424. .IP \[bu] 2
  425. ecschnorr
  426. .SS Multiple Option Scheme Specifiers
  427. .PP
  428. This scheme specifier is followed by a count (max size UINT16) then
  429. followed by a dash(\-) and a valid hash algorithm.
  430. * ecdaa For example, ecdaa4\-sha256.
  431. If no count is specified, it defaults to 4.
  432. .SS No Option Scheme Specifiers
  433. .PP
  434. This scheme specifier takes NO arguments.
  435. * rsaes
  436. .SS Symmetric Details Specifiers
  437. .PP
  438. This field is optional, and defaults based on the \f[I]type\f[] of
  439. object being created and it\[aq]s attributes.
  440. Generally, any valid \f[B]Symmetric\f[] specifier from the \f[B]Type
  441. Specifiers\f[] list should work.
  442. If not specified, an asymmetric objects symmetric details defaults to
  443. \f[I]aes128cfb\f[].
  444. .SS Examples
  445. .SS Create an rsa2048 key with an rsaes asymmetric encryption scheme
  446. .PP
  447. \f[C]tpm2_create\ \-C\ parent.ctx\ \-G\ rsa2048:rsaes\ \-u\ key.pub\ \-r\ key.priv\f[]
  448. .SS Create an ecc256 key with an ecdaa signing scheme with a count of 4
  449. and sha384 hash
  450. .PP
  451. \f[C]/tpm2_create\ \-C\ parent.ctx\ \-G\ ecc256:ecdaa4\-sha384\ \-u\ key.pub\ \-r\ key.priv\f[]
  452. cryptographic algorithms \f[I]ALGORITHM\f[].
  453. .SH COMMON OPTIONS
  454. .PP
  455. This collection of options are common to many programs and provide
  456. information that many users may expect.
  457. .IP \[bu] 2
  458. \f[B]\-h\f[], \f[B]\-\-help=[man|no\-man]\f[]: Display the tools
  459. manpage.
  460. By default, it attempts to invoke the manpager for the tool, however, on
  461. failure will output a short tool summary.
  462. This is the same behavior if the "man" option argument is specified,
  463. however if explicit "man" is requested, the tool will provide errors
  464. from man on stderr.
  465. If the "no\-man" option if specified, or the manpager fails, the short
  466. options will be output to stdout.
  467. .RS 2
  468. .PP
  469. To successfully use the manpages feature requires the manpages to be
  470. installed or on \f[I]MANPATH\f[], See man(1) for more details.
  471. .RE
  472. .IP \[bu] 2
  473. \f[B]\-v\f[], \f[B]\-\-version\f[]: Display version information for this
  474. tool, supported tctis and exit.
  475. .IP \[bu] 2
  476. \f[B]\-V\f[], \f[B]\-\-verbose\f[]: Increase the information that the
  477. tool prints to the console during its execution.
  478. When using this option the file and line number are printed.
  479. .IP \[bu] 2
  480. \f[B]\-Q\f[], \f[B]\-\-quiet\f[]: Silence normal tool output to stdout.
  481. .IP \[bu] 2
  482. \f[B]\-Z\f[], \f[B]\-\-enable\-errata\f[]: Enable the application of
  483. errata fixups.
  484. Useful if an errata fixup needs to be applied to commands sent to the
  485. TPM.
  486. Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent.
  487. information many users may expect.
  488. .SH TCTI Configuration
  489. .PP
  490. The TCTI or "Transmission Interface" is the communication mechanism with
  491. the TPM.
  492. TCTIs can be changed for communication with TPMs across different
  493. mediums.
  494. .PP
  495. To control the TCTI, the tools respect:
  496. .IP "1." 3
  497. The command line option \f[B]\-T\f[] or \f[B]\-\-tcti\f[]
  498. .IP "2." 3
  499. The environment variable: \f[I]TPM2TOOLS_TCTI\f[].
  500. .PP
  501. \f[B]Note:\f[] The command line option always overrides the environment
  502. variable.
  503. .PP
  504. The current known TCTIs are:
  505. .IP \[bu] 2
  506. tabrmd \- The resource manager, called
  507. tabrmd (https://github.com/tpm2-software/tpm2-abrmd).
  508. Note that tabrmd and abrmd as a tcti name are synonymous.
  509. .IP \[bu] 2
  510. mssim \- Typically used for communicating to the TPM software simulator.
  511. .IP \[bu] 2
  512. device \- Used when talking directly to a TPM device file.
  513. .IP \[bu] 2
  514. none \- Do not initalize a connection with the TPM.
  515. Some tools allow for off\-tpm options and thus support not using a TCTI.
  516. Tools that do not support it will error when attempted to be used
  517. without a TCTI connection.
  518. Does not support \f[I]ANY\f[] options and \f[I]MUST BE\f[] presented as
  519. the exact text of "none".
  520. .PP
  521. The arguments to either the command line option or the environment
  522. variable are in the form:
  523. .PP
  524. \f[C]<tcti\-name>:<tcti\-option\-config>\f[]
  525. .PP
  526. Specifying an empty string for either the \f[C]<tcti\-name>\f[] or
  527. \f[C]<tcti\-option\-config>\f[] results in the default being used for
  528. that portion respectively.
  529. .SS TCTI Defaults
  530. .PP
  531. When a TCTI is not specified, the default TCTI is searched for using
  532. \f[I]dlopen(3)\f[] semantics.
  533. The tools will search for \f[I]tabrmd\f[], \f[I]device\f[] and
  534. \f[I]mssim\f[] TCTIs \f[B]IN THAT ORDER\f[] and \f[B]USE THE FIRST ONE
  535. FOUND\f[].
  536. You can query what TCTI will be chosen as the default by using the
  537. \f[B]\-v\f[] option to print the version information.
  538. The "default\-tcti" key\-value pair will indicate which of the
  539. aforementioned TCTIs is the default.
  540. .SS Custom TCTIs
  541. .PP
  542. Any TCTI that implements the dynamic TCTI interface can be loaded.
  543. The tools internally use \f[I]dlopen(3)\f[], and the raw
  544. \f[I]tcti\-name\f[] value is used for the lookup.
  545. Thus, this could be a path to the shared library, or a library name as
  546. understood by \f[I]dlopen(3)\f[] semantics.
  547. .SH TCTI OPTIONS
  548. .PP
  549. This collection of options are used to configure the various known TCTI
  550. modules available:
  551. .IP \[bu] 2
  552. \f[B]device\f[]: For the device TCTI, the TPM character device file for
  553. use by the device TCTI can be specified.
  554. The default is \f[I]/dev/tpm0\f[].
  555. .RS 2
  556. .PP
  557. Example: \f[B]\-T device:/dev/tpm0\f[] or \f[B]export
  558. \f[I]TPM2TOOLS_TCTI\f[]="device:/dev/tpm0"\f[]
  559. .RE
  560. .IP \[bu] 2
  561. \f[B]mssim\f[]: For the mssim TCTI, the domain name or IP address and
  562. port number used by the simulator can be specified.
  563. The default are 127.0.0.1 and 2321.
  564. .RS 2
  565. .PP
  566. Example: \f[B]\-T mssim:host=localhost,port=2321\f[] or \f[B]export
  567. \f[I]TPM2TOOLS_TCTI\f[]="mssim:host=localhost,port=2321"\f[]
  568. .RE
  569. .IP \[bu] 2
  570. \f[B]abrmd\f[]: For the abrmd TCTI, the configuration string format is a
  571. series of simple key value pairs separated by a \[aq],\[aq] character.
  572. Each key and value string are separated by a \[aq]=\[aq] character.
  573. .RS 2
  574. .IP \[bu] 2
  575. TCTI abrmd supports two keys:
  576. .RS 2
  577. .IP "1." 3
  578. \[aq]bus_name\[aq] : The name of the tabrmd service on the bus (a
  579. string).
  580. .IP "2." 3
  581. \[aq]bus_type\[aq] : The type of the dbus instance (a string) limited to
  582. \[aq]session\[aq] and \[aq]system\[aq].
  583. .RE
  584. .PP
  585. Specify the tabrmd tcti name and a config string of
  586. \f[C]bus_name=com.example.FooBar\f[]:
  587. .PP
  588. \f[C]\\\-\-tcti=tabrmd:bus_name=com.example.FooBar\f[]
  589. .PP
  590. Specify the default (abrmd) tcti and a config string of
  591. \f[C]bus_type=session\f[]:
  592. .PP
  593. \f[C]\\\-\-tcti:bus_type=session\f[]
  594. .PP
  595. \f[B]NOTE\f[]: abrmd and tabrmd are synonymous.
  596. the various known TCTI modules.
  597. # Signature Format Specifiers
  598. .RE
  599. .PP
  600. Format selection for the signature output file.
  601. \f[B]tss\f[] (the default) will output a binary blob according to the
  602. TPM 2.0 specification and any potential compiler padding.
  603. The option \f[B]plain\f[] will output the plain signature data as
  604. defined by the used cryptographic algorithm.
  605. .SH EXAMPLES
  606. .SS Create a key and get attested TPM time
  607. .IP
  608. .nf
  609. \f[C]
  610. tpm2_createprimary\ \-C\ e\ \-c\ primary.ctx
  611. tpm2_create\ \-G\ rsa\ \-u\ rsa.pub\ \-r\ rsa.priv\ \-C\ primary.ctx
  612. tpm2_load\ \-C\ primary.ctx\ \-u\ rsa.pub\ \-r\ rsa.priv\ \-c\ rsa.ctx
  613. tpm2_gettime\ \-c\ rsa.ctx\ \-o\ attest.sig\ \-\-attestation\ attest.data
  614. \f[]
  615. .fi
  616. .SH Returns
  617. .PP
  618. Tools can return any of the following codes:
  619. .IP \[bu] 2
  620. 0 \- Success.
  621. .IP \[bu] 2
  622. 1 \- General non\-specific error.
  623. .IP \[bu] 2
  624. 2 \- Options handling error.
  625. .IP \[bu] 2
  626. 3 \- Authentication error.
  627. .IP \[bu] 2
  628. 4 \- TCTI related error.
  629. .IP \[bu] 2
  630. 5 \- Non supported scheme.
  631. Applicable to tpm2_testparams.
  632. .SH BUGS
  633. .PP
  634. Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
  635. .SH HELP
  636. .PP
  637. See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)