tpm2_changepps.1 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. .\" Automatically generated by Pandoc 1.19.2.4
  2. .\"
  3. .TH "tpm2_changepps" "1" "" "tpm2\-tools" "General Commands Manual"
  4. .hy
  5. .SH NAME
  6. .PP
  7. \f[B]tpm2_changepps\f[](1) \- Replaces the active platform primary seed
  8. with a new one generated off the TPM2 RNG.
  9. .SH SYNOPSIS
  10. .PP
  11. \f[B]tpm2_changepps\f[] [\f[I]OPTIONS\f[]]
  12. .SH DESCRIPTION
  13. .PP
  14. \f[B]tpm2_changepps\f[](1) \- Replaces the active platform primary seed
  15. with a new one generated off the TPM2 RNG.
  16. The Transient and Persistent objects under the platform hierarchy are
  17. lost whilst retaining the NV objects.
  18. .SH OPTIONS
  19. .IP \[bu] 2
  20. \f[B]\-p\f[], \f[B]\-\-auth\f[] specifies the \f[I]AUTH\f[] for the
  21. platform.
  22. hierarchy.
  23. .IP \[bu] 2
  24. \f[B]\-\-cphash\f[]=\f[I]FILE\f[]
  25. .RS 2
  26. .PP
  27. File path to record the hash of the command parameters.
  28. This is commonly termed as cpHash.
  29. NOTE: When this option is selected, The tool will not actually execute
  30. the command, it simply returns a cpHash, unless rphash is also required.
  31. .RE
  32. .IP \[bu] 2
  33. \f[B]\-\-rphash\f[]=\f[I]FILE\f[]
  34. .RS 2
  35. .PP
  36. File path to record the hash of the response parameters.
  37. This is commonly termed as rpHash.
  38. .RE
  39. .IP \[bu] 2
  40. \f[B]\-S\f[], \f[B]\-\-session\f[]=\f[I]FILE\f[]:
  41. .RS 2
  42. .PP
  43. The session created using \f[B]tpm2_startauthsession\f[].
  44. This can be used to specify an auxiliary session for auditing and or
  45. encryption/decryption of the parameters.
  46. .RE
  47. .SS References
  48. .SH Authorization Formatting
  49. .PP
  50. Authorization for use of an object in TPM2.0 can come in 3 different
  51. forms: 1.
  52. Password 2.
  53. HMAC 3.
  54. Sessions
  55. .PP
  56. \f[B]NOTE:\f[] "Authorizations default to the \f[B]EMPTY PASSWORD\f[]
  57. when not specified".
  58. .SS Passwords
  59. .PP
  60. Passwords are interpreted in the following forms below using prefix
  61. identifiers.
  62. .PP
  63. \f[B]Note\f[]: By default passwords are assumed to be in the string form
  64. when they do not have a prefix.
  65. .SS String
  66. .PP
  67. A string password, specified by prefix "str:" or it\[aq]s absence (raw
  68. string without prefix) is not interpreted, and is directly used for
  69. authorization.
  70. .SS Examples
  71. .IP
  72. .nf
  73. \f[C]
  74. foobar
  75. str:foobar
  76. \f[]
  77. .fi
  78. .SS Hex\-string
  79. .PP
  80. A hex\-string password, specified by prefix "hex:" is converted from a
  81. hexidecimal form into a byte array form, thus allowing passwords with
  82. non\-printable and/or terminal un\-friendly characters.
  83. .SS Example
  84. .IP
  85. .nf
  86. \f[C]
  87. hex:0x1122334455667788
  88. \f[]
  89. .fi
  90. .SS File
  91. .PP
  92. A file based password, specified be prefix "file:" should be the path of
  93. a file containing the password to be read by the tool or a "\-" to use
  94. stdin.
  95. Storing passwords in files prevents information leakage, passwords
  96. passed as options can be read from the process list or common shell
  97. history features.
  98. .SS Examples
  99. .IP
  100. .nf
  101. \f[C]
  102. #\ to\ use\ stdin\ and\ be\ prompted
  103. file:\-
  104. #\ to\ use\ a\ file\ from\ a\ path
  105. file:path/to/password/file
  106. #\ to\ echo\ a\ password\ via\ stdin:
  107. echo\ foobar\ |\ tpm2_tool\ \-p\ file:\-
  108. #\ to\ use\ a\ bash\ here\-string\ via\ stdin:
  109. tpm2_tool\ \-p\ file:\-\ <<<\ foobar
  110. \f[]
  111. .fi
  112. .SS Sessions
  113. .PP
  114. When using a policy session to authorize the use of an object, prefix
  115. the option argument with the \f[I]session\f[] keyword.
  116. Then indicate a path to a session file that was created with
  117. tpm2_startauthsession(1).
  118. Optionally, if the session requires an auth value to be sent with the
  119. session handle (eg policy password), then append a + and a string as
  120. described in the \f[B]Passwords\f[] section.
  121. .SS Examples
  122. .PP
  123. To use a session context file called \f[I]session.ctx\f[].
  124. .IP
  125. .nf
  126. \f[C]
  127. session:session.ctx
  128. \f[]
  129. .fi
  130. .PP
  131. To use a session context file called \f[I]session.ctx\f[] \f[B]AND\f[]
  132. send the authvalue mypassword.
  133. .IP
  134. .nf
  135. \f[C]
  136. session:session.ctx+mypassword
  137. \f[]
  138. .fi
  139. .PP
  140. To use a session context file called \f[I]session.ctx\f[] \f[B]AND\f[]
  141. send the \f[I]HEX\f[] authvalue 0x11223344.
  142. .IP
  143. .nf
  144. \f[C]
  145. session:session.ctx+hex:11223344
  146. \f[]
  147. .fi
  148. .SS PCR Authorizations
  149. .PP
  150. You can satisfy a PCR policy using the "pcr:" prefix and the PCR
  151. minilanguage.
  152. The PCR minilanguage is as follows:
  153. \f[C]<pcr\-spec>=<raw\-pcr\-file>\f[]
  154. .PP
  155. The PCR spec is documented in in the section "PCR bank specifiers".
  156. .PP
  157. The \f[C]raw\-pcr\-file\f[] is an \f[B]optional\f[] the output of the
  158. raw PCR contents as returned by \f[I]tpm2_pcrread(1)\f[].
  159. .PP
  160. PCR bank specifiers (common/pcr.md)
  161. .SS Examples
  162. .PP
  163. To satisfy a PCR policy of sha256 on banks 0, 1, 2 and 3 use a specifier
  164. of:
  165. .IP
  166. .nf
  167. \f[C]
  168. pcr:sha256:0,1,2,3
  169. \f[]
  170. .fi
  171. .PP
  172. specifying \f[I]AUTH\f[].
  173. .SH TCTI Configuration
  174. .PP
  175. The TCTI or "Transmission Interface" is the communication mechanism with
  176. the TPM.
  177. TCTIs can be changed for communication with TPMs across different
  178. mediums.
  179. .PP
  180. To control the TCTI, the tools respect:
  181. .IP "1." 3
  182. The command line option \f[B]\-T\f[] or \f[B]\-\-tcti\f[]
  183. .IP "2." 3
  184. The environment variable: \f[I]TPM2TOOLS_TCTI\f[].
  185. .PP
  186. \f[B]Note:\f[] The command line option always overrides the environment
  187. variable.
  188. .PP
  189. The current known TCTIs are:
  190. .IP \[bu] 2
  191. tabrmd \- The resource manager, called
  192. tabrmd (https://github.com/tpm2-software/tpm2-abrmd).
  193. Note that tabrmd and abrmd as a tcti name are synonymous.
  194. .IP \[bu] 2
  195. mssim \- Typically used for communicating to the TPM software simulator.
  196. .IP \[bu] 2
  197. device \- Used when talking directly to a TPM device file.
  198. .IP \[bu] 2
  199. none \- Do not initalize a connection with the TPM.
  200. Some tools allow for off\-tpm options and thus support not using a TCTI.
  201. Tools that do not support it will error when attempted to be used
  202. without a TCTI connection.
  203. Does not support \f[I]ANY\f[] options and \f[I]MUST BE\f[] presented as
  204. the exact text of "none".
  205. .PP
  206. The arguments to either the command line option or the environment
  207. variable are in the form:
  208. .PP
  209. \f[C]<tcti\-name>:<tcti\-option\-config>\f[]
  210. .PP
  211. Specifying an empty string for either the \f[C]<tcti\-name>\f[] or
  212. \f[C]<tcti\-option\-config>\f[] results in the default being used for
  213. that portion respectively.
  214. .SS TCTI Defaults
  215. .PP
  216. When a TCTI is not specified, the default TCTI is searched for using
  217. \f[I]dlopen(3)\f[] semantics.
  218. The tools will search for \f[I]tabrmd\f[], \f[I]device\f[] and
  219. \f[I]mssim\f[] TCTIs \f[B]IN THAT ORDER\f[] and \f[B]USE THE FIRST ONE
  220. FOUND\f[].
  221. You can query what TCTI will be chosen as the default by using the
  222. \f[B]\-v\f[] option to print the version information.
  223. The "default\-tcti" key\-value pair will indicate which of the
  224. aforementioned TCTIs is the default.
  225. .SS Custom TCTIs
  226. .PP
  227. Any TCTI that implements the dynamic TCTI interface can be loaded.
  228. The tools internally use \f[I]dlopen(3)\f[], and the raw
  229. \f[I]tcti\-name\f[] value is used for the lookup.
  230. Thus, this could be a path to the shared library, or a library name as
  231. understood by \f[I]dlopen(3)\f[] semantics.
  232. .SH TCTI OPTIONS
  233. .PP
  234. This collection of options are used to configure the various known TCTI
  235. modules available:
  236. .IP \[bu] 2
  237. \f[B]device\f[]: For the device TCTI, the TPM character device file for
  238. use by the device TCTI can be specified.
  239. The default is \f[I]/dev/tpm0\f[].
  240. .RS 2
  241. .PP
  242. Example: \f[B]\-T device:/dev/tpm0\f[] or \f[B]export
  243. \f[I]TPM2TOOLS_TCTI\f[]="device:/dev/tpm0"\f[]
  244. .RE
  245. .IP \[bu] 2
  246. \f[B]mssim\f[]: For the mssim TCTI, the domain name or IP address and
  247. port number used by the simulator can be specified.
  248. The default are 127.0.0.1 and 2321.
  249. .RS 2
  250. .PP
  251. Example: \f[B]\-T mssim:host=localhost,port=2321\f[] or \f[B]export
  252. \f[I]TPM2TOOLS_TCTI\f[]="mssim:host=localhost,port=2321"\f[]
  253. .RE
  254. .IP \[bu] 2
  255. \f[B]abrmd\f[]: For the abrmd TCTI, the configuration string format is a
  256. series of simple key value pairs separated by a \[aq],\[aq] character.
  257. Each key and value string are separated by a \[aq]=\[aq] character.
  258. .RS 2
  259. .IP \[bu] 2
  260. TCTI abrmd supports two keys:
  261. .RS 2
  262. .IP "1." 3
  263. \[aq]bus_name\[aq] : The name of the tabrmd service on the bus (a
  264. string).
  265. .IP "2." 3
  266. \[aq]bus_type\[aq] : The type of the dbus instance (a string) limited to
  267. \[aq]session\[aq] and \[aq]system\[aq].
  268. .RE
  269. .PP
  270. Specify the tabrmd tcti name and a config string of
  271. \f[C]bus_name=com.example.FooBar\f[]:
  272. .PP
  273. \f[C]\\\-\-tcti=tabrmd:bus_name=com.example.FooBar\f[]
  274. .PP
  275. Specify the default (abrmd) tcti and a config string of
  276. \f[C]bus_type=session\f[]:
  277. .PP
  278. \f[C]\\\-\-tcti:bus_type=session\f[]
  279. .PP
  280. \f[B]NOTE\f[]: abrmd and tabrmd are synonymous.
  281. the various known TCTI modules.
  282. .RE
  283. .SH EXAMPLES
  284. .SS Change the platform primary seed where the platform auth is NULL.
  285. .IP
  286. .nf
  287. \f[C]
  288. tpm2_changepps
  289. \f[]
  290. .fi
  291. .SH Returns
  292. .PP
  293. Tools can return any of the following codes:
  294. .IP \[bu] 2
  295. 0 \- Success.
  296. .IP \[bu] 2
  297. 1 \- General non\-specific error.
  298. .IP \[bu] 2
  299. 2 \- Options handling error.
  300. .IP \[bu] 2
  301. 3 \- Authentication error.
  302. .IP \[bu] 2
  303. 4 \- TCTI related error.
  304. .IP \[bu] 2
  305. 5 \- Non supported scheme.
  306. Applicable to tpm2_testparams.
  307. .SH Limitations
  308. .PP
  309. It expects a session to be already established via
  310. \f[B]tpm2_startauthsession\f[](1) and requires one of the following:
  311. .IP \[bu] 2
  312. direct device access
  313. .IP \[bu] 2
  314. extended session support with \f[B]tpm2\-abrmd\f[].
  315. .PP
  316. Without it, most resource managers \f[B]will not\f[] save session state
  317. between command invocations.
  318. .SH BUGS
  319. .PP
  320. Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
  321. .SH HELP
  322. .PP
  323. See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)