tpm2_ecephemeral.1 11 KB

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