tpm2_createak.1 18 KB

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