IPSEC_ECDSASIGKEY(8)
NAME π
okay so this is the IPSEC_ECDSASIGKEY(8) manual β the ipsec_ecdsasigkey page from the Executable programs corner β and itβs lowkey iconic for one job: generate ECDSA signature key β¨ slay.
SYNOPSIS π
ipsec ecdsasigkey [--verbose] [--seeddev device] [--seed numbits]
[--nssdir nssdir] [--password nsspassword] [--hostname hostname]
[curvename]
DESCRIPTION π¦
ecdsasigkey generates an ECDSA public/private key pair, suitable for digital signatures, on a named curve specified with curvename. Currently it only accepts secp256r1, secp384r1, and secp521r1. No cap, thatβs the guest list π
The public exponent is forced to the value 3, which has important speed advantages for signature checking. Beware that the resulting keys have known weaknesses as encryption keys and should not be used for that purpose. Like, not even a little bit, bestie π
Now the flags, one by one, because we keep every detail in this group chat:
--verboseβ makesecdsasigkeygive a running commentary on standard error. By default, it works in silence until it is ready to generate output. Quiet main character energy, honestly π€«--seeddev deviceβ specifies a source for random bits used to seed the crypto libraryβs RNG. The default is/dev/random(seerandom(4)). FreeS/WAN and Openswan without NSS support used this option to specify the random source used to directly create keys. Libreswan only uses it to seed the NSS crypto libraries RNG. Under Linux with hardware random support, special devices might show up as/dev/*rng*devices. However, these should never be accessed directly using this option, as hardware failures could lead to extremely non-random values (streams of zeroes have been observed in the wild). Hard no π--seed numbitsβ this spelling appears in the SYNOPSIS, bestie; the DESCRIPTION calls it--seedbitsbelow π--seedbitsβ specifies how many seed bits are pulled from the random device to seed the NSS PRNG. The default of480bitcomes from FIPS requirements. Seed bits are rounded up to a multiple of8. The use of a different random device or a reduction ofseedbitsfrom the default value is prevented when the system is running in FIPS mode.--nssdir nssdirβ specifies the directory to use for the nss database. This is the directory where the NSS certificate, key and security modules databases reside. The default value is/var/lib/ipsec/nss.--password nsspasswordβ specifies the nss cryptographic module authentication password if the NSS module has been configured to require it. A password is required by hardware tokens and also by the internal software token module when configured to run in FIPS mode. If the argument is/etc/ipsec.d/nsspassword, the password comes from that file; otherwise argument is the password.--hostname hostnameβ it shows up in the SYNOPSIS; the page doesnβt give extra details about it. Thatβs all the tea π΅
EXAMPLES π
ipsec ecdsasigkey --verbose 4096
generates a 4096-bit signature key and stores this key in the NSS database. The public key can then be extracted and edited into the ipsec.conf (see ipsec_showhostkey(8)). Cute, chaotic, canonical π
FILES π
/dev/random/dev/urandom
SEE ALSO π
random(4)rngd(8)ipsec_showhostkey(8)- Applied Cryptography, 2nd. ed., by Bruce Schneier, Wiley 1996
- RFCs 2537, 2313
- GNU MP, the GNU multiple precision arithmetic library, edition 2.0.2, by Torbj Granlund
HISTORY π§
Originally written for the Linux FreeS/WAN project <https://www.freeswan.org> by Henry Spencer. Updated for the Libreswan Project by Paul Wouters.
The --round and --noopt options were obsoleted as these were only used with the old non-library crypto code.
The --random device is only used for seeding the crypto library, not for direct random to generate keys.
BUGS π
ecdsasigkeyβs run time is difficult to predict, since /dev/random output can be arbitrarily delayed if the systemβs entropy pool is low on randomness, and the time taken by the search for primes is also somewhat unpredictable. Specifically, embedded systems and most virtual machines are low on entropy. In such a situation, consider generating the ECDSA key on another machine, and copying ipsec.secrets and the /var/lib/ipsec/nss directory tree to the embedded platform. Note that NSS embeds the full path in the DB files, so the path on proxy machine must be identical to the path on the destination machine. Itβs giving βentropy said noβ and we respect it π«Ά
AUTHOR π
- Paul Wouters β placeholder to suppress warning π
peace out, bestie β this manual moment comes from libreswan, dated 10/19/2026 πβ¨
π¦ where this page comes from
- centos-stream 9: libreswan 4.15-11.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms