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