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