Net::DN...:DNSKEY(3)
π Net::DNS::RR::DNSKEY β the manual page, bestie edition π
okay so this is Net::DNS::RR::DNSKEY(3), from the User Contributed Perl Documentation corner of the world, and it's literally the whole vibe for DNSSEC Key resource records. buckle up, we're getting cryptographic β¨
πΈ NAME πΈ
Net::DNS::RR::DNSKEY β the DNS DNSKEY resource record. that's it, that's the whole name. iconic brevity.
π¦ SYNOPSIS π¦
use Net::DNS;
$rr = Net::DNS::RR->new('name DNSKEY flags protocol algorithm publickey');
look at her go. one line, one new, one fully-formed DNSKEY record. main character energy fr fr π
β¨ DESCRIPTION β¨
so this is the class for DNSSEC Key β aka DNSKEY β resource records. that's the whole description, and honestly? it ate. no notes.
π METHODS π
okay so here's the tea: the methods you get are the ones inherited from the base class, plus the type-specific ones defined right here in this package. best of both worlds, no cap.
β οΈ real talk though: using undocumented package features or poking directly at internal data structures is discouraged. like, the docs literally say it could result in program termination or other unpredictable behaviour. so... don't. π that's your warning, don't come for me.
π flags
$flags = $rr->flags;
$rr->flags( $flags );
an unsigned 16-bit number that represents the Boolean flags. sixteen whole bits of yes/no energy. π«Ά
β zone
$rr->zone(1);
if ( $rr->zone ) {
...
}
the Boolean ZONE flag. sets it, checks it, slays it.
π revoke
$rr->revoke(1);
if ( $rr->revoke ) {
...
}
the Boolean REVOKE flag. lowkey dramatic name, but it's just a flag bestie.
π§ adt
$rr->adt(1);
if ( $rr->adt ) {
...
}
the Authoritative Delegation Types (ADT) flag. yes the acronym is spelled out, i'm not gatekeeping.
π sep
$rr->sep(1);
if ( $rr->sep ) {
...
}
the Boolean Secure Entry Point (SEP) flag. secure entry point sounds like a VIP entrance and honestly it kind of is. πͺβ¨
π₯ protocol
$protocol = $rr->protocol;
$rr->protocol( $protocol );
the 8-bit protocol number. and listen β this field MUST have value 3. not 4, not 2, not "whatever feels right". 3. that's the rule. periodt.
π algorithm
$algorithm = $rr->algorithm;
$rr->algorithm( $algorithm );
the 8-bit algorithm number, and it describes the public key algorithm. that's the whole job. π«‘
also!! algorithm() can be invoked as a class method or a simple function to do mnemonic and numeric code translation. so it's multifunctional, we love a versatile icon.
π publickey / key
$key = $rr->key;
$rr->key( $key );
the Base64 representation of the public key material. two names, one method, zero drama. π
π§΅ keybin
$keybin = $rr->keybin;
$rr->keybin( $keybin );
an opaque octet string representing the public key material. "opaque" meaning don't look at it too hard, it's doing its thing. π«Ά
π privatekeyname
$privatekeyname = $rr->privatekeyname;
returns the name of the privatekey exactly as it would be generated by the BIND dnssec-keygen program. and the format of that name is:
K<fqdn>+<algorithm>+<keyid>.private
ok so <fqdn>, <algorithm>, <keyid>, then .private. copy that format, don't freestyle it. β¨
β signame
$signame = $rr->signame;
returns the canonical signer name of the privatekey. short, sweet, canonical. π
π¦ keylength
returns the length β in bits β of the modulus calculated from the key text. bits, not bytes, don't @ me.
π keytag
print "keytag = ", $rr->keytag, "\n";
returns the 16-bit numerical key tag of the key, and the source of truth for that is RFC2535 4.1.6. π
π COPYRIGHT π
Copyright (c)2003-2005 RIPE NCC. Author Olaf M. Kolkman
All rights reserved.
Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.
πΈ LICENSE πΈ
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
π«Ά yes bestie, that's the whole license, verbatim. free to use, just keep the notices and don't use the author's name to sell stuff. iykyk.
π§ SEE ALSO π§
perlNet::DNSNet::DNS::RRRFC4034(2)βhttps://iana.org/go/rfc4034#section-2- DNSKEY Flags β
https://www.iana.org/assignments/dnskey-flags - Algorithm Numbers β
https://iana.org/assignments/dns-sec-alg-numbers
like, go read them. they're the source material and they deserve respect. π
and that's the page!! this glorious little doc is perl v5.42.0, dated 2026-09-02, and it lives at Net::DN...:DNSKEY(3) in the User Contributed Perl Documentation section. mwah, go forth and DNSSEC responsibly ππβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Net-DNS 1.570.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms