tpm2_incrementalselftest.1 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. .\" Automatically generated by Pandoc 1.19.2.4
  2. .\"
  3. .TH "tpm2_incrementalselftest" "1" "" "tpm2\-tools" "General Commands Manual"
  4. .hy
  5. .SH NAME
  6. .PP
  7. \f[B]tpm2_incrementalselftest\f[](1) \- Request testing of specified
  8. algorithm list
  9. .SH SYNOPSIS
  10. .PP
  11. \f[B]tpm2_incrementalselftest\f[] [\f[I]OPTIONS\f[]]
  12. \f[I]ALG_SPEC_LIST\f[]
  13. .SH DESCRIPTION
  14. .PP
  15. \f[B]tpm2_incrementalselftest\f[](1) Request the TPM to perform testing
  16. on specified algorithm and print a list of algorithm scheduled to be
  17. tested \f[I]OR\f[] remain to be tested but not scheduled.
  18. .PP
  19. The main interest of this command is to reduce delays that might occur
  20. on cryptographic operations as TPM must test the algorithm prior using
  21. it.
  22. .SH ALG_SPEC_LIST
  23. .PP
  24. A space\-separated list of algorithm suite to be tested.
  25. Algorithms should follow the "formatting standards", see section
  26. "Algorithm Specifiers".
  27. Also, see section "Supported Hash Algorithms" for a list of supported
  28. hash algorithms.
  29. .PP
  30. If \f[I]ALG_SPEC_LIST\f[] is left empty,
  31. \f[B]tpm2_incrementalselftest\f[](1) will return the list of algorithms
  32. left to be tested.
  33. Please note that in this case these algorithms are \f[B]NOT\f[]
  34. scheduled to be tested.
  35. .PP
  36. If \f[I]ALG_SPEC_LIST\f[] is not empty,
  37. \f[B]tpm2_incrementalselftest\f[](1) will return the list of algorithms
  38. that remains to be tested.
  39. This list contains algorithms scheduled for testing AND algorithms that
  40. remains to be tested and not yet scheduled.
  41. This can occur for instance if all AES mode have not been already tested
  42. yet.
  43. .SH Output
  44. .PP
  45. List of algorithms to be tested (implying scheduled) or remain to be
  46. tested (not scheduled) is also printed in YAML format.
  47. .PP
  48. If none of the specified algorithm is printed, that means both that they
  49. are already tested AND that these algorithms won\[aq]t be tested again.
  50. .SH OPTIONS
  51. .PP
  52. This tool accepts no tool specific options.
  53. .SS References
  54. .SH Algorithm Specifiers
  55. .PP
  56. Options that take algorithms support "nice\-names".
  57. .PP
  58. There are two major algorithm specification string classes, simple and
  59. complex.
  60. Only certain algorithms will be accepted by the TPM, based on usage and
  61. conditions.
  62. .SS Simple specifiers
  63. .PP
  64. These are strings with no additional specification data.
  65. When creating objects, non\-specified portions of an object are assumed
  66. to defaults.
  67. You can find the list of known "Simple Specifiers Below".
  68. .SS Asymmetric
  69. .IP \[bu] 2
  70. rsa
  71. .IP \[bu] 2
  72. ecc
  73. .SS Symmetric
  74. .IP \[bu] 2
  75. aes
  76. .IP \[bu] 2
  77. camellia
  78. .SS Hashing Algorithms
  79. .IP \[bu] 2
  80. sha1
  81. .IP \[bu] 2
  82. sha256
  83. .IP \[bu] 2
  84. sha384
  85. .IP \[bu] 2
  86. sha512
  87. .IP \[bu] 2
  88. sm3_256
  89. .IP \[bu] 2
  90. sha3_256
  91. .IP \[bu] 2
  92. sha3_384
  93. .IP \[bu] 2
  94. sha3_512
  95. .SS Keyed Hash
  96. .IP \[bu] 2
  97. hmac
  98. .IP \[bu] 2
  99. xor
  100. .SS Signing Schemes
  101. .IP \[bu] 2
  102. rsassa
  103. .IP \[bu] 2
  104. rsapss
  105. .IP \[bu] 2
  106. ecdsa
  107. .IP \[bu] 2
  108. ecdaa
  109. .IP \[bu] 2
  110. ecschnorr
  111. .SS Asymmetric Encryption Schemes
  112. .IP \[bu] 2
  113. oaep
  114. .IP \[bu] 2
  115. rsaes
  116. .IP \[bu] 2
  117. ecdh
  118. .SS Modes
  119. .IP \[bu] 2
  120. ctr
  121. .IP \[bu] 2
  122. ofb
  123. .IP \[bu] 2
  124. cbc
  125. .IP \[bu] 2
  126. cfb
  127. .IP \[bu] 2
  128. ecb
  129. .SS Misc
  130. .IP \[bu] 2
  131. null
  132. .SS Complex Specifiers
  133. .PP
  134. Objects, when specified for creation by the TPM, have numerous
  135. algorithms to populate in the public data.
  136. Things like type, scheme and asymmetric details, key size, etc.
  137. Below is the general format for specifying this data:
  138. \f[C]<type>:<scheme>:<symmetric\-details>\f[]
  139. .SS Type Specifiers
  140. .PP
  141. This portion of the complex algorithm specifier is required.
  142. The remaining scheme and symmetric details will default based on the
  143. type specified and the type of the object being created.
  144. .IP \[bu] 2
  145. aes \- Default AES: aes128
  146. .IP \[bu] 2
  147. aes128\f[C]<mode>\f[] \- 128 bit AES with optional mode
  148. (\f[I]ctr\f[]|\f[I]ofb\f[]|\f[I]cbc\f[]|\f[I]cfb\f[]|\f[I]ecb\f[]).
  149. If mode is not specified, defaults to \f[I]null\f[].
  150. .IP \[bu] 2
  151. aes192\f[C]<mode>\f[] \- Same as aes128\f[C]<mode>\f[], except for a 192
  152. bit key size.
  153. .IP \[bu] 2
  154. aes256\f[C]<mode>\f[] \- Same as aes128\f[C]<mode>\f[], except for a 256
  155. bit key size.
  156. .IP \[bu] 2
  157. ecc \- Elliptical Curve, defaults to ecc256.
  158. .IP \[bu] 2
  159. ecc192 \- 192 bit ECC
  160. .IP \[bu] 2
  161. ecc224 \- 224 bit ECC
  162. .IP \[bu] 2
  163. ecc256 \- 256 bit ECC
  164. .IP \[bu] 2
  165. ecc384 \- 384 bit ECC
  166. .IP \[bu] 2
  167. ecc521 \- 521 bit ECC
  168. .IP \[bu] 2
  169. rsa \- Default RSA: rsa2048
  170. .IP \[bu] 2
  171. rsa1024 \- RSA with 1024 bit keysize.
  172. .IP \[bu] 2
  173. rsa2048 \- RSA with 2048 bit keysize.
  174. .IP \[bu] 2
  175. rsa4096 \- RSA with 4096 bit keysize.
  176. .SS Scheme Specifiers
  177. .PP
  178. Next, is an optional field, it can be skipped.
  179. .PP
  180. Schemes are usually \f[B]Signing Schemes\f[] or \f[B]Asymmetric
  181. Encryption Schemes\f[].
  182. Most signing schemes take a hash algorithm directly following the
  183. signing scheme.
  184. If the hash algorithm is missing, it defaults to \f[I]sha256\f[].
  185. Some take no arguments, and some take multiple arguments.
  186. .SS Hash Optional Scheme Specifiers
  187. .PP
  188. These scheme specifiers are followed by a dash and a valid hash
  189. algorithm, For example: \f[C]oaep\-sha256\f[].
  190. .IP \[bu] 2
  191. oaep
  192. .IP \[bu] 2
  193. ecdh
  194. .IP \[bu] 2
  195. rsassa
  196. .IP \[bu] 2
  197. rsapss
  198. .IP \[bu] 2
  199. ecdsa
  200. .IP \[bu] 2
  201. ecschnorr
  202. .SS Multiple Option Scheme Specifiers
  203. .PP
  204. This scheme specifier is followed by a count (max size UINT16) then
  205. followed by a dash(\-) and a valid hash algorithm.
  206. * ecdaa For example, ecdaa4\-sha256.
  207. If no count is specified, it defaults to 4.
  208. .SS No Option Scheme Specifiers
  209. .PP
  210. This scheme specifier takes NO arguments.
  211. * rsaes
  212. .SS Symmetric Details Specifiers
  213. .PP
  214. This field is optional, and defaults based on the \f[I]type\f[] of
  215. object being created and it\[aq]s attributes.
  216. Generally, any valid \f[B]Symmetric\f[] specifier from the \f[B]Type
  217. Specifiers\f[] list should work.
  218. If not specified, an asymmetric objects symmetric details defaults to
  219. \f[I]aes128cfb\f[].
  220. .SS Examples
  221. .SS Create an rsa2048 key with an rsaes asymmetric encryption scheme
  222. .PP
  223. \f[C]tpm2_create\ \-C\ parent.ctx\ \-G\ rsa2048:rsaes\ \-u\ key.pub\ \-r\ key.priv\f[]
  224. .SS Create an ecc256 key with an ecdaa signing scheme with a count of 4
  225. and sha384 hash
  226. .PP
  227. \f[C]/tpm2_create\ \-C\ parent.ctx\ \-G\ ecc256:ecdaa4\-sha384\ \-u\ key.pub\ \-r\ key.priv\f[]
  228. cryptographic algorithms \f[I]ALGORITHM\f[].
  229. .SH COMMON OPTIONS
  230. .PP
  231. This collection of options are common to many programs and provide
  232. information that many users may expect.
  233. .IP \[bu] 2
  234. \f[B]\-h\f[], \f[B]\-\-help=[man|no\-man]\f[]: Display the tools
  235. manpage.
  236. By default, it attempts to invoke the manpager for the tool, however, on
  237. failure will output a short tool summary.
  238. This is the same behavior if the "man" option argument is specified,
  239. however if explicit "man" is requested, the tool will provide errors
  240. from man on stderr.
  241. If the "no\-man" option if specified, or the manpager fails, the short
  242. options will be output to stdout.
  243. .RS 2
  244. .PP
  245. To successfully use the manpages feature requires the manpages to be
  246. installed or on \f[I]MANPATH\f[], See man(1) for more details.
  247. .RE
  248. .IP \[bu] 2
  249. \f[B]\-v\f[], \f[B]\-\-version\f[]: Display version information for this
  250. tool, supported tctis and exit.
  251. .IP \[bu] 2
  252. \f[B]\-V\f[], \f[B]\-\-verbose\f[]: Increase the information that the
  253. tool prints to the console during its execution.
  254. When using this option the file and line number are printed.
  255. .IP \[bu] 2
  256. \f[B]\-Q\f[], \f[B]\-\-quiet\f[]: Silence normal tool output to stdout.
  257. .IP \[bu] 2
  258. \f[B]\-Z\f[], \f[B]\-\-enable\-errata\f[]: Enable the application of
  259. errata fixups.
  260. Useful if an errata fixup needs to be applied to commands sent to the
  261. TPM.
  262. Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent.
  263. information many users may expect.
  264. .SH TCTI Configuration
  265. .PP
  266. The TCTI or "Transmission Interface" is the communication mechanism with
  267. the TPM.
  268. TCTIs can be changed for communication with TPMs across different
  269. mediums.
  270. .PP
  271. To control the TCTI, the tools respect:
  272. .IP "1." 3
  273. The command line option \f[B]\-T\f[] or \f[B]\-\-tcti\f[]
  274. .IP "2." 3
  275. The environment variable: \f[I]TPM2TOOLS_TCTI\f[].
  276. .PP
  277. \f[B]Note:\f[] The command line option always overrides the environment
  278. variable.
  279. .PP
  280. The current known TCTIs are:
  281. .IP \[bu] 2
  282. tabrmd \- The resource manager, called
  283. tabrmd (https://github.com/tpm2-software/tpm2-abrmd).
  284. Note that tabrmd and abrmd as a tcti name are synonymous.
  285. .IP \[bu] 2
  286. mssim \- Typically used for communicating to the TPM software simulator.
  287. .IP \[bu] 2
  288. device \- Used when talking directly to a TPM device file.
  289. .IP \[bu] 2
  290. none \- Do not initalize a connection with the TPM.
  291. Some tools allow for off\-tpm options and thus support not using a TCTI.
  292. Tools that do not support it will error when attempted to be used
  293. without a TCTI connection.
  294. Does not support \f[I]ANY\f[] options and \f[I]MUST BE\f[] presented as
  295. the exact text of "none".
  296. .PP
  297. The arguments to either the command line option or the environment
  298. variable are in the form:
  299. .PP
  300. \f[C]<tcti\-name>:<tcti\-option\-config>\f[]
  301. .PP
  302. Specifying an empty string for either the \f[C]<tcti\-name>\f[] or
  303. \f[C]<tcti\-option\-config>\f[] results in the default being used for
  304. that portion respectively.
  305. .SS TCTI Defaults
  306. .PP
  307. When a TCTI is not specified, the default TCTI is searched for using
  308. \f[I]dlopen(3)\f[] semantics.
  309. The tools will search for \f[I]tabrmd\f[], \f[I]device\f[] and
  310. \f[I]mssim\f[] TCTIs \f[B]IN THAT ORDER\f[] and \f[B]USE THE FIRST ONE
  311. FOUND\f[].
  312. You can query what TCTI will be chosen as the default by using the
  313. \f[B]\-v\f[] option to print the version information.
  314. The "default\-tcti" key\-value pair will indicate which of the
  315. aforementioned TCTIs is the default.
  316. .SS Custom TCTIs
  317. .PP
  318. Any TCTI that implements the dynamic TCTI interface can be loaded.
  319. The tools internally use \f[I]dlopen(3)\f[], and the raw
  320. \f[I]tcti\-name\f[] value is used for the lookup.
  321. Thus, this could be a path to the shared library, or a library name as
  322. understood by \f[I]dlopen(3)\f[] semantics.
  323. .SH TCTI OPTIONS
  324. .PP
  325. This collection of options are used to configure the various known TCTI
  326. modules available:
  327. .IP \[bu] 2
  328. \f[B]device\f[]: For the device TCTI, the TPM character device file for
  329. use by the device TCTI can be specified.
  330. The default is \f[I]/dev/tpm0\f[].
  331. .RS 2
  332. .PP
  333. Example: \f[B]\-T device:/dev/tpm0\f[] or \f[B]export
  334. \f[I]TPM2TOOLS_TCTI\f[]="device:/dev/tpm0"\f[]
  335. .RE
  336. .IP \[bu] 2
  337. \f[B]mssim\f[]: For the mssim TCTI, the domain name or IP address and
  338. port number used by the simulator can be specified.
  339. The default are 127.0.0.1 and 2321.
  340. .RS 2
  341. .PP
  342. Example: \f[B]\-T mssim:host=localhost,port=2321\f[] or \f[B]export
  343. \f[I]TPM2TOOLS_TCTI\f[]="mssim:host=localhost,port=2321"\f[]
  344. .RE
  345. .IP \[bu] 2
  346. \f[B]abrmd\f[]: For the abrmd TCTI, the configuration string format is a
  347. series of simple key value pairs separated by a \[aq],\[aq] character.
  348. Each key and value string are separated by a \[aq]=\[aq] character.
  349. .RS 2
  350. .IP \[bu] 2
  351. TCTI abrmd supports two keys:
  352. .RS 2
  353. .IP "1." 3
  354. \[aq]bus_name\[aq] : The name of the tabrmd service on the bus (a
  355. string).
  356. .IP "2." 3
  357. \[aq]bus_type\[aq] : The type of the dbus instance (a string) limited to
  358. \[aq]session\[aq] and \[aq]system\[aq].
  359. .RE
  360. .PP
  361. Specify the tabrmd tcti name and a config string of
  362. \f[C]bus_name=com.example.FooBar\f[]:
  363. .PP
  364. \f[C]\\\-\-tcti=tabrmd:bus_name=com.example.FooBar\f[]
  365. .PP
  366. Specify the default (abrmd) tcti and a config string of
  367. \f[C]bus_type=session\f[]:
  368. .PP
  369. \f[C]\\\-\-tcti:bus_type=session\f[]
  370. .PP
  371. \f[B]NOTE\f[]: abrmd and tabrmd are synonymous.
  372. the various known TCTI modules.
  373. .RE
  374. .SH EXAMPLES
  375. .SS Request testing of RSA algorithm
  376. .IP
  377. .nf
  378. \f[C]
  379. tpm2_incrementalselftest\ rsa
  380. \f[]
  381. .fi
  382. .SS Request testing of multiple algorithms
  383. .IP
  384. .nf
  385. \f[C]
  386. tpm2_incrementalselftest\ rsa\ ecc\ xor\ aes\ cbc
  387. \f[]
  388. .fi
  389. .SH NOTES
  390. .PP
  391. Algorithm suite specified can imply either testing the combination or
  392. the complete suite, depending on TPM manufacturer implementation.
  393. .PP
  394. e.g : One TPM might only test AES with CTR mode if "aes ctr" is
  395. specified.
  396. An other might also test complete AES mode list AND test ctr mode.
  397. .PP
  398. If an algorithm has already been tested, this command won\[aq]t permit
  399. re\-executing the test.
  400. Only issuing \f[B]tpm2_selftest\f[](1) in full\-test mode enabled will
  401. force re\-testing.
  402. .SH Returns
  403. .PP
  404. Tools can return any of the following codes:
  405. .IP \[bu] 2
  406. 0 \- Success.
  407. .IP \[bu] 2
  408. 1 \- General non\-specific error.
  409. .IP \[bu] 2
  410. 2 \- Options handling error.
  411. .IP \[bu] 2
  412. 3 \- Authentication error.
  413. .IP \[bu] 2
  414. 4 \- TCTI related error.
  415. .IP \[bu] 2
  416. 5 \- Non supported scheme.
  417. Applicable to tpm2_testparams.
  418. .SH BUGS
  419. .PP
  420. Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
  421. .SH HELP
  422. .PP
  423. See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)