tpm2_createek.1 17 KB

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