Make pkcs12 and smime applications seed random number
[openssl.git] / doc / apps / genrsa.pod
1 =pod
2
3 =head1 NAME
4
5 genrsa - generate an RSA private key
6
7 =head1 SYNOPSIS
8
9 B<openssl> B<genrsa>
10 [B<-out filename>]
11 [B<-passout password>]
12 [B<-envpassout var>]
13 [B<-des>]
14 [B<-des3>]
15 [B<-idea>]
16 [B<-f4>]
17 [B<-3>]
18 [B<-rand file(s)>]
19 [B<numbits>]
20
21 =head1 DESCRIPTION
22
23 The B<genrsa> command generates an RSA private key.
24
25 =head1 OPTIONS
26
27 =over 4
28
29 =item B<-out filename>
30
31 the output filename. If this argument is not specified then standard output is
32 used.  
33
34 =item B<-passout password>
35
36 the output file password. Since certain utilities like "ps" make the command line
37 visible this option should be used with caution.
38
39 =item B<-envpassout var>
40
41 read the output file password from the environment variable B<var>.
42
43 =item B<-des|-des3|-idea>
44
45 These options encrypt the private key with the DES, triple DES, or the 
46 IDEA ciphers respectively before outputting it. If none of these options is
47 specified no encryption is used. If encryption is used a pass phrase is prompted
48 for if it is not supplied via the B<-passout> or B<-envpassout> arguments.
49
50 =item B<-F4|-3>
51
52 the public exponent to use, either 65537 or 3. The default is 65537.
53
54 =item B<-rand file(s)>
55
56 a file or files containing random data used to seed the random number
57 generator. Multiple files can be specified separated by a OS-dependent
58 character.  For MS-Windows, the separator is B<;>.  For OpenVMS, it's
59 B<,>.  For all others, it's B<:>.
60
61 =item B<numbits>
62
63 the size of the private key to generate in bits. This must be the last option
64 specified. The default is 512.
65
66 =back
67
68 =head1 NOTES
69
70 RSA private key generation essentially involves the generation of two prime
71 numbers. When generating a private key various symbols will be output to
72 indicate the progress of the generation. A B<.> represents each number tested.
73 A B<+> means a number has passed a single primality test. A newline means that
74 the number has passed all the prime tests (currently set to 5 single tests).
75
76 Because key generation is a random process the time taken to generate a key
77 may vary somewhat.
78
79 =head1 BUGS
80
81 A quirk of the prime generation algorithm is that it cannot generate small
82 primes. Therefore the number of bits should not be less that 64. For typical
83 private keys this will not matter because for security reasons they will
84 be much larger (typically 1024 bits).
85
86 =head1 SEE ALSO
87
88 L<gendsa(1)|gendsa(1)>