openssl-ecparam.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?xml version="1.0" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>openssl-ecparam</title>
  6. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  7. <link rev="made" href="mailto:root@localhost" />
  8. </head>
  9. <body>
  10. <ul id="index">
  11. <li><a href="#NAME">NAME</a></li>
  12. <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
  13. <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
  14. <li><a href="#OPTIONS">OPTIONS</a></li>
  15. <li><a href="#EXAMPLES">EXAMPLES</a></li>
  16. <li><a href="#SEE-ALSO">SEE ALSO</a></li>
  17. <li><a href="#HISTORY">HISTORY</a></li>
  18. <li><a href="#COPYRIGHT">COPYRIGHT</a></li>
  19. </ul>
  20. <h1 id="NAME">NAME</h1>
  21. <p>openssl-ecparam - EC parameter manipulation and generation</p>
  22. <h1 id="SYNOPSIS">SYNOPSIS</h1>
  23. <p><b>openssl ecparam</b> [<b>-help</b>] [<b>-inform</b> <b>DER</b>|<b>PEM</b>] [<b>-outform</b> <b>DER</b>|<b>PEM</b>] [<b>-in</b> <i>filename</i>] [<b>-out</b> <i>filename</i>] [<b>-noout</b>] [<b>-text</b>] [<b>-check</b>] [<b>-check_named</b>] [<b>-name</b> <i>arg</i>] [<b>-list_curves</b>] [<b>-conv_form</b> <i>arg</i>] [<b>-param_enc</b> <i>arg</i>] [<b>-no_seed</b>] [<b>-genkey</b>] [<b>-engine</b> <i>id</i>] [<b>-rand</b> <i>files</i>] [<b>-writerand</b> <i>file</i>] [<b>-provider</b> <i>name</i>] [<b>-provider-path</b> <i>path</i>] [<b>-propquery</b> <i>propq</i>]</p>
  24. <h1 id="DESCRIPTION">DESCRIPTION</h1>
  25. <p>This command is used to manipulate or generate EC parameter files.</p>
  26. <p>OpenSSL is currently not able to generate new groups and therefore this command can only create EC parameters from known (named) curves.</p>
  27. <h1 id="OPTIONS">OPTIONS</h1>
  28. <dl>
  29. <dt id="help"><b>-help</b></dt>
  30. <dd>
  31. <p>Print out a usage message.</p>
  32. </dd>
  33. <dt id="inform-DER-PEM"><b>-inform</b> <b>DER</b>|<b>PEM</b></dt>
  34. <dd>
  35. <p>The EC parameters input format; unspecified by default. See <a href="../man1/openssl-format-options.html">openssl-format-options(1)</a> for details.</p>
  36. </dd>
  37. <dt id="outform-DER-PEM"><b>-outform</b> <b>DER</b>|<b>PEM</b></dt>
  38. <dd>
  39. <p>The EC parameters output format; the default is <b>PEM</b>. See <a href="../man1/openssl-format-options.html">openssl-format-options(1)</a> for details.</p>
  40. <p>Parameters are encoded as <b>EcpkParameters</b> as specified in IETF RFC 3279.</p>
  41. </dd>
  42. <dt id="in-filename"><b>-in</b> <i>filename</i></dt>
  43. <dd>
  44. <p>This specifies the input filename to read parameters from or standard input if this option is not specified.</p>
  45. </dd>
  46. <dt id="out-filename"><b>-out</b> <i>filename</i></dt>
  47. <dd>
  48. <p>This specifies the output filename parameters to. Standard output is used if this option is not present. The output filename should <b>not</b> be the same as the input filename.</p>
  49. </dd>
  50. <dt id="noout"><b>-noout</b></dt>
  51. <dd>
  52. <p>This option inhibits the output of the encoded version of the parameters.</p>
  53. </dd>
  54. <dt id="text"><b>-text</b></dt>
  55. <dd>
  56. <p>This option prints out the EC parameters in human readable form.</p>
  57. </dd>
  58. <dt id="check"><b>-check</b></dt>
  59. <dd>
  60. <p>Validate the elliptic curve parameters.</p>
  61. </dd>
  62. <dt id="check_named"><b>-check_named</b></dt>
  63. <dd>
  64. <p>Validate the elliptic name curve parameters by checking if the curve parameters match any built-in curves.</p>
  65. </dd>
  66. <dt id="name-arg"><b>-name</b> <i>arg</i></dt>
  67. <dd>
  68. <p>Use the EC parameters with the specified &#39;short&#39; name. Use <b>-list_curves</b> to get a list of all currently implemented EC parameters.</p>
  69. </dd>
  70. <dt id="list_curves"><b>-list_curves</b></dt>
  71. <dd>
  72. <p>Print out a list of all currently implemented EC parameters names and exit.</p>
  73. </dd>
  74. <dt id="conv_form-arg"><b>-conv_form</b> <i>arg</i></dt>
  75. <dd>
  76. <p>This specifies how the points on the elliptic curve are converted into octet strings. Possible values are: <b>compressed</b>, <b>uncompressed</b> (the default value) and <b>hybrid</b>. For more information regarding the point conversion forms please read the X9.62 standard. <b>Note</b> Due to patent issues the <b>compressed</b> option is disabled by default for binary curves and can be enabled by defining the preprocessor macro <b>OPENSSL_EC_BIN_PT_COMP</b> at compile time.</p>
  77. </dd>
  78. <dt id="param_enc-arg"><b>-param_enc</b> <i>arg</i></dt>
  79. <dd>
  80. <p>This specifies how the elliptic curve parameters are encoded. Possible value are: <b>named_curve</b>, i.e. the ec parameters are specified by an OID, or <b>explicit</b> where the ec parameters are explicitly given (see RFC 3279 for the definition of the EC parameters structures). The default value is <b>named_curve</b>. <b>Note</b> the <b>implicitlyCA</b> alternative, as specified in RFC 3279, is currently not implemented in OpenSSL.</p>
  81. </dd>
  82. <dt id="no_seed"><b>-no_seed</b></dt>
  83. <dd>
  84. <p>This option inhibits that the &#39;seed&#39; for the parameter generation is included in the ECParameters structure (see RFC 3279).</p>
  85. </dd>
  86. <dt id="genkey"><b>-genkey</b></dt>
  87. <dd>
  88. <p>This option will generate an EC private key using the specified parameters.</p>
  89. </dd>
  90. <dt id="engine-id"><b>-engine</b> <i>id</i></dt>
  91. <dd>
  92. <p>See <a href="../man1/openssl.html">&quot;Engine Options&quot; in openssl(1)</a>. This option is deprecated.</p>
  93. </dd>
  94. <dt id="rand-files--writerand-file"><b>-rand</b> <i>files</i>, <b>-writerand</b> <i>file</i></dt>
  95. <dd>
  96. <p>See <a href="../man1/openssl.html">&quot;Random State Options&quot; in openssl(1)</a> for details.</p>
  97. </dd>
  98. <dt id="provider-name"><b>-provider</b> <i>name</i></dt>
  99. <dd>
  100. </dd>
  101. <dt id="provider-path-path"><b>-provider-path</b> <i>path</i></dt>
  102. <dd>
  103. </dd>
  104. <dt id="propquery-propq"><b>-propquery</b> <i>propq</i></dt>
  105. <dd>
  106. <p>See <a href="../man1/openssl.html">&quot;Provider Options&quot; in openssl(1)</a>, <a href="../man7/provider.html">provider(7)</a>, and <a href="../man7/property.html">property(7)</a>.</p>
  107. </dd>
  108. </dl>
  109. <p>The <a href="../man1/openssl-genpkey.html">openssl-genpkey(1)</a> and <a href="../man1/openssl-pkeyparam.html">openssl-pkeyparam(1)</a> commands are capable of performing all the operations this command can, as well as supporting other public key types.</p>
  110. <h1 id="EXAMPLES">EXAMPLES</h1>
  111. <p>The documentation for the <a href="../man1/openssl-genpkey.html">openssl-genpkey(1)</a> and <a href="../man1/openssl-pkeyparam.html">openssl-pkeyparam(1)</a> commands contains examples equivalent to the ones listed here.</p>
  112. <p>To create EC parameters with the group &#39;prime192v1&#39;:</p>
  113. <pre><code>openssl ecparam -out ec_param.pem -name prime192v1</code></pre>
  114. <p>To create EC parameters with explicit parameters:</p>
  115. <pre><code>openssl ecparam -out ec_param.pem -name prime192v1 -param_enc explicit</code></pre>
  116. <p>To validate given EC parameters:</p>
  117. <pre><code>openssl ecparam -in ec_param.pem -check</code></pre>
  118. <p>To create EC parameters and a private key:</p>
  119. <pre><code>openssl ecparam -out ec_key.pem -name prime192v1 -genkey</code></pre>
  120. <p>To change the point encoding to &#39;compressed&#39;:</p>
  121. <pre><code>openssl ecparam -in ec_in.pem -out ec_out.pem -conv_form compressed</code></pre>
  122. <p>To print out the EC parameters to standard output:</p>
  123. <pre><code>openssl ecparam -in ec_param.pem -noout -text</code></pre>
  124. <h1 id="SEE-ALSO">SEE ALSO</h1>
  125. <p><a href="../man1/openssl.html">openssl(1)</a>, <a href="../man1/openssl-pkeyparam.html">openssl-pkeyparam(1)</a>, <a href="../man1/openssl-genpkey.html">openssl-genpkey(1)</a>, <a href="../man1/openssl-ec.html">openssl-ec(1)</a>, <a href="../man1/openssl-dsaparam.html">openssl-dsaparam(1)</a></p>
  126. <h1 id="HISTORY">HISTORY</h1>
  127. <p>The <b>-engine</b> option was deprecated in OpenSSL 3.0.</p>
  128. <p>The <b>-C</b> option was removed in OpenSSL 3.0.</p>
  129. <h1 id="COPYRIGHT">COPYRIGHT</h1>
  130. <p>Copyright 2003-2021 The OpenSSL Project Authors. All Rights Reserved.</p>
  131. <p>Licensed under the Apache License 2.0 (the &quot;License&quot;). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
  132. </body>
  133. </html>