DNSSEC-KEYFROMLABEL(8)
π dnssec-keyfromlabel β DNSSEC key generation tool π
okay bestie, so this whole page is about dnssec-keyfromlabel(8), and it lives in the BIND 9 family of manuals. Buckle up, it's giving "crypto hardware but make it fashion" π
β¨ SYNOPSIS β¨
dnssec-keyfromlabel {-l label} [-3] [-a algorithm] [-A date/offset] [-c
class] [-D date/offset] [-D sync date/offset] [-E engine] [-f flag] [-G]
[-I date/offset] [-i interval] [-k] [-K directory] [-L ttl] [-n
nametype] [-P date/offset] [-P sync date/offset] [-p protocol] [-R
date/offset] [-S key] [-t type] [-v level] [-V] [-y] {name}
πΈ DESCRIPTION πΈ
dnssec-keyfromlabel makes you a pair of key files that point at a key object chillin' inside a cryptographic hardware service module (HSM). The private key file works for DNSSEC signing of zone data exactly like a normal signing key made by dnssec-keygen β but listen, the actual key material never leaves the HSM and the actual signing happens in there. it's giving "the vault stays shut" πβ¨
The name of the key goes on the command line, and it must match the name of the zone you're generating the key for. no mixing, no matching, no chaos. π
π OPTIONS π
-a algorithmβ picks the cryptographic algorithm, bestie. The value of algorithm has to be one ofRSASHA1,NSEC3RSASHA1,RSASHA256,RSASHA512,ECDSAP256SHA256,ECDSAP384SHA384,ED25519, orED448.
These values are case-insensitive, slay. Sometimes abbreviations work too β like ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384. And if RSASHA1 shows up alongside the -3 option, then NSEC3RSASHA1 gets used instead.
This option is mandatory β except when you're using -S, which copies the algorithm from the predecessor key. π
Changed in version 9.12.0: the default value RSASHA1 for newly generated keys was removed. so don't come looking for it, it's gone. π
-3β uses an NSEC3-capable algorithm to generate a DNSSEC key. If you use this with an algorithm that has both NSEC and NSEC3 versions, the NSEC3 version wins β for example,dnssec-keygen -3a RSASHA1specifies theNSEC3RSASHA1algorithm. teamwork! π«Ά-E engineβ says which cryptographic hardware to use.
When BIND 9 is built with OpenSSL, this needs to be set to the OpenSSL engine identifier that drives the cryptographic accelerator or hardware service module (usually pkcs11). When BIND is built with native PKCS#11 cryptography (--enable-native-pkcs11), it defaults to the path of the PKCS#11 provider library specified via --with-pkcs11. iykyk π§
-l labelβ sets the label for a key pair in the crypto hardware.
When BIND 9 is built with OpenSSL-based PKCS#11 support, the label is an arbitrary string that identifies a particular key. It may be preceded by an optional OpenSSL engine name, followed by a colon, as in pkcs11:keylabel.
When BIND 9 is built with native PKCS#11 support, the label is a PKCS#11 URI string in the format pkcs11:keyword\ =value[;\ keyword\ =value;...]. Keywords include token, which identifies the HSM; object, which identifies the key; and pin-source, which identifies a file from which the HSM's PIN code can be obtained. The label is stored in the on-disk private file.
If the label contains a pin-source field, tools using the generated key files are able to use the HSM for signing and other operations without any need for an operator to manually enter a PIN.
Note: making the HSM's PIN accessible in this manner may reduce the security advantage of using an HSM; use caution with this feature. bestie I'm serious, be careful with this one ππ
-n nametypeβ sets the owner type of the key. The value of nametype must either beZONE(for a DNSSEC zone key (KEY/DNSKEY)),HOSTorENTITY(for a key associated with a host (KEY)),USER(for a key associated with a user (KEY)), orOTHER(DNSKEY). These values are case-insensitive. πΈ-Cβ turns on compatibility mode, which generates an old-style key with no metadata at all. By defaultdnssec-keyfromlabelputs the key's creation date in the metadata stored with the private key, and other dates may be set there too β publication date, activation date, etc. Keys that include this data may be incompatible with older versions of BIND, and this option suppresses them. vintage era activated π-c classβ says the DNS record containing the key should have the specified class. If you don't specify it, classINis used. default behavior queen π-f flagβ sets the specified flag in the flag field of the KEY/DNSKEY record. The only recognized flags areKSK(Key-Signing Key) andREVOKE. those are the only two, don't try anything fancy π-Gβ generates a key, but does not publish it or sign with it. This option is incompatible with-Pand-A. pick a lane bestie β οΈ-hβ prints a short summary of the options and arguments todnssec-keyfromlabel. help me help you π«Ά-K directoryβ sets the directory where the key files are gonna be written. π-kβ generates KEY records rather than DNSKEY records. little switch, big vibe.-L ttlβ sets the default TTL to use for this key when it gets converted into a DNSKEY RR. This is the TTL used when the key is imported into a zone β unless there was already a DNSKEY RRset in place, in which case the existing TTL takes precedence. Setting the default TTL to0ornoneremoves it. β¨-p protocolβ sets the protocol value for the key. Protocol is a number between0and255. The default is3(DNSSEC). Other possible values for this argument are listed in RFC 2535 and its successors. π-S keyβ generates a key as an explicit successor to an existing key. The name, algorithm, size, and type of the key are all set to match the predecessor. The activation date of the new key is set to the inactivation date of the existing one, and the publication date is set to the activation date minus the prepublication interval, which defaults to 30 days. it's giving "passing the crown" πβ¨-t typeβ indicates the type of the key. type must be one ofAUTHCONF,NOAUTHCONF,NOAUTH, orNOCONF. The default isAUTHCONF.AUTHrefers to the ability to authenticate data, andCONFto the ability to encrypt data. π-v levelβ sets the debugging level. more digits, more lore π-Vβ prints version information. π-yβ allows DNSSEC key files to be generated even if the key ID would collide with that of an existing key, in the event of either key being revoked.
(This is only safe to enable if RFC 5011 trust anchor maintenance is not used with either of the keys involved.) like, actually only then. don't be reckless π
β° TIMING OPTIONS β°
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the argument begins with a + or -, it's interpreted as an offset from the present time. For convenience, if such an offset is followed by one of the suffixes y, mo, w, d, h, or mi, then the offset is computed in years (defined as 365 24-hour days, ignoring leap years), months (defined as 30 24-hour days), weeks, days, hours, or minutes, respectively. Without a suffix, the offset is computed in seconds. To explicitly prevent a date from being set, use none or never. time math, but make it cute π°οΈπ
-P date/offsetβ sets the date on which a key is to be published to the zone. After that date, the key is included in the zone but is not used to sign it. If not set, and if the-Goption has not been used, the default is the current date. π-P sync date/offsetβ sets the date on which CDS and CDNSKEY records that match this key are to be published to the zone. π¦-A date/offsetβ sets the date on which the key is to be activated. After that date, the key is included in the zone and used to sign it. If not set, and if the-Goption has not been used, the default is the current date. main character activation arc β¨-R date/offsetβ sets the date on which the key is to be revoked. After that date, the key is flagged as revoked. It is still included in the zone and still used to sign it. π©-I date/offsetβ sets the date on which the key is to be retired. After that date, the key is still included in the zone, but it is not used to sign it. retirement era π-D date/offsetβ sets the date on which the key is to be deleted. After that date, the key is no longer included in the zone. (However, it may remain in the key repository.) gone but not forgotten π-D sync date/offsetβ sets the date on which the CDS and CDNSKEY records that match this key are to be deleted. ποΈ-i intervalβ sets the prepublication interval for a key. If set, then the publication and activation dates must be separated by at least this much time. If the activation date is specified but the publication date is not, the publication date defaults to this much time before the activation date; conversely, if the publication date is specified but not the activation date, activation is set to this much time after publication.
If the key is being created as an explicit successor to another key, then the default prepublication interval is 30 days; otherwise it is zero.
As with date offsets, if the argument is followed by one of the suffixes y, mo, w, d, h, or mi, the interval is measured in years, months, weeks, days, hours, or minutes, respectively. Without a suffix, the interval is measured in seconds. β³
π GENERATED KEY FILES π
When dnssec-keyfromlabel completes successfully, it prints a string of the form Knnnn.+aaa+iiiii to the standard output. This is an identification string for the key files it has generated. she announces herself π
- nnnn is the key name.
- aaa is the numeric representation of the algorithm.
- iiiii is the key identifier (or footprint).
dnssec-keyfromlabel creates two files, with names based on the printed string. Knnnn.+aaa+iiiii.key contains the public key, and Knnnn.+aaa+iiiii.private contains the private key. a duo, a dynamic, an iconic pairing π«Ά
The .key file contains a DNS KEY record that can be inserted into a zone file (directly or with an $INCLUDE statement). β¨
The .private file contains algorithm-specific fields. For obvious security reasons, this file does not have general read permission. ngl, keep it that way π
π SEE ALSO π
dnssec-keygen(8), dnssec-signzone(8), BIND 9 Administrator Reference Manual, RFC 4034, RFC 7512. go read, bestie, I believe in you ππ
π AUTHOR π
Internet Systems Consortium
β COPYRIGHT β
2024, Internet Systems Consortium
okay that's the whole thing!! π
this was BIND 9's dnssec-keyfromlabel(8), version 9.16.50-RH, all dated 2024 β and genuinely, you ate that. go generate some keys, icon. π¦β¨π
π¦ where this page comes from
- centos-stream 9: bind-dnssec-doc 32:9.16.50-13.el9 Β· MPLv2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms