openssl-dsa.pod 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. =pod
  2. =head1 NAME
  3. openssl-dsa - DSA key processing
  4. =head1 SYNOPSIS
  5. B<openssl> B<dsa>
  6. [B<-help>]
  7. [B<-inform> B<DER>|B<PEM>]
  8. [B<-outform> B<DER>|B<PEM>]
  9. [B<-in> I<filename>]
  10. [B<-passin> I<arg>]
  11. [B<-out> I<filename>]
  12. [B<-passout> I<arg>]
  13. [B<-aes128>]
  14. [B<-aes192>]
  15. [B<-aes256>]
  16. [B<-aria128>]
  17. [B<-aria192>]
  18. [B<-aria256>]
  19. [B<-camellia128>]
  20. [B<-camellia192>]
  21. [B<-camellia256>]
  22. [B<-des>]
  23. [B<-des3>]
  24. [B<-idea>]
  25. [B<-text>]
  26. [B<-noout>]
  27. [B<-modulus>]
  28. [B<-pubin>]
  29. [B<-pubout>]
  30. [B<-engine> I<id>]
  31. =for openssl ifdef pvk-string pvk-weak pvk-none engine
  32. =head1 DESCRIPTION
  33. This command processes DSA keys. They can be converted between various
  34. forms and their components printed out. B<Note> This command uses the
  35. traditional SSLeay compatible format for private key encryption: newer
  36. applications should use the more secure PKCS#8 format using the B<pkcs8>
  37. =head1 OPTIONS
  38. =over 4
  39. =item B<-help>
  40. Print out a usage message.
  41. =item B<-inform> B<DER>|B<PEM>, B<-outform> B<DER>|B<PEM>
  42. The input and formats; the default is B<PEM>.
  43. See L<openssl(1)/Format Options> for details.
  44. Private keys are a sequence of B<ASN.1 INTEGERS>: the version (zero), B<p>,
  45. B<q>, B<g>, and the public and and private key components. Public keys
  46. are a B<SubjectPublicKeyInfo> structure with the B<DSA> type.
  47. The B<PEM> format also accepts PKCS#8 data.
  48. =item B<-in> I<filename>
  49. This specifies the input filename to read a key from or standard input if this
  50. option is not specified. If the key is encrypted a pass phrase will be
  51. prompted for.
  52. =item B<-out> I<filename>
  53. This specifies the output filename to write a key to or standard output by
  54. is not specified. If any encryption options are set then a pass phrase will be
  55. prompted for. The output filename should B<not> be the same as the input
  56. filename.
  57. =item B<-passin> I<arg>, B<-passout> I<arg>
  58. The password source for the input and output file.
  59. For more information about the format of B<arg>
  60. see L<openssl(1)/Pass Phrase Options>.
  61. =item B<-aes128>, B<-aes192>, B<-aes256>, B<-aria128>, B<-aria192>, B<-aria256>, B<-camellia128>, B<-camellia192>, B<-camellia256>, B<-des>, B<-des3>, B<-idea>
  62. These options encrypt the private key with the specified
  63. cipher before outputting it. A pass phrase is prompted for.
  64. If none of these options is specified the key is written in plain text. This
  65. means that this command can be used to remove the pass phrase from a key
  66. by not giving any encryption option is given, or to add or change the pass
  67. phrase by setting them.
  68. These options can only be used with PEM format output files.
  69. =item B<-text>
  70. Prints out the public, private key components and parameters.
  71. =item B<-noout>
  72. This option prevents output of the encoded version of the key.
  73. =item B<-modulus>
  74. This option prints out the value of the public key component of the key.
  75. =item B<-pubin>
  76. By default, a private key is read from the input file. With this option a
  77. public key is read instead.
  78. =item B<-pubout>
  79. By default, a private key is output. With this option a public
  80. key will be output instead. This option is automatically set if the input is
  81. a public key.
  82. =item B<-engine> I<id>
  83. Specifying an engine (by its unique I<id> string) will cause L<openssl-dsa(1)>
  84. to attempt to obtain a functional reference to the specified engine,
  85. thus initialising it if needed. The engine will then be set as the default
  86. for all available algorithms.
  87. =back
  88. =head1 EXAMPLES
  89. To remove the pass phrase on a DSA private key:
  90. openssl dsa -in key.pem -out keyout.pem
  91. To encrypt a private key using triple DES:
  92. openssl dsa -in key.pem -des3 -out keyout.pem
  93. To convert a private key from PEM to DER format:
  94. openssl dsa -in key.pem -outform DER -out keyout.der
  95. To print out the components of a private key to standard output:
  96. openssl dsa -in key.pem -text -noout
  97. To just output the public part of a private key:
  98. openssl dsa -in key.pem -pubout -out pubkey.pem
  99. =head1 SEE ALSO
  100. L<openssl(1)>,
  101. L<openssl-dsaparam(1)>,
  102. L<openssl-gendsa(1)>,
  103. L<openssl-rsa(1)>,
  104. L<openssl-genrsa(1)>
  105. =head1 COPYRIGHT
  106. Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
  107. Licensed under the Apache License 2.0 (the "License"). You may not use
  108. this file except in compliance with the License. You can obtain a copy
  109. in the file LICENSE in the source distribution or at
  110. L<https://www.openssl.org/source/license.html>.
  111. =cut