ecparam.pod 5.0 KB

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