tpm2_geteccparameters.1 10 KB

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