genrsa.pod 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. =pod
  2. =head1 NAME
  3. genrsa - generate an RSA private key
  4. =head1 SYNOPSIS
  5. B<openssl> B<genrsa>
  6. [B<-out filename>]
  7. [B<-passout arg>]
  8. [B<-aes128>]
  9. [B<-aes128>]
  10. [B<-aes192>]
  11. [B<-aes256>]
  12. [B<-camellia128>]
  13. [B<-camellia192>]
  14. [B<-camellia256>]
  15. [B<-aes192>]
  16. [B<-aes256>]
  17. [B<-camellia128>]
  18. [B<-camellia192>]
  19. [B<-camellia256>]
  20. [B<-des>]
  21. [B<-des3>]
  22. [B<-idea>]
  23. [B<-f4>]
  24. [B<-3>]
  25. [B<-rand file(s)>]
  26. [B<-engine id>]
  27. [B<numbits>]
  28. =head1 DESCRIPTION
  29. The B<genrsa> command generates an RSA private key.
  30. =head1 OPTIONS
  31. =over 4
  32. =item B<-out filename>
  33. the output filename. If this argument is not specified then standard output is
  34. used.
  35. =item B<-passout arg>
  36. the output file password source. For more information about the format of B<arg>
  37. see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>.
  38. =item B<-aes128|-aes192|-aes256|-camellia128|-camellia192|-camellia256|-des|-des3|-idea>
  39. These options encrypt the private key with specified
  40. cipher before outputting it. If none of these options is
  41. specified no encryption is used. If encryption is used a pass phrase is prompted
  42. for if it is not supplied via the B<-passout> argument.
  43. =item B<-F4|-3>
  44. the public exponent to use, either 65537 or 3. The default is 65537.
  45. =item B<-rand file(s)>
  46. a file or files containing random data used to seed the random number
  47. generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>).
  48. Multiple files can be specified separated by a OS-dependent character.
  49. The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
  50. all others.
  51. =item B<-engine id>
  52. specifying an engine (by it's unique B<id> string) will cause B<req>
  53. to attempt to obtain a functional reference to the specified engine,
  54. thus initialising it if needed. The engine will then be set as the default
  55. for all available algorithms.
  56. =item B<numbits>
  57. the size of the private key to generate in bits. This must be the last option
  58. specified. The default is 512.
  59. =back
  60. =head1 NOTES
  61. RSA private key generation essentially involves the generation of two prime
  62. numbers. When generating a private key various symbols will be output to
  63. indicate the progress of the generation. A B<.> represents each number which
  64. has passed an initial sieve test, B<+> means a number has passed a single
  65. round of the Miller-Rabin primality test. A newline means that the number has
  66. passed all the prime tests (the actual number depends on the key size).
  67. Because key generation is a random process the time taken to generate a key
  68. may vary somewhat.
  69. =head1 BUGS
  70. A quirk of the prime generation algorithm is that it cannot generate small
  71. primes. Therefore the number of bits should not be less that 64. For typical
  72. private keys this will not matter because for security reasons they will
  73. be much larger (typically 1024 bits).
  74. =head1 SEE ALSO
  75. L<gendsa(1)|gendsa(1)>
  76. =cut