openssl-ecparam.1ossl 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. .\" -*- mode: troff; coding: utf-8 -*-
  2. .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
  3. .\"
  4. .\" Standard preamble:
  5. .\" ========================================================================
  6. .de Sp \" Vertical space (when we can't use .PP)
  7. .if t .sp .5v
  8. .if n .sp
  9. ..
  10. .de Vb \" Begin verbatim text
  11. .ft CW
  12. .nf
  13. .ne \\$1
  14. ..
  15. .de Ve \" End verbatim text
  16. .ft R
  17. .fi
  18. ..
  19. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
  20. .ie n \{\
  21. . ds C` ""
  22. . ds C' ""
  23. 'br\}
  24. .el\{\
  25. . ds C`
  26. . ds C'
  27. 'br\}
  28. .\"
  29. .\" Escape single quotes in literal strings from groff's Unicode transform.
  30. .ie \n(.g .ds Aq \(aq
  31. .el .ds Aq '
  32. .\"
  33. .\" If the F register is >0, we'll generate index entries on stderr for
  34. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  35. .\" entries marked with X<> in POD. Of course, you'll have to process the
  36. .\" output yourself in some meaningful fashion.
  37. .\"
  38. .\" Avoid warning from groff about undefined register 'F'.
  39. .de IX
  40. ..
  41. .nr rF 0
  42. .if \n(.g .if rF .nr rF 1
  43. .if (\n(rF:(\n(.g==0)) \{\
  44. . if \nF \{\
  45. . de IX
  46. . tm Index:\\$1\t\\n%\t"\\$2"
  47. ..
  48. . if !\nF==2 \{\
  49. . nr % 0
  50. . nr F 2
  51. . \}
  52. . \}
  53. .\}
  54. .rr rF
  55. .\" ========================================================================
  56. .\"
  57. .IX Title "OPENSSL-ECPARAM 1ossl"
  58. .TH OPENSSL-ECPARAM 1ossl 2025-01-17 3.4.0 OpenSSL
  59. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  60. .\" way too many mistakes in technical documents.
  61. .if n .ad l
  62. .nh
  63. .SH NAME
  64. openssl\-ecparam \- EC parameter manipulation and generation
  65. .SH SYNOPSIS
  66. .IX Header "SYNOPSIS"
  67. \&\fBopenssl ecparam\fR
  68. [\fB\-help\fR]
  69. [\fB\-inform\fR \fBDER\fR|\fBPEM\fR]
  70. [\fB\-outform\fR \fBDER\fR|\fBPEM\fR]
  71. [\fB\-in\fR \fIfilename\fR]
  72. [\fB\-out\fR \fIfilename\fR]
  73. [\fB\-noout\fR]
  74. [\fB\-text\fR]
  75. [\fB\-check\fR]
  76. [\fB\-check_named\fR]
  77. [\fB\-name\fR \fIarg\fR]
  78. [\fB\-list_curves\fR]
  79. [\fB\-conv_form\fR \fIarg\fR]
  80. [\fB\-param_enc\fR \fIarg\fR]
  81. [\fB\-no_seed\fR]
  82. [\fB\-genkey\fR]
  83. [\fB\-engine\fR \fIid\fR]
  84. [\fB\-rand\fR \fIfiles\fR]
  85. [\fB\-writerand\fR \fIfile\fR]
  86. [\fB\-provider\fR \fIname\fR]
  87. [\fB\-provider\-path\fR \fIpath\fR]
  88. [\fB\-propquery\fR \fIpropq\fR]
  89. .SH DESCRIPTION
  90. .IX Header "DESCRIPTION"
  91. This command is used to manipulate or generate EC parameter files.
  92. .PP
  93. OpenSSL is currently not able to generate new groups and therefore
  94. this command can only create EC parameters from known (named) curves.
  95. .SH OPTIONS
  96. .IX Header "OPTIONS"
  97. .IP \fB\-help\fR 4
  98. .IX Item "-help"
  99. Print out a usage message.
  100. .IP "\fB\-inform\fR \fBDER\fR|\fBPEM\fR" 4
  101. .IX Item "-inform DER|PEM"
  102. The EC parameters input format; unspecified by default.
  103. See \fBopenssl\-format\-options\fR\|(1) for details.
  104. .IP "\fB\-outform\fR \fBDER\fR|\fBPEM\fR" 4
  105. .IX Item "-outform DER|PEM"
  106. The EC parameters output format; the default is \fBPEM\fR.
  107. See \fBopenssl\-format\-options\fR\|(1) for details.
  108. .Sp
  109. Parameters are encoded as \fBEcpkParameters\fR as specified in IETF RFC 3279.
  110. .IP "\fB\-in\fR \fIfilename\fR" 4
  111. .IX Item "-in filename"
  112. This specifies the input filename to read parameters from or standard input if
  113. this option is not specified.
  114. .IP "\fB\-out\fR \fIfilename\fR" 4
  115. .IX Item "-out filename"
  116. This specifies the output filename parameters to. Standard output is used
  117. if this option is not present. The output filename should \fBnot\fR be the same
  118. as the input filename.
  119. .IP \fB\-noout\fR 4
  120. .IX Item "-noout"
  121. This option inhibits the output of the encoded version of the parameters.
  122. .IP \fB\-text\fR 4
  123. .IX Item "-text"
  124. This option prints out the EC parameters in human readable form.
  125. .IP \fB\-check\fR 4
  126. .IX Item "-check"
  127. Validate the elliptic curve parameters.
  128. .IP \fB\-check_named\fR 4
  129. .IX Item "-check_named"
  130. Validate the elliptic name curve parameters by checking if the curve parameters
  131. match any built-in curves.
  132. .IP "\fB\-name\fR \fIarg\fR" 4
  133. .IX Item "-name arg"
  134. Use the EC parameters with the specified 'short' name. Use \fB\-list_curves\fR
  135. to get a list of all currently implemented EC parameters.
  136. .IP \fB\-list_curves\fR 4
  137. .IX Item "-list_curves"
  138. Print out a list of all currently implemented EC parameters names and exit.
  139. .IP "\fB\-conv_form\fR \fIarg\fR" 4
  140. .IX Item "-conv_form arg"
  141. This specifies how the points on the elliptic curve are converted
  142. into octet strings. Possible values are: \fBcompressed\fR, \fBuncompressed\fR (the
  143. default value) and \fBhybrid\fR. For more information regarding
  144. the point conversion forms please read the X9.62 standard.
  145. \&\fBNote\fR Due to patent issues the \fBcompressed\fR option is disabled
  146. by default for binary curves and can be enabled by defining
  147. the preprocessor macro \fBOPENSSL_EC_BIN_PT_COMP\fR at compile time.
  148. .IP "\fB\-param_enc\fR \fIarg\fR" 4
  149. .IX Item "-param_enc arg"
  150. This specifies how the elliptic curve parameters are encoded.
  151. Possible value are: \fBnamed_curve\fR, i.e. the ec parameters are
  152. specified by an OID, or \fBexplicit\fR where the ec parameters are
  153. explicitly given (see RFC 3279 for the definition of the
  154. EC parameters structures). The default value is \fBnamed_curve\fR.
  155. \&\fBNote\fR the \fBimplicitlyCA\fR alternative, as specified in RFC 3279,
  156. is currently not implemented in OpenSSL.
  157. .IP \fB\-no_seed\fR 4
  158. .IX Item "-no_seed"
  159. This option inhibits that the 'seed' for the parameter generation
  160. is included in the ECParameters structure (see RFC 3279).
  161. .IP \fB\-genkey\fR 4
  162. .IX Item "-genkey"
  163. This option will generate an EC private key using the specified parameters.
  164. .IP "\fB\-engine\fR \fIid\fR" 4
  165. .IX Item "-engine id"
  166. See "Engine Options" in \fBopenssl\fR\|(1).
  167. This option is deprecated.
  168. .IP "\fB\-rand\fR \fIfiles\fR, \fB\-writerand\fR \fIfile\fR" 4
  169. .IX Item "-rand files, -writerand file"
  170. See "Random State Options" in \fBopenssl\fR\|(1) for details.
  171. .IP "\fB\-provider\fR \fIname\fR" 4
  172. .IX Item "-provider name"
  173. .PD 0
  174. .IP "\fB\-provider\-path\fR \fIpath\fR" 4
  175. .IX Item "-provider-path path"
  176. .IP "\fB\-propquery\fR \fIpropq\fR" 4
  177. .IX Item "-propquery propq"
  178. .PD
  179. See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7).
  180. .PP
  181. The \fBopenssl\-genpkey\fR\|(1) and \fBopenssl\-pkeyparam\fR\|(1) commands are capable
  182. of performing all the operations this command can, as well as supporting
  183. other public key types.
  184. .SH EXAMPLES
  185. .IX Header "EXAMPLES"
  186. The documentation for the \fBopenssl\-genpkey\fR\|(1) and \fBopenssl\-pkeyparam\fR\|(1)
  187. commands contains examples equivalent to the ones listed here.
  188. .PP
  189. To create EC parameters with the group 'prime192v1':
  190. .PP
  191. .Vb 1
  192. \& openssl ecparam \-out ec_param.pem \-name prime192v1
  193. .Ve
  194. .PP
  195. To create EC parameters with explicit parameters:
  196. .PP
  197. .Vb 1
  198. \& openssl ecparam \-out ec_param.pem \-name prime192v1 \-param_enc explicit
  199. .Ve
  200. .PP
  201. To validate given EC parameters:
  202. .PP
  203. .Vb 1
  204. \& openssl ecparam \-in ec_param.pem \-check
  205. .Ve
  206. .PP
  207. To create EC parameters and a private key:
  208. .PP
  209. .Vb 1
  210. \& openssl ecparam \-out ec_key.pem \-name prime192v1 \-genkey
  211. .Ve
  212. .PP
  213. To change the point encoding to 'compressed':
  214. .PP
  215. .Vb 1
  216. \& openssl ecparam \-in ec_in.pem \-out ec_out.pem \-conv_form compressed
  217. .Ve
  218. .PP
  219. To print out the EC parameters to standard output:
  220. .PP
  221. .Vb 1
  222. \& openssl ecparam \-in ec_param.pem \-noout \-text
  223. .Ve
  224. .SH "SEE ALSO"
  225. .IX Header "SEE ALSO"
  226. \&\fBopenssl\fR\|(1),
  227. \&\fBopenssl\-pkeyparam\fR\|(1),
  228. \&\fBopenssl\-genpkey\fR\|(1),
  229. \&\fBopenssl\-ec\fR\|(1),
  230. \&\fBopenssl\-dsaparam\fR\|(1)
  231. .SH HISTORY
  232. .IX Header "HISTORY"
  233. The \fB\-engine\fR option was deprecated in OpenSSL 3.0.
  234. .PP
  235. The \fB\-C\fR option was removed in OpenSSL 3.0.
  236. .SH COPYRIGHT
  237. .IX Header "COPYRIGHT"
  238. Copyright 2003\-2021 The OpenSSL Project Authors. All Rights Reserved.
  239. .PP
  240. Licensed under the Apache License 2.0 (the "License"). You may not use
  241. this file except in compliance with the License. You can obtain a copy
  242. in the file LICENSE in the source distribution or at
  243. <https://www.openssl.org/source/license.html>.