tpm2_changeeps.1 9.0 KB

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