man-pages/man1/ecparam.1ssl.html
2021-03-31 01:06:50 +01:00

299 lines
7.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of ECPARAM</TITLE>
</HEAD><BODY>
<H1>ECPARAM</H1>
Section: OpenSSL (1SSL)<BR>Updated: 2021-03-22<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
openssl-ecparam, ecparam - EC parameter manipulation and generation
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>openssl ecparam</B>
[<B>-help</B>]
[<B>-inform DER|PEM</B>]
[<B>-outform DER|PEM</B>]
[<B>-in filename</B>]
[<B>-out filename</B>]
[<B>-noout</B>]
[<B>-text</B>]
[<B>-C</B>]
[<B>-check</B>]
[<B>-name arg</B>]
[<B>-list_curves</B>]
[<B>-conv_form arg</B>]
[<B>-param_enc arg</B>]
[<B>-no_seed</B>]
[<B>-rand file...</B>]
[<B>-writerand file</B>]
[<B>-genkey</B>]
[<B>-engine id</B>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
This command is used to manipulate or generate <FONT SIZE="-1">EC</FONT> parameter files.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-help</B><DD>
Print out a usage message.
<DT id="2"><B>-inform DER|PEM</B><DD>
This specifies the input format. The <B></B><FONT SIZE="-1"><B>DER</B></FONT><B></B> option uses an <FONT SIZE="-1">ASN.1 DER</FONT> encoded
form compatible with <FONT SIZE="-1">RFC 3279</FONT> EcpkParameters. The <FONT SIZE="-1">PEM</FONT> form is the default
format: it consists of the <B></B><FONT SIZE="-1"><B>DER</B></FONT><B></B> format base64 encoded with additional
header and footer lines.
<DT id="3"><B>-outform DER|PEM</B><DD>
This specifies the output format, the options have the same meaning and default
as the <B>-inform</B> option.
<DT id="4"><B>-in filename</B><DD>
This specifies the input filename to read parameters from or standard input if
this option is not specified.
<DT id="5"><B>-out filename</B><DD>
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.
<DT id="6"><B>-noout</B><DD>
This option inhibits the output of the encoded version of the parameters.
<DT id="7"><B>-text</B><DD>
This option prints out the <FONT SIZE="-1">EC</FONT> parameters in human readable form.
<DT id="8"><B>-C</B><DD>
This option converts the <FONT SIZE="-1">EC</FONT> parameters into C code. The parameters can then
be loaded by calling the <B>get_ec_group_XXX()</B> function.
<DT id="9"><B>-check</B><DD>
Validate the elliptic curve parameters.
<DT id="10"><B>-name arg</B><DD>
Use the <FONT SIZE="-1">EC</FONT> parameters with the specified 'short' name. Use <B>-list_curves</B>
to get a list of all currently implemented <FONT SIZE="-1">EC</FONT> parameters.
<DT id="11"><B>-list_curves</B><DD>
If this options is specified <B>ecparam</B> will print out a list of all
currently implemented <FONT SIZE="-1">EC</FONT> parameters names and exit.
<DT id="12"><B>-conv_form</B><DD>
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></B><FONT SIZE="-1"><B>OPENSSL_EC_BIN_PT_COMP</B></FONT><B></B> at compile time.
<DT id="13"><B>-param_enc arg</B><DD>
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 <FONT SIZE="-1">OID,</FONT> or <B>explicit</B> where the ec parameters are
explicitly given (see <FONT SIZE="-1">RFC 3279</FONT> for the definition of the
<FONT SIZE="-1">EC</FONT> parameters structures). The default value is <B>named_curve</B>.
<B>Note</B> the <B>implicitlyCA</B> alternative, as specified in <FONT SIZE="-1">RFC 3279,</FONT>
is currently not implemented in OpenSSL.
<DT id="14"><B>-no_seed</B><DD>
This option inhibits that the 'seed' for the parameter generation
is included in the ECParameters structure (see <FONT SIZE="-1">RFC 3279</FONT>).
<DT id="15"><B>-genkey</B><DD>
This option will generate an <FONT SIZE="-1">EC</FONT> private key using the specified parameters.
<DT id="16"><B>-rand file...</B><DD>
A file or files containing random data used to seed the random number
generator.
Multiple files can be specified separated by an OS-dependent character.
The separator is <B>;</B> for MS-Windows, <B>,</B> for OpenVMS, and <B>:</B> for
all others.
<DT id="17">[<B>-writerand file</B>]<DD>
Writes random data to the specified <I>file</I> upon exit.
This can be used with a subsequent <B>-rand</B> flag.
<DT id="18"><B>-engine id</B><DD>
Specifying an engine (by its unique <B>id</B> string) will cause <B>ecparam</B>
to attempt to obtain a functional reference to the specified engine,
thus initialising it if needed. The engine will then be set as the default
for all available algorithms.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>NOTES</H2>
<FONT SIZE="-1">PEM</FONT> format <FONT SIZE="-1">EC</FONT> parameters use the header and footer lines:
<P>
<PRE>
-----BEGIN EC PARAMETERS-----
-----END EC PARAMETERS-----
</PRE>
<P>
OpenSSL is currently not able to generate new groups and therefore
<B>ecparam</B> can only create <FONT SIZE="-1">EC</FONT> parameters from known (named) curves.
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLES</H2>
To create <FONT SIZE="-1">EC</FONT> parameters with the group 'prime192v1':
<P>
<PRE>
openssl ecparam -out ec_param.pem -name prime192v1
</PRE>
<P>
To create <FONT SIZE="-1">EC</FONT> parameters with explicit parameters:
<P>
<PRE>
openssl ecparam -out ec_param.pem -name prime192v1 -param_enc explicit
</PRE>
<P>
To validate given <FONT SIZE="-1">EC</FONT> parameters:
<P>
<PRE>
openssl ecparam -in ec_param.pem -check
</PRE>
<P>
To create <FONT SIZE="-1">EC</FONT> parameters and a private key:
<P>
<PRE>
openssl ecparam -out ec_key.pem -name prime192v1 -genkey
</PRE>
<P>
To change the point encoding to 'compressed':
<P>
<PRE>
openssl ecparam -in ec_in.pem -out ec_out.pem -conv_form compressed
</PRE>
<P>
To print out the <FONT SIZE="-1">EC</FONT> parameters to standard output:
<P>
<PRE>
openssl ecparam -in ec_param.pem -noout -text
</PRE>
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+ec">ec</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+dsaparam">dsaparam</A></B>(1)
<A NAME="lbAI">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright 2003-2018 The OpenSSL Project Authors. All Rights Reserved.
<P>
Licensed under the OpenSSL license (the ``License''). You may not use
this file except in compliance with the License. You can obtain a copy
in the file <FONT SIZE="-1">LICENSE</FONT> in the source distribution or at
&lt;<A HREF="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</A>&gt;.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="19"><A HREF="#lbAB">NAME</A><DD>
<DT id="20"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="21"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="22"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="23"><A HREF="#lbAF">NOTES</A><DD>
<DT id="24"><A HREF="#lbAG">EXAMPLES</A><DD>
<DT id="25"><A HREF="#lbAH">SEE ALSO</A><DD>
<DT id="26"><A HREF="#lbAI">COPYRIGHT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:11 GMT, March 31, 2021
</BODY>
</HTML>