1IPSEC_RSASIGKEY(8)            Executable programs           IPSEC_RSASIGKEY(8)
2
3
4

NAME

6       ipsec_rsasigkey - generate RSA signature key
7

SYNOPSIS

9       ipsec rsasigkey [--verbose] [--seeddev device] [--seed numbits]
10             [--nssdir nssdir] [--password nsspassword] [--hostname hostname]
11             [nbits]
12

DESCRIPTION

14       rsasigkey generates an RSA public/private key pair, suitable for
15       digital signatures, of (exactly) nbits bits (that is, two primes each
16       of exactly nbits/2 bits, and related numbers) and emits it on standard
17       output as ASCII (mostly hex) data.  nbits must be a multiple of 16.
18
19       The public exponent is forced to the value 3, which has important speed
20       advantages for signature checking. Beware that the resulting keys have
21       known weaknesses as encryption keys and should not be used for that
22       purpose.
23
24       The --verbose option makes rsasigkey give a running commentary on
25       standard error. By default, it works in silence until it is ready to
26       generate output.
27
28       The --seeddev option specifies a source for random bits used to seed
29       the crypto library's RNG. The default is /dev/random (see random(4)).
30       FreeS/WAN and Openswan without NSS support used this option to specify
31       the random source used to directly create keys. Libreswan only uses it
32       to seed the NSS crypto libraries RNG. Under Linux with hardware random
33       support, special devices might show up as /dev/*rng* devices. However,
34       these should never be accessed directly using this option, as hardware
35       failures could lead to extremely non-random values (streams of zeroes
36       have been observed in the wild)
37
38       The --seedbits option specifies how many seed bits are pulled from the
39       random device to seed the NSS PRNG. The default of 480bit comes from
40       FIPS requirements. Seed bits are rounded up to a multiple of 8.
41
42       The use of a different random device or a reduction of seedbits from
43       the default value is prevented when the system is running in FIPS mode.
44
45       The --nssdir option specifies the directory to use for the nss
46       database. This is the directory where the NSS certificate, key and
47       security modules databases reside. The default value is
48       /var/lib/ipsec/nss.
49
50       The --password option specifies the nss cryptographic module
51       authentication password if the NSS module has been configured to
52       require it. A password is required by hardware tokens and also by the
53       internal software token module when configured to run in FIPS mode. If
54       the argument is /etc/ipsec.d/nsspassword, the password comes from that
55       file; otherwise argument is the password.
56
57       The US patent on the RSA algorithm expired 20 Sept 2000.
58

EXAMPLES

60       ipsec rsasigkey --verbose 4096
61           generates a 4096-bit signature key and stores this key in the NSS
62           database. The public key can then be extracted and edited into the
63           ipsec.conf (see ipsec_showhostkey(8)).
64

FILES

66       /dev/random, /dev/urandom
67

SEE ALSO

69       random(4), rngd(8), ipsec_showhostkey(8), Applied Cryptography, 2nd.
70       ed., by Bruce Schneier, Wiley 1996, RFCs 2537, 2313, GNU MP, the GNU
71       multiple precision arithmetic library, edition 2.0.2, by Torbj Granlund
72

HISTORY

74       Originally written for the Linux FreeS/WAN project
75       <https://www.freeswan.org> by Henry Spencer. Updated for the Libreswan
76       Project by Paul Wouters.
77
78       The --round and --noopt options were obsoleted as these were only used
79       with the old non-library crypto code
80
81       The --random device is only used for seeding the crypto library, not
82       for direct random to generate keys
83

BUGS

85       There is an internal limit on nbits, currently 20000.
86
87       rsasigkey's run time is difficult to predict, since /dev/random output
88       can be arbitrarily delayed if the system's entropy pool is low on
89       randomness, and the time taken by the search for primes is also
90       somewhat unpredictable. Specifically, embedded systems and most virtual
91       machines are low on entropy. In such a situation, consider generating
92       the RSA key on another machine, and copying ipsec.secrets and the
93       /var/lib/ipsec/nss directory tree to the embedded platform. Note that
94       NSS embeds the full path in the DB files, so the path on proxy machine
95       must be identical to the path on the destination machine.
96

AUTHOR

98       Paul Wouters
99           placeholder to suppress warning
100
101
102
103libreswan                         08/26/2021                IPSEC_RSASIGKEY(8)
Impressum