tpm2_dictionarylockout.1 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. .\" Automatically generated by Pandoc 1.19.2.4
  2. .\"
  3. .TH "tpm2_dictionarylockout" "1" "" "tpm2\-tools" "General Commands Manual"
  4. .hy
  5. .SH NAME
  6. .PP
  7. \f[B]tpm2_dictionarylockout\f[](1) \- Setup or clear
  8. dictionary\-attack\-lockout parameters.
  9. .SH SYNOPSIS
  10. .PP
  11. \f[B]tpm2_dictionarylockout\f[] [\f[I]OPTIONS\f[]]
  12. .SH DESCRIPTION
  13. .PP
  14. \f[B]tpm2_dictionarylockout\f[](1) \- Setup dictionary\-attack\-lockout
  15. parameters or clear dictionary\-attack\-lockout state.
  16. .SH OPTIONS
  17. .IP \[bu] 2
  18. \f[B]\-s\f[], \f[B]\-\-setup\-parameters\f[]:
  19. .RS 2
  20. .PP
  21. Specifies the tool should operate to setup dictionary\-attack\-lockout
  22. parameters.
  23. .RE
  24. .IP \[bu] 2
  25. \f[B]\-c\f[], \f[B]\-\-clear\-lockout\f[]:
  26. .RS 2
  27. .PP
  28. Specifies the tool should operate to clear dictionary\-attack\-lockout
  29. state.
  30. .RE
  31. .IP \[bu] 2
  32. \f[B]\-l\f[],
  33. \f[B]\-\-lockout\-recovery\-time\f[]=\f[I]NATURAL_NUMBER\f[]:
  34. .RS 2
  35. .PP
  36. Specifies the wait time in seconds before another
  37. \f[B]TPM_RH_LOCKOUT\f[] authentication attempt can be made after a
  38. failed authentication.
  39. .RE
  40. .IP \[bu] 2
  41. \f[B]\-t\f[], \f[B]\-\-recovery\-time\f[]=\f[I]NATURAL_NUMBER\f[]:
  42. .RS 2
  43. .PP
  44. Specifies the wait time in seconds before another DA\-protected\-object
  45. authentication attempt can be made after max\-tries number of failed
  46. authentications.
  47. .RE
  48. .IP \[bu] 2
  49. \f[B]\-n\f[], \f[B]\-\-max\-tries\f[]=\f[I]NATURAL_NUMBER\f[]:
  50. .RS 2
  51. .PP
  52. Specifies the maximum number of allowed authentication attempts on
  53. DA\-protected\-object; after which DA is activated.
  54. .RE
  55. .IP \[bu] 2
  56. \f[B]\-p\f[], \f[B]\-\-auth\f[]=\f[I]AUTH\f[]:
  57. .RS 2
  58. .PP
  59. The authorization value for the lockout handle.
  60. .RE
  61. .IP \[bu] 2
  62. \f[B]\-\-cphash\f[]=\f[I]FILE\f[]
  63. .RS 2
  64. .PP
  65. File path to record the hash of the command parameters.
  66. This is commonly termed as cpHash.
  67. NOTE: When this option is selected, The tool will not actually execute
  68. the command, it simply returns a cpHash.
  69. .RE
  70. .SS References
  71. .SH Authorization Formatting
  72. .PP
  73. Authorization for use of an object in TPM2.0 can come in 3 different
  74. forms: 1.
  75. Password 2.
  76. HMAC 3.
  77. Sessions
  78. .PP
  79. \f[B]NOTE:\f[] "Authorizations default to the \f[B]EMPTY PASSWORD\f[]
  80. when not specified".
  81. .SS Passwords
  82. .PP
  83. Passwords are interpreted in the following forms below using prefix
  84. identifiers.
  85. .PP
  86. \f[B]Note\f[]: By default passwords are assumed to be in the string form
  87. when they do not have a prefix.
  88. .SS String
  89. .PP
  90. A string password, specified by prefix "str:" or it\[aq]s absence (raw
  91. string without prefix) is not interpreted, and is directly used for
  92. authorization.
  93. .SS Examples
  94. .IP
  95. .nf
  96. \f[C]
  97. foobar
  98. str:foobar
  99. \f[]
  100. .fi
  101. .SS Hex\-string
  102. .PP
  103. A hex\-string password, specified by prefix "hex:" is converted from a
  104. hexidecimal form into a byte array form, thus allowing passwords with
  105. non\-printable and/or terminal un\-friendly characters.
  106. .SS Example
  107. .IP
  108. .nf
  109. \f[C]
  110. hex:0x1122334455667788
  111. \f[]
  112. .fi
  113. .SS File
  114. .PP
  115. A file based password, specified be prefix "file:" should be the path of
  116. a file containing the password to be read by the tool or a "\-" to use
  117. stdin.
  118. Storing passwords in files prevents information leakage, passwords
  119. passed as options can be read from the process list or common shell
  120. history features.
  121. .SS Examples
  122. .IP
  123. .nf
  124. \f[C]
  125. #\ to\ use\ stdin\ and\ be\ prompted
  126. file:\-
  127. #\ to\ use\ a\ file\ from\ a\ path
  128. file:path/to/password/file
  129. #\ to\ echo\ a\ password\ via\ stdin:
  130. echo\ foobar\ |\ tpm2_tool\ \-p\ file:\-
  131. #\ to\ use\ a\ bash\ here\-string\ via\ stdin:
  132. tpm2_tool\ \-p\ file:\-\ <<<\ foobar
  133. \f[]
  134. .fi
  135. .SS Sessions
  136. .PP
  137. When using a policy session to authorize the use of an object, prefix
  138. the option argument with the \f[I]session\f[] keyword.
  139. Then indicate a path to a session file that was created with
  140. tpm2_startauthsession(1).
  141. Optionally, if the session requires an auth value to be sent with the
  142. session handle (eg policy password), then append a + and a string as
  143. described in the \f[B]Passwords\f[] section.
  144. .SS Examples
  145. .PP
  146. To use a session context file called \f[I]session.ctx\f[].
  147. .IP
  148. .nf
  149. \f[C]
  150. session:session.ctx
  151. \f[]
  152. .fi
  153. .PP
  154. To use a session context file called \f[I]session.ctx\f[] \f[B]AND\f[]
  155. send the authvalue mypassword.
  156. .IP
  157. .nf
  158. \f[C]
  159. session:session.ctx+mypassword
  160. \f[]
  161. .fi
  162. .PP
  163. To use a session context file called \f[I]session.ctx\f[] \f[B]AND\f[]
  164. send the \f[I]HEX\f[] authvalue 0x11223344.
  165. .IP
  166. .nf
  167. \f[C]
  168. session:session.ctx+hex:11223344
  169. \f[]
  170. .fi
  171. .SS PCR Authorizations
  172. .PP
  173. You can satisfy a PCR policy using the "pcr:" prefix and the PCR
  174. minilanguage.
  175. The PCR minilanguage is as follows:
  176. \f[C]<pcr\-spec>=<raw\-pcr\-file>\f[]
  177. .PP
  178. The PCR spec is documented in in the section "PCR bank specifiers".
  179. .PP
  180. The \f[C]raw\-pcr\-file\f[] is an \f[B]optional\f[] the output of the
  181. raw PCR contents as returned by \f[I]tpm2_pcrread(1)\f[].
  182. .PP
  183. PCR bank specifiers (common/pcr.md)
  184. .SS Examples
  185. .PP
  186. To satisfy a PCR policy of sha256 on banks 0, 1, 2 and 3 use a specifier
  187. of:
  188. .IP
  189. .nf
  190. \f[C]
  191. pcr:sha256:0,1,2,3
  192. \f[]
  193. .fi
  194. .PP
  195. specifying \f[I]AUTH\f[].
  196. .SH COMMON OPTIONS
  197. .PP
  198. This collection of options are common to many programs and provide
  199. information that many users may expect.
  200. .IP \[bu] 2
  201. \f[B]\-h\f[], \f[B]\-\-help=[man|no\-man]\f[]: Display the tools
  202. manpage.
  203. By default, it attempts to invoke the manpager for the tool, however, on
  204. failure will output a short tool summary.
  205. This is the same behavior if the "man" option argument is specified,
  206. however if explicit "man" is requested, the tool will provide errors
  207. from man on stderr.
  208. If the "no\-man" option if specified, or the manpager fails, the short
  209. options will be output to stdout.
  210. .RS 2
  211. .PP
  212. To successfully use the manpages feature requires the manpages to be
  213. installed or on \f[I]MANPATH\f[], See man(1) for more details.
  214. .RE
  215. .IP \[bu] 2
  216. \f[B]\-v\f[], \f[B]\-\-version\f[]: Display version information for this
  217. tool, supported tctis and exit.
  218. .IP \[bu] 2
  219. \f[B]\-V\f[], \f[B]\-\-verbose\f[]: Increase the information that the
  220. tool prints to the console during its execution.
  221. When using this option the file and line number are printed.
  222. .IP \[bu] 2
  223. \f[B]\-Q\f[], \f[B]\-\-quiet\f[]: Silence normal tool output to stdout.
  224. .IP \[bu] 2
  225. \f[B]\-Z\f[], \f[B]\-\-enable\-errata\f[]: Enable the application of
  226. errata fixups.
  227. Useful if an errata fixup needs to be applied to commands sent to the
  228. TPM.
  229. Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent.
  230. information many users may expect.
  231. .SH TCTI Configuration
  232. .PP
  233. The TCTI or "Transmission Interface" is the communication mechanism with
  234. the TPM.
  235. TCTIs can be changed for communication with TPMs across different
  236. mediums.
  237. .PP
  238. To control the TCTI, the tools respect:
  239. .IP "1." 3
  240. The command line option \f[B]\-T\f[] or \f[B]\-\-tcti\f[]
  241. .IP "2." 3
  242. The environment variable: \f[I]TPM2TOOLS_TCTI\f[].
  243. .PP
  244. \f[B]Note:\f[] The command line option always overrides the environment
  245. variable.
  246. .PP
  247. The current known TCTIs are:
  248. .IP \[bu] 2
  249. tabrmd \- The resource manager, called
  250. tabrmd (https://github.com/tpm2-software/tpm2-abrmd).
  251. Note that tabrmd and abrmd as a tcti name are synonymous.
  252. .IP \[bu] 2
  253. mssim \- Typically used for communicating to the TPM software simulator.
  254. .IP \[bu] 2
  255. device \- Used when talking directly to a TPM device file.
  256. .IP \[bu] 2
  257. none \- Do not initalize a connection with the TPM.
  258. Some tools allow for off\-tpm options and thus support not using a TCTI.
  259. Tools that do not support it will error when attempted to be used
  260. without a TCTI connection.
  261. Does not support \f[I]ANY\f[] options and \f[I]MUST BE\f[] presented as
  262. the exact text of "none".
  263. .PP
  264. The arguments to either the command line option or the environment
  265. variable are in the form:
  266. .PP
  267. \f[C]<tcti\-name>:<tcti\-option\-config>\f[]
  268. .PP
  269. Specifying an empty string for either the \f[C]<tcti\-name>\f[] or
  270. \f[C]<tcti\-option\-config>\f[] results in the default being used for
  271. that portion respectively.
  272. .SS TCTI Defaults
  273. .PP
  274. When a TCTI is not specified, the default TCTI is searched for using
  275. \f[I]dlopen(3)\f[] semantics.
  276. The tools will search for \f[I]tabrmd\f[], \f[I]device\f[] and
  277. \f[I]mssim\f[] TCTIs \f[B]IN THAT ORDER\f[] and \f[B]USE THE FIRST ONE
  278. FOUND\f[].
  279. You can query what TCTI will be chosen as the default by using the
  280. \f[B]\-v\f[] option to print the version information.
  281. The "default\-tcti" key\-value pair will indicate which of the
  282. aforementioned TCTIs is the default.
  283. .SS Custom TCTIs
  284. .PP
  285. Any TCTI that implements the dynamic TCTI interface can be loaded.
  286. The tools internally use \f[I]dlopen(3)\f[], and the raw
  287. \f[I]tcti\-name\f[] value is used for the lookup.
  288. Thus, this could be a path to the shared library, or a library name as
  289. understood by \f[I]dlopen(3)\f[] semantics.
  290. .SH TCTI OPTIONS
  291. .PP
  292. This collection of options are used to configure the various known TCTI
  293. modules available:
  294. .IP \[bu] 2
  295. \f[B]device\f[]: For the device TCTI, the TPM character device file for
  296. use by the device TCTI can be specified.
  297. The default is \f[I]/dev/tpm0\f[].
  298. .RS 2
  299. .PP
  300. Example: \f[B]\-T device:/dev/tpm0\f[] or \f[B]export
  301. \f[I]TPM2TOOLS_TCTI\f[]="device:/dev/tpm0"\f[]
  302. .RE
  303. .IP \[bu] 2
  304. \f[B]mssim\f[]: For the mssim TCTI, the domain name or IP address and
  305. port number used by the simulator can be specified.
  306. The default are 127.0.0.1 and 2321.
  307. .RS 2
  308. .PP
  309. Example: \f[B]\-T mssim:host=localhost,port=2321\f[] or \f[B]export
  310. \f[I]TPM2TOOLS_TCTI\f[]="mssim:host=localhost,port=2321"\f[]
  311. .RE
  312. .IP \[bu] 2
  313. \f[B]abrmd\f[]: For the abrmd TCTI, the configuration string format is a
  314. series of simple key value pairs separated by a \[aq],\[aq] character.
  315. Each key and value string are separated by a \[aq]=\[aq] character.
  316. .RS 2
  317. .IP \[bu] 2
  318. TCTI abrmd supports two keys:
  319. .RS 2
  320. .IP "1." 3
  321. \[aq]bus_name\[aq] : The name of the tabrmd service on the bus (a
  322. string).
  323. .IP "2." 3
  324. \[aq]bus_type\[aq] : The type of the dbus instance (a string) limited to
  325. \[aq]session\[aq] and \[aq]system\[aq].
  326. .RE
  327. .PP
  328. Specify the tabrmd tcti name and a config string of
  329. \f[C]bus_name=com.example.FooBar\f[]:
  330. .PP
  331. \f[C]\\\-\-tcti=tabrmd:bus_name=com.example.FooBar\f[]
  332. .PP
  333. Specify the default (abrmd) tcti and a config string of
  334. \f[C]bus_type=session\f[]:
  335. .PP
  336. \f[C]\\\-\-tcti:bus_type=session\f[]
  337. .PP
  338. \f[B]NOTE\f[]: abrmd and tabrmd are synonymous.
  339. the various known TCTI modules.
  340. .RE
  341. .SH EXAMPLES
  342. .IP
  343. .nf
  344. \f[C]
  345. tpm2_dictionarylockout\ \-c\ \-p\ passwd
  346. tpm2_dictionarylockout\ \-s\ \-n\ 5\ \-t\ 6\ \-l\ 7\ \-p\ passwd
  347. \f[]
  348. .fi
  349. .SH Returns
  350. .PP
  351. Tools can return any of the following codes:
  352. .IP \[bu] 2
  353. 0 \- Success.
  354. .IP \[bu] 2
  355. 1 \- General non\-specific error.
  356. .IP \[bu] 2
  357. 2 \- Options handling error.
  358. .IP \[bu] 2
  359. 3 \- Authentication error.
  360. .IP \[bu] 2
  361. 4 \- TCTI related error.
  362. .IP \[bu] 2
  363. 5 \- Non supported scheme.
  364. Applicable to tpm2_testparams.
  365. .SH BUGS
  366. .PP
  367. Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
  368. .SH HELP
  369. .PP
  370. See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)