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