xref: /minix3/crypto/external/bsd/openssl/dist/doc/apps/ecparam.pod (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1ebfedea0SLionel Sambuc=pod
2ebfedea0SLionel Sambuc
3ebfedea0SLionel Sambuc=head1 NAME
4ebfedea0SLionel Sambuc
5ebfedea0SLionel Sambucecparam - EC parameter manipulation and generation
6ebfedea0SLionel Sambuc
7ebfedea0SLionel Sambuc=head1 SYNOPSIS
8ebfedea0SLionel Sambuc
9ebfedea0SLionel SambucB<openssl ecparam>
10ebfedea0SLionel Sambuc[B<-inform DER|PEM>]
11ebfedea0SLionel Sambuc[B<-outform DER|PEM>]
12ebfedea0SLionel Sambuc[B<-in filename>]
13ebfedea0SLionel Sambuc[B<-out filename>]
14ebfedea0SLionel Sambuc[B<-noout>]
15ebfedea0SLionel Sambuc[B<-text>]
16ebfedea0SLionel Sambuc[B<-C>]
17ebfedea0SLionel Sambuc[B<-check>]
18ebfedea0SLionel Sambuc[B<-name arg>]
19*0a6a1f1dSLionel Sambuc[B<-list_curves>]
20ebfedea0SLionel Sambuc[B<-conv_form arg>]
21ebfedea0SLionel Sambuc[B<-param_enc arg>]
22ebfedea0SLionel Sambuc[B<-no_seed>]
23ebfedea0SLionel Sambuc[B<-rand file(s)>]
24ebfedea0SLionel Sambuc[B<-genkey>]
25ebfedea0SLionel Sambuc[B<-engine id>]
26ebfedea0SLionel Sambuc
27ebfedea0SLionel Sambuc=head1 DESCRIPTION
28ebfedea0SLionel Sambuc
29ebfedea0SLionel SambucThis command is used to manipulate or generate EC parameter files.
30ebfedea0SLionel Sambuc
31ebfedea0SLionel Sambuc=head1 OPTIONS
32ebfedea0SLionel Sambuc
33ebfedea0SLionel Sambuc=over 4
34ebfedea0SLionel Sambuc
35ebfedea0SLionel Sambuc=item B<-inform DER|PEM>
36ebfedea0SLionel Sambuc
37ebfedea0SLionel SambucThis specifies the input format. The B<DER> option uses an ASN.1 DER encoded
38ebfedea0SLionel Sambucform compatible with RFC 3279 EcpkParameters. The PEM form is the default
39ebfedea0SLionel Sambucformat: it consists of the B<DER> format base64 encoded with additional
40ebfedea0SLionel Sambucheader and footer lines.
41ebfedea0SLionel Sambuc
42ebfedea0SLionel Sambuc=item B<-outform DER|PEM>
43ebfedea0SLionel Sambuc
44ebfedea0SLionel SambucThis specifies the output format, the options have the same meaning as the
45ebfedea0SLionel SambucB<-inform> option.
46ebfedea0SLionel Sambuc
47ebfedea0SLionel Sambuc=item B<-in filename>
48ebfedea0SLionel Sambuc
49ebfedea0SLionel SambucThis specifies the input filename to read parameters from or standard input if
50ebfedea0SLionel Sambucthis option is not specified.
51ebfedea0SLionel Sambuc
52ebfedea0SLionel Sambuc=item B<-out filename>
53ebfedea0SLionel Sambuc
54ebfedea0SLionel SambucThis specifies the output filename parameters to. Standard output is used
55ebfedea0SLionel Sambucif this option is not present. The output filename should B<not> be the same
56ebfedea0SLionel Sambucas the input filename.
57ebfedea0SLionel Sambuc
58ebfedea0SLionel Sambuc=item B<-noout>
59ebfedea0SLionel Sambuc
60ebfedea0SLionel SambucThis option inhibits the output of the encoded version of the parameters.
61ebfedea0SLionel Sambuc
62ebfedea0SLionel Sambuc=item B<-text>
63ebfedea0SLionel Sambuc
64ebfedea0SLionel SambucThis option prints out the EC parameters in human readable form.
65ebfedea0SLionel Sambuc
66ebfedea0SLionel Sambuc=item B<-C>
67ebfedea0SLionel Sambuc
68ebfedea0SLionel SambucThis option converts the EC parameters into C code. The parameters can then
69ebfedea0SLionel Sambucbe loaded by calling the B<get_ec_group_XXX()> function.
70ebfedea0SLionel Sambuc
71ebfedea0SLionel Sambuc=item B<-check>
72ebfedea0SLionel Sambuc
73ebfedea0SLionel SambucValidate the elliptic curve parameters.
74ebfedea0SLionel Sambuc
75ebfedea0SLionel Sambuc=item B<-name arg>
76ebfedea0SLionel Sambuc
77ebfedea0SLionel SambucUse the EC parameters with the specified 'short' name. Use B<-list_curves>
78ebfedea0SLionel Sambucto get a list of all currently implemented EC parameters.
79ebfedea0SLionel Sambuc
80ebfedea0SLionel Sambuc=item B<-list_curves>
81ebfedea0SLionel Sambuc
82ebfedea0SLionel SambucIf this options is specified B<ecparam> will print out a list of all
83ebfedea0SLionel Sambuccurrently implemented EC parameters names and exit.
84ebfedea0SLionel Sambuc
85ebfedea0SLionel Sambuc=item B<-conv_form>
86ebfedea0SLionel Sambuc
87ebfedea0SLionel SambucThis specifies how the points on the elliptic curve are converted
88ebfedea0SLionel Sambucinto octet strings. Possible values are: B<compressed> (the default
89ebfedea0SLionel Sambucvalue), B<uncompressed> and B<hybrid>. For more information regarding
90ebfedea0SLionel Sambucthe point conversion forms please read the X9.62 standard.
91ebfedea0SLionel SambucB<Note> Due to patent issues the B<compressed> option is disabled
92ebfedea0SLionel Sambucby default for binary curves and can be enabled by defining
93ebfedea0SLionel Sambucthe preprocessor macro B<OPENSSL_EC_BIN_PT_COMP> at compile time.
94ebfedea0SLionel Sambuc
95ebfedea0SLionel Sambuc=item B<-param_enc arg>
96ebfedea0SLionel Sambuc
97ebfedea0SLionel SambucThis specifies how the elliptic curve parameters are encoded.
98ebfedea0SLionel SambucPossible value are: B<named_curve>, i.e. the ec parameters are
99ebfedea0SLionel Sambucspecified by a OID, or B<explicit> where the ec parameters are
100ebfedea0SLionel Sambucexplicitly given (see RFC 3279 for the definition of the
101ebfedea0SLionel SambucEC parameters structures). The default value is B<named_curve>.
102ebfedea0SLionel SambucB<Note> the B<implicitlyCA> alternative ,as specified in RFC 3279,
103ebfedea0SLionel Sambucis currently not implemented in OpenSSL.
104ebfedea0SLionel Sambuc
105ebfedea0SLionel Sambuc=item B<-no_seed>
106ebfedea0SLionel Sambuc
107ebfedea0SLionel SambucThis option inhibits that the 'seed' for the parameter generation
108ebfedea0SLionel Sambucis included in the ECParameters structure (see RFC 3279).
109ebfedea0SLionel Sambuc
110ebfedea0SLionel Sambuc=item B<-genkey>
111ebfedea0SLionel Sambuc
112ebfedea0SLionel SambucThis option will generate a EC private key using the specified parameters.
113ebfedea0SLionel Sambuc
114ebfedea0SLionel Sambuc=item B<-rand file(s)>
115ebfedea0SLionel Sambuc
116ebfedea0SLionel Sambuca file or files containing random data used to seed the random number
117ebfedea0SLionel Sambucgenerator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>).
118ebfedea0SLionel SambucMultiple files can be specified separated by a OS-dependent character.
119ebfedea0SLionel SambucThe separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
120ebfedea0SLionel Sambucall others.
121ebfedea0SLionel Sambuc
122ebfedea0SLionel Sambuc=item B<-engine id>
123ebfedea0SLionel Sambuc
124ebfedea0SLionel Sambucspecifying an engine (by its unique B<id> string) will cause B<ecparam>
125ebfedea0SLionel Sambucto attempt to obtain a functional reference to the specified engine,
126ebfedea0SLionel Sambucthus initialising it if needed. The engine will then be set as the default
127ebfedea0SLionel Sambucfor all available algorithms.
128ebfedea0SLionel Sambuc
129ebfedea0SLionel Sambuc=back
130ebfedea0SLionel Sambuc
131ebfedea0SLionel Sambuc=head1 NOTES
132ebfedea0SLionel Sambuc
133ebfedea0SLionel SambucPEM format EC parameters use the header and footer lines:
134ebfedea0SLionel Sambuc
135ebfedea0SLionel Sambuc -----BEGIN EC PARAMETERS-----
136ebfedea0SLionel Sambuc -----END EC PARAMETERS-----
137ebfedea0SLionel Sambuc
138ebfedea0SLionel SambucOpenSSL is currently not able to generate new groups and therefore
139ebfedea0SLionel SambucB<ecparam> can only create EC parameters from known (named) curves.
140ebfedea0SLionel Sambuc
141ebfedea0SLionel Sambuc=head1 EXAMPLES
142ebfedea0SLionel Sambuc
143ebfedea0SLionel SambucTo create EC parameters with the group 'prime192v1':
144ebfedea0SLionel Sambuc
145ebfedea0SLionel Sambuc  openssl ecparam -out ec_param.pem -name prime192v1
146ebfedea0SLionel Sambuc
147ebfedea0SLionel SambucTo create EC parameters with explicit parameters:
148ebfedea0SLionel Sambuc
149ebfedea0SLionel Sambuc  openssl ecparam -out ec_param.pem -name prime192v1 -param_enc explicit
150ebfedea0SLionel Sambuc
151ebfedea0SLionel SambucTo validate given EC parameters:
152ebfedea0SLionel Sambuc
153ebfedea0SLionel Sambuc  openssl ecparam -in ec_param.pem -check
154ebfedea0SLionel Sambuc
155ebfedea0SLionel SambucTo create EC parameters and a private key:
156ebfedea0SLionel Sambuc
157ebfedea0SLionel Sambuc  openssl ecparam -out ec_key.pem -name prime192v1 -genkey
158ebfedea0SLionel Sambuc
159ebfedea0SLionel SambucTo change the point encoding to 'compressed':
160ebfedea0SLionel Sambuc
161ebfedea0SLionel Sambuc  openssl ecparam -in ec_in.pem -out ec_out.pem -conv_form compressed
162ebfedea0SLionel Sambuc
163ebfedea0SLionel SambucTo print out the EC parameters to standard output:
164ebfedea0SLionel Sambuc
165ebfedea0SLionel Sambuc  openssl ecparam -in ec_param.pem -noout -text
166ebfedea0SLionel Sambuc
167ebfedea0SLionel Sambuc=head1 SEE ALSO
168ebfedea0SLionel Sambuc
169ebfedea0SLionel SambucL<ec(1)|ec(1)>, L<dsaparam(1)|dsaparam(1)>
170ebfedea0SLionel Sambuc
171ebfedea0SLionel Sambuc=head1 HISTORY
172ebfedea0SLionel Sambuc
173ebfedea0SLionel SambucThe ecparam command was first introduced in OpenSSL 0.9.8.
174ebfedea0SLionel Sambuc
175ebfedea0SLionel Sambuc=head1 AUTHOR
176ebfedea0SLionel Sambuc
177ebfedea0SLionel SambucNils Larsch for the OpenSSL project (http://www.openssl.org)
178ebfedea0SLionel Sambuc
179ebfedea0SLionel Sambuc=cut
180