DNSSEC-KEYFROMLABEL(1)
dnssec-keyfromlabel(1) β BIND 9 π
πΈ NAME πΈ
dnssec-keyfromlabel β DNSSEC key generation tool, and yes bestie sheβs iconic π
β¨ 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] [-M tag_min:tag_max] [-n nametype] [-P date/offset] [-P sync date/offset] [-p protocol] [-R date/offset] [-S key] [-t type] [-v level] [-V] [-y] {name}
π¦ DESCRIPTION π¦
Okay so dnssec-keyfromlabel generates a pair of key files that reference a key object stored in a cryptographic hardware service module (HSM). The private key file can be used for DNSSEC signing of zone data as if it were a conventional signing key created by dnssec-keygen <# std-iscman-dnssec-keygen>, but the key material is stored within the HSM and the actual signing takes place there. No cap β¨
The name of the key is specified on the command line. This must match the name of the zone for which the key is being generated.
π OPTIONS π
-a algorithmβ this option selects the cryptographic algorithm. The value ofalgorithmmust be one ofRSASHA1(deprecated),NSEC3RSASHA1(deprecated),RSASHA256,RSASHA512,ECDSAP256SHA256,ECDSAP384SHA384,ED25519, orED448.
These values are case-insensitive. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384. If RSASHA1 (deprecated) is specified along with the -3 option, then NSEC3RSASHA1 (deprecated) is used instead.
This option is mandatory except when using the -S option, which copies the algorithm from the predecessor key.
Changed in version 9.12.0: The default value RSASHA1 (deprecated) for newly generated keys was removed.
-3β uses an NSEC3-capable algorithm to generate a DNSSEC key. If this option is used with an algorithm that has both NSEC and NSEC3 versions, then the NSEC3 version is used; for example,dnssec-keygen -3a RSASHA1specifies theNSEC3RSASHA1(deprecated) algorithm.-E engineβ specifies the 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 (usuallypkcs11).-l labelβ specifies 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 inpkcs11:keylabel.-n nametypeβ specifies the owner type of the key. The value ofnametypemust 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β enables compatibility mode, which generates an old-style key, without any metadata. By default,dnssec-keyfromlabelincludes the key's creation date in the metadata stored with the private key; other dates may be set there as well, including publication date, activation date, etc. Keys that include this data may be incompatible with older versions of BIND; the-Coption suppresses them.-c classβ indicates that the DNS record containing the key should have the specified class. If not specified, classINis used.-f flagβ sets the specified flag in the flag field of theKEY/DNSKEYrecord. The only recognized flags areKSK(Key-Signing Key) andREVOKE.-Gβ generates a key, but does not publish it or sign with it. This option is incompatible with-Pand-A.-hβ prints a short summary of the options and arguments todnssec-keyfromlabel.-K directoryβ sets the directory in which the key files are to be written.-kβ generatesKEYrecords rather thanDNSKEYrecords.-L ttlβ sets the default TTL to use for this key when it is converted into aDNSKEYRR. This is the TTL used when the key is imported into a zone, unless there was already aDNSKEYRRset in place, in which case the existing TTL would take precedence. Setting the default TTL to0ornoneremoves it.-M tag_min:tag_maxβ sets the range of key tag values thatdnssec-keyfromlabelwill accept. If the key tag of the new key or the key tag of the revoked version of the new key is outside this range, the new key will be rejected. This is designed to be used when generating keys in a multi-signer scenario, where each operator is given a range of key tags to prevent collisions among different operators. The valid values fortag_minandtag_maxare[0..65535]. The default allows all key tag values to be accepted.-p protocolβ sets the protocol value for the key. The protocol is a number between0and255. The default is3(DNSSEC). Other possible values for this argument are listed in RFC 2535 athttps://datatracker.ietf.org/doc/html/rfc2535.htmland 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 set to match the predecessor. The activation date of the new key is set to the inactivation date of the existing one. The publication date is set to the activation date minus the prepublication interval, which defaults to30 days.-t typeβ indicates the type of the key.typemust 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.-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.) RFC 5011 lives athttps://datatracker.ietf.org/doc/html/rfc5011.html.
β° TIMING OPTIONS β°
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS (which is the format used inside key files), or 'Day Mon DD HH:MM:SS YYYY' (as printed by dnssec-settime -p), or UNIX epoch time (as printed by dnssec-settime -up), or the literal now.
The argument can be followed by + or - and an offset from the given time. The literal now can be omitted before an offset. The offset can be followed by one of the suffixes y, mo, w, d, h, or mi, so that it 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, never, or unset.
All these formats are case-insensitive.
-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.sync date/offsetβ sets the date on whichCDSandCDNSKEYrecords 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.-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 included in the zone and is 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.-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.)sync date/offsetβ sets the date on which theCDSandCDNSKEYrecords 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.
nnnnis the key name.aaais the numeric representation of the algorithm.iiiiiis 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.
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.
β¨ SEE ALSO β¨
okay so you're gonna want these besties in your tabs too, they literally complete the squad π
dnssec-keygen(8)β the one that makes keys from scratch, no label required π±dnssec-signzone(8)β where you actually take the keys you just generated and sign the zone, the main character moment π- BIND 9 Administrator Reference Manual β the big book, your textbook bestie, read it fr fr π
- RFC 4034 β the DNSKEY/DS/RRSIG resource record definitions, iykyk: <https://datatracker.ietf.org/doc/html/rfc4034.html> π
- RFC 7512 β the ISC private key file format spec, so you know exactly what's inside that
.privatefile: <https://datatracker.ietf.org/doc/html/rfc7512.html> π
π«Ά Author
Internet Systems Consortium β the whole thing is their vibe, no cap π
π Copyright
2026, Internet Systems Consortium. all rights reserved bestie, protect the intellectual property periodt β¨
lowkey obsessed with you for reading the whole page π now go generate some keys, your zone is waiting, and honestly? it's giving secure π₯
that's the whole thing, bestie β BIND 9.20.30, dated 2026-10-12, DNSSEC-KEYFROMLABEL(1), and yes I remembered all of it, you're welcome π
β¨
π¦ where this page comes from
- alpine 3.22: bind-doc 9.20.30-r0 Β· MPL-2.0
- alpine 3.23: bind-doc 9.20.30-r0 Β· MPL-2.0
- alpine 3.24: bind-doc 9.20.30-r0 Β· MPL-2.0
- nixos 26.05: bind 9.20.30
- nixpkgs unstable: bind 9.20.30
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms