ecparam.pod 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. =pod
  2. =head1 NAME
  3. openssl-ecparam,
  4. ecparam - EC parameter manipulation and generation
  5. =head1 SYNOPSIS
  6. B<openssl ecparam>
  7. [B<-help>]
  8. [B<-inform DER|PEM>]
  9. [B<-outform DER|PEM>]
  10. [B<-in filename>]
  11. [B<-out filename>]
  12. [B<-noout>]
  13. [B<-text>]
  14. [B<-C>]
  15. [B<-check>]
  16. [B<-check_named>]
  17. [B<-name arg>]
  18. [B<-list_curves>]
  19. [B<-conv_form arg>]
  20. [B<-param_enc arg>]
  21. [B<-no_seed>]
  22. [B<-rand file...>]
  23. [B<-writerand file>]
  24. [B<-genkey>]
  25. [B<-engine id>]
  26. =head1 DESCRIPTION
  27. This command is used to manipulate or generate EC parameter files.
  28. =head1 OPTIONS
  29. =over 4
  30. =item B<-help>
  31. Print out a usage message.
  32. =item B<-inform DER|PEM>
  33. This specifies the input format. The B<DER> option uses an ASN.1 DER encoded
  34. form compatible with RFC 3279 EcpkParameters. The PEM form is the default
  35. format: it consists of the B<DER> format base64 encoded with additional
  36. header and footer lines.
  37. =item B<-outform DER|PEM>
  38. This specifies the output format, the options have the same meaning and default
  39. as the B<-inform> option.
  40. =item B<-in filename>
  41. This specifies the input filename to read parameters from or standard input if
  42. this option is not specified.
  43. =item B<-out filename>
  44. This specifies the output filename parameters to. Standard output is used
  45. if this option is not present. The output filename should B<not> be the same
  46. as the input filename.
  47. =item B<-noout>
  48. This option inhibits the output of the encoded version of the parameters.
  49. =item B<-text>
  50. This option prints out the EC parameters in human readable form.
  51. =item B<-C>
  52. This option converts the EC parameters into C code. The parameters can then
  53. be loaded by calling the get_ec_group_XXX() function.
  54. =item B<-check>
  55. Validate the elliptic curve parameters.
  56. =item B<-check_named>
  57. Validate the elliptic name curve parameters by checking if the curve parameters
  58. match any built-in curves.
  59. =item B<-name arg>
  60. Use the EC parameters with the specified 'short' name. Use B<-list_curves>
  61. to get a list of all currently implemented EC parameters.
  62. =item B<-list_curves>
  63. If this options is specified B<ecparam> will print out a list of all
  64. currently implemented EC parameters names and exit.
  65. =item B<-conv_form>
  66. This specifies how the points on the elliptic curve are converted
  67. into octet strings. Possible values are: B<compressed>, B<uncompressed> (the
  68. default value) and B<hybrid>. For more information regarding
  69. the point conversion forms please read the X9.62 standard.
  70. B<Note> Due to patent issues the B<compressed> option is disabled
  71. by default for binary curves and can be enabled by defining
  72. the preprocessor macro B<OPENSSL_EC_BIN_PT_COMP> at compile time.
  73. =item B<-param_enc arg>
  74. This specifies how the elliptic curve parameters are encoded.
  75. Possible value are: B<named_curve>, i.e. the ec parameters are
  76. specified by an OID, or B<explicit> where the ec parameters are
  77. explicitly given (see RFC 3279 for the definition of the
  78. EC parameters structures). The default value is B<named_curve>.
  79. B<Note> the B<implicitlyCA> alternative, as specified in RFC 3279,
  80. is currently not implemented in OpenSSL.
  81. =item B<-no_seed>
  82. This option inhibits that the 'seed' for the parameter generation
  83. is included in the ECParameters structure (see RFC 3279).
  84. =item B<-genkey>
  85. This option will generate an EC private key using the specified parameters.
  86. =item B<-rand file...>
  87. A file or files containing random data used to seed the random number
  88. generator.
  89. Multiple files can be specified separated by an OS-dependent character.
  90. The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
  91. all others.
  92. =item [B<-writerand file>]
  93. Writes random data to the specified I<file> upon exit.
  94. This can be used with a subsequent B<-rand> flag.
  95. =item B<-engine id>
  96. Specifying an engine (by its unique B<id> string) will cause B<ecparam>
  97. to attempt to obtain a functional reference to the specified engine,
  98. thus initialising it if needed. The engine will then be set as the default
  99. for all available algorithms.
  100. =back
  101. =head1 NOTES
  102. PEM format EC parameters use the header and footer lines:
  103. -----BEGIN EC PARAMETERS-----
  104. -----END EC PARAMETERS-----
  105. OpenSSL is currently not able to generate new groups and therefore
  106. B<ecparam> can only create EC parameters from known (named) curves.
  107. =head1 EXAMPLES
  108. To create EC parameters with the group 'prime192v1':
  109. openssl ecparam -out ec_param.pem -name prime192v1
  110. To create EC parameters with explicit parameters:
  111. openssl ecparam -out ec_param.pem -name prime192v1 -param_enc explicit
  112. To validate given EC parameters:
  113. openssl ecparam -in ec_param.pem -check
  114. To create EC parameters and a private key:
  115. openssl ecparam -out ec_key.pem -name prime192v1 -genkey
  116. To change the point encoding to 'compressed':
  117. openssl ecparam -in ec_in.pem -out ec_out.pem -conv_form compressed
  118. To print out the EC parameters to standard output:
  119. openssl ecparam -in ec_param.pem -noout -text
  120. =head1 SEE ALSO
  121. L<ec(1)>, L<dsaparam(1)>
  122. =head1 COPYRIGHT
  123. Copyright 2003-2018 The OpenSSL Project Authors. All Rights Reserved.
  124. Licensed under the Apache License 2.0 (the "License"). You may not use
  125. this file except in compliance with the License. You can obtain a copy
  126. in the file LICENSE in the source distribution or at
  127. L<https://www.openssl.org/source/license.html>.
  128. =cut