fqdn
if rrsig_labels > fqdn_labels
the RRSIG RR did not pass the necessary validation
checks and MUST NOT be used to authenticate this
RRset.
The canonical forms for names and RRsets are defined in [RFC4034].
NSEC RRsets at a delegation boundary require special processing.
There are two distinct NSEC RRsets associated with a signed delegated
name. One NSEC RRset resides in the parent zone, and specifies which
RRsets are present at the parent zone. The second NSEC RRset resides
at the child zone and identifies which RRsets are present at the apex
in the child zone. The parent NSEC RRset and child NSEC RRset can
always be distinguished as only a child NSEC RR will indicate that an
SOA RRset exists at the name. When reconstructing the original NSEC
RRset for the delegation from the parent zone, the NSEC RRs MUST NOT
be combined with NSEC RRs from the child zone. When reconstructing
the original NSEC RRset for the apex of the child zone, the NSEC RRs
MUST NOT be combined with NSEC RRs from the parent zone.
Note that each of the two NSEC RRsets at a delegation point has a
corresponding RRSIG RR with an owner name matching the delegated
name, and each of these RRSIG RRs is authoritative data associated
with the same zone that contains the corresponding NSEC RRset. If
necessary, a resolver can tell these RRSIG RRs apart by checking the
Signer’s Name field.
5.3.3. Checking the Signature
Once the resolver has validated the RRSIG RR as described in Section
5.3.1 and reconstructed the original signed data as described in
Section 5.3.2, the validator can attempt to use the cryptographic
signature to authenticate the signed data, and thus (finally!)
authenticate the RRset.
The Algorithm field in the RRSIG RR identifies the cryptographic
algorithm used to generate the signature. The signature itself is
contained in the Signature field of the RRSIG RDATA, and the public
key used to verify the signature is contained in the Public Key field
of the matching DNSKEY RR(s) (found in Section 5.3.1). [RFC4034]
provides a list of algorithm types and provides pointers to the
documents that define each algorithm’s use.
Note that it is possible for more than one DNSKEY RR to match the
conditions in Section 5.3.1. In this case, the validator can only
determine which DNSKEY RR is correct by trying each matching public
key until the validator either succeeds in validating the signature
or runs out of keys to try.
If the Labels field of the RRSIG RR is not equal to the number of
labels in the RRset’s fully qualified owner name, then the RRset is
either invalid or the result of wildcard expansion. The resolver
MUST verify that wildcard expansion was applied properly before
considering the RRset to be authentic. Section 5.3.4 describes how
to determine whether a wildcard was applied properly.
If other RRSIG RRs also cover this RRset, the local resolver security
policy determines whether the resolver also has to test these RRSIG
RRs and how to resolve conflicts if these RRSIG RRs lead to differing
results.
If the resolver accepts the RRset as authentic, the validator MUST
set the TTL of the RRSIG RR and each RR in the authenticated RRset to
a value no greater than the minimum of:
o the RRset’s TTL as received in the response;
o the RRSIG RR’s TTL as received in the response;
o the value in the RRSIG RR’s Original TTL field; and
o the difference of the RRSIG RR’s Signature Expiration time and the
current time.
5.3.4. Authenticating a Wildcard Expanded RRset Positive Response
If the number of labels in an RRset’s owner name is greater than the
Labels field of the covering RRSIG RR, then the RRset and its
covering RRSIG RR were created as a result of wildcard expansion.
Once the validator has verified the signature, as described in
Section 5.3, it must take additional steps to verify the non-
existence of an exact match or closer wildcard match for the query.
Section 5.4 discusses these steps.
Note that the response received by the resolver should include all
NSEC RRs needed to authenticate the response (see Section 3.1.3).
5.4. Authenticated Denial of Existence
A resolver can use authenticated NSEC RRs to prove that an RRset is
not present in a signed zone. Security-aware name servers should
automatically include any necessary NSEC RRs for signed zones in
their responses to security-aware resolvers.
Denial of existence is determined by the following rules:
o If the requested RR name matches the owner name of an
authenticated NSEC RR, then the NSEC RR’s type bit map field lists
all RR types present at that owner name, and a resolver can prove
that the requested RR type does not exist by checking for the RR
type in the bit map. If the number of labels in an authenticated
NSEC RR’s owner name equals the Labels field of the covering RRSIG
RR, then the existence of the NSEC RR proves that wildcard
expansion could not have been used to match the request.
o If the requested RR name would appear after an authenticated NSEC
RR’s owner name and before the name listed in that NSEC RR’s Next
Domain Name field according to the canonical DNS name order
defined in [RFC4034], then no RRsets with the requested name exist
in the zone. However, it is possible that a wildcard could be
used to match the requested RR owner name and type, so proving
that the requested RRset does not exist also requires proving that
no possible wildcard RRset exists that could have been used to
generate a positive response.
In addition, security-aware resolvers MUST authenticate the NSEC
RRsets that comprise the non-existence proof as described in Section
5.3.
To prove the non-existence of an RRset, the resolver must be able to
verify both that the queried RRset does not exist and that no
relevant wildcard RRset exists. Proving this may require more than
one NSEC RRset from the zone. If the complete set of necessary NSEC
RRsets is not present in a response (perhaps due to message
truncation), then a security-aware resolver MUST resend the query in
order to attempt to obtain the full collection of NSEC RRs necessary
to verify the non-existence of the requested RRset. As with all DNS
operations, however, the resolver MUST bound the work it puts into
answering any particular query.
Since a validated NSEC RR proves the existence of both itself and its
corresponding RRSIG RR, a validator MUST ignore the settings of the
NSEC and RRSIG bits in an NSEC RR.
5.5. Resolver Behavior When Signatures Do Not Validate
If for whatever reason none of the RRSIGs can be validated, the
response SHOULD be considered BAD. If the validation was being done
to service a recursive query, the name server MUST return RCODE 2 to
the originating client. However, it MUST return the full response if
and only if the original query had the CD bit set. Also see Section
4.7 on caching responses that do not validate.
5.6. Authentication Example
Appendix C shows an example of the authentication process.
6. IANA Considerations
[RFC4034] contains a review of the IANA considerations introduced by
DNSSEC. The following are additional IANA considerations discussed
in this document:
[RFC2535] reserved the CD and AD bits in the message header. The
meaning of the AD bit was redefined in [RFC3655], and the meaning of
both the CD and AD bit are restated in this document. No new bits in
the DNS message header are defined in this document.
[RFC2671] introduced EDNS, and [RFC3225] reserved the DNSSEC OK bit
and defined its use. The use is restated but not altered in this
document.
7. Security Considerations
This document describes how the DNS security extensions use public
key cryptography to sign and authenticate DNS resource record sets.
Please see [RFC4033] for terminology and general security
considerations related to DNSSEC; see [RFC4034] for considerations
specific to the DNSSEC resource record types.
An active attacker who can set the CD bit in a DNS query message or
the AD bit in a DNS response message can use these bits to defeat the
protection that DNSSEC attempts to provide to security-oblivious
recursive-mode resolvers. For this reason, use of these control bits
by a security-aware recursive-mode resolver requires a secure
channel. See Sections 3.2.2 and 4.9 for further discussion.
The protocol described in this document attempts to extend the
benefits of DNSSEC to security-oblivious stub resolvers. However, as
recovery from validation failures is likely to be specific to
particular applications, the facilities that DNSSEC provides for stub
resolvers may prove inadequate. Operators of security-aware
recursive name servers will have to pay close attention to the
behavior of the applications that use their services when choosing a
local validation policy; failure to do so could easily result in the
recursive name server accidentally denying service to the clients it
is intended to support.
8. Acknowledgements
This document was created from the input and ideas of the members of
the DNS Extensions Working Group and working group mailing list. The
editors would like to express their thanks for the comments and
suggestions received during the revision of these security extension
specifications. Although explicitly listing everyone who has
contributed during the decade in which DNSSEC has been under
development would be impossible, [RFC4033] includes a list of some of
the participants who were kind enough to comment on these documents.
9. References
9.1. Normative References
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities",
STD 13, RFC 1034, November 1987.
[RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, November 1987.
[RFC1122] Braden, R., "Requirements for Internet Hosts -
Communication Layers", STD 3, RFC 1122, October 1989.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
Specification", RFC 2181, July 1997.
[RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", RFC 2460, December 1998.
[RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", RFC
2671, August 1999.
[RFC2672] Crawford, M., "Non-Terminal DNS Name Redirection", RFC
2672, August 1999.
[RFC3225] Conrad, D., "Indicating Resolver Support of DNSSEC", RFC
3225, December 2001.
[RFC3226] Gudmundsson, O., "DNSSEC and IPv6 A6 aware server/resolver
message size requirements", RFC 3226, December 2001.
[RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "DNS Security Introduction and Requirements", RFC
4033, March 2005.
[RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Resource Records for DNS Security Extensions", RFC
4034, March 2005.
9.2. Informative References
[RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS
NCACHE)", RFC 2308, March 1998.
[RFC2535] Eastlake 3rd, D., "Domain Name System Security
Extensions", RFC 2535, March 1999.
[RFC3007] Wellington, B., "Secure Domain Name System (DNS) Dynamic
Update", RFC 3007, November 2000.
[RFC3655] Wellington, B. and O. Gudmundsson, "Redefinition of DNS
Authenticated Data (AD) bit", RFC 3655, November 2003.
Appendix A. Signed Zone Example
The following example shows a (small) complete signed zone.
example. 3600 IN SOA ns1.example. bugs.x.w.example. (
1081539377
3600
300
3600000
3600
)
3600 RRSIG SOA 5 1 3600 20040509183619 (
20040409183619 38519 example.
ONx0k36rcjaxYtcNgq6iQnpNV5+drqYAsC9h
7TSJaHCqbhE67Sr6aH2xDUGcqQWu/n0UVzrF
vkgO9ebarZ0GWDKcuwlM6eNB5SiX2K74l5LW
DA7S/Un/IbtDq4Ay8NMNLQI7Dw7n4p8/rjkB
jV7j86HyQgM5e7+miRAz8V01b0I= )
3600 NS ns1.example.
3600 NS ns2.example.
3600 RRSIG NS 5 1 3600 20040509183619 (
20040409183619 38519 example.
gl13F00f2U0R+SWiXXLHwsMY+qStYy5k6zfd
EuivWc+wd1fmbNCyql0Tk7lHTX6UOxc8AgNf
4ISFve8XqF4q+o9qlnqIzmppU3LiNeKT4FZ8
RO5urFOvoMRTbQxW3U0hXWuggE4g3ZpsHv48
0HjMeRaZB/FRPGfJPajngcq6Kwg= )
3600 MX 1 xx.example.
3600 RRSIG MX 5 1 3600 20040509183619 (
20040409183619 38519 example.
HyDHYVT5KHSZ7HtO/vypumPmSZQrcOP3tzWB
2qaKkHVPfau/DgLgS/IKENkYOGL95G4N+NzE
VyNU8dcTOckT+ChPcGeVjguQ7a3Ao9Z/ZkUO
6gmmUW4b89rz1PUxW4jzUxj66PTwoVtUU/iM
W6OISukd1EQt7a0kygkg+PEDxdI= )
3600 NSEC a.example. NS SOA MX RRSIG NSEC DNSKEY
3600 RRSIG NSEC 5 1 3600 20040509183619 (
20040409183619 38519 example.
O0k558jHhyrC97ISHnislm4kLMW48C7U7cBm
FTfhke5iVqNRVTB1STLMpgpbDIC9hcryoO0V
Z9ME5xPzUEhbvGnHd5sfzgFVeGxr5Nyyq4tW
SDBgIBiLQUv1ivy29vhXy7WgR62dPrZ0PWvm
jfFJ5arXf4nPxp/kEowGgBRzY/U= )
3600 DNSKEY 256 3 5 (
AQOy1bZVvpPqhg4j7EJoM9rI3ZmyEx2OzDBV
rZy/lvI5CQePxXHZS4i8dANH4DX3tbHol61e
k8EFMcsGXxKciJFHyhl94C+NwILQdzsUlSFo
vBZsyl/NX6yEbtw/xN9ZNcrbYvgjjZ/UVPZI
ySFNsgEYvh0z2542lzMKR4Dh8uZffQ==
)
3600 DNSKEY 257 3 5 (
AQOeX7+baTmvpVHb2CcLnL1dMRWbuscRvHXl
LnXwDzvqp4tZVKp1sZMepFb8MvxhhW3y/0QZ
syCjczGJ1qk8vJe52iOhInKROVLRwxGpMfzP
RLMlGybr51bOV/1se0ODacj3DomyB4QB5gKT
Yot/K9alk5/j8vfd4jWCWD+E1Sze0Q==
)
3600 RRSIG DNSKEY 5 1 3600 20040509183619 (
20040409183619 9465 example.
ZxgauAuIj+k1YoVEOSlZfx41fcmKzTFHoweZ
xYnz99JVQZJ33wFS0Q0jcP7VXKkaElXk9nYJ
XevO/7nAbo88iWsMkSpSR6jWzYYKwfrBI/L9
hjYmyVO9m6FjQ7uwM4dCP/bIuV/DKqOAK9NY
NC3AHfvCV1Tp4VKDqxqG7R5tTVM= )
3600 RRSIG DNSKEY 5 1 3600 20040509183619 (
20040409183619 38519 example.
eGL0s90glUqcOmloo/2y+bSzyEfKVOQViD9Z
DNhLz/Yn9CQZlDVRJffACQDAUhXpU/oP34ri
bKBpysRXosczFrKqS5Oa0bzMOfXCXup9qHAp
eFIku28Vqfr8Nt7cigZLxjK+u0Ws/4lIRjKk
7z5OXogYVaFzHKillDt3HRxHIZM= )
a.example. 3600 IN NS ns1.a.example.
3600 IN NS ns2.a.example.
3600 DS 57855 5 1 (
B6DCD485719ADCA18E5F3D48A2331627FDD3
636B )
3600 RRSIG DS 5 2 3600 20040509183619 (
20040409183619 38519 example.
oXIKit/QtdG64J/CB+Gi8dOvnwRvqrto1AdQ
oRkAN15FP3iZ7suB7gvTBmXzCjL7XUgQVcoH
kdhyCuzp8W9qJHgRUSwKKkczSyuL64nhgjuD
EML8l9wlWVsl7PR2VnZduM9bLyBhaaPmRKX/
Fm+v6ccF2EGNLRiY08kdkz+XHHo= )
3600 NSEC ai.example. NS DS RRSIG NSEC
3600 RRSIG NSEC 5 2 3600 20040509183619 (
20040409183619 38519 example.
cOlYgqJLqlRqmBQ3iap2SyIsK4O5aqpKSoba
U9fQ5SMApZmHfq3AgLflkrkXRXvgxTQSKkG2
039/cRUs6Jk/25+fi7Xr5nOVJsb0lq4zsB3I
BBdjyGDAHE0F5ROJj87996vJupdm1fbH481g
sdkOW6Zyqtz3Zos8N0BBkEx+2G4= )
ns1.a.example. 3600 IN A 192.0.2.5
ns2.a.example. 3600 IN A 192.0.2.6
ai.example. 3600 IN A 192.0.2.9
3600 RRSIG A 5 2 3600 20040509183619 (
20040409183619 38519 example.
pAOtzLP2MU0tDJUwHOKE5FPIIHmdYsCgTb5B
ERGgpnJluA9ixOyf6xxVCgrEJW0WNZSsJicd
hBHXfDmAGKUajUUlYSAH8tS4ZnrhyymIvk3u
ArDu2wfT130e9UHnumaHHMpUTosKe22PblOy
6zrTpg9FkS0XGVmYRvOTNYx2HvQ= )
3600 HINFO "KLH-10" "ITS"
3600 RRSIG HINFO 5 2 3600 20040509183619 (
20040409183619 38519 example.
Iq/RGCbBdKzcYzlGE4ovbr5YcB+ezxbZ9W0l
e/7WqyvhOO9J16HxhhL7VY/IKmTUY0GGdcfh
ZEOCkf4lEykZF9NPok1/R/fWrtzNp8jobuY7
AZEcZadp1WdDF3jc2/ndCa5XZhLKD3JzOsBw
FvL8sqlS5QS6FY/ijFEDnI4RkZA= )
3600 AAAA 2001:db8::f00:baa9
3600 RRSIG AAAA 5 2 3600 20040509183619 (
20040409183619 38519 example.
nLcpFuXdT35AcE+EoafOUkl69KB+/e56XmFK
kewXG2IadYLKAOBIoR5+VoQV3XgTcofTJNsh
1rnF6Eav2zpZB3byI6yo2bwY8MNkr4A7cL9T
cMmDwV/hWFKsbGBsj8xSCN/caEL2CWY/5XP2
sZM6QjBBLmukH30+w1z3h8PUP2o= )
3600 NSEC b.example. A HINFO AAAA RRSIG NSEC
3600 RRSIG NSEC 5 2 3600 20040509183619 (
20040409183619 38519 example.
QoshyPevLcJ/xcRpEtMft1uoIrcrieVcc9pG
CScIn5Glnib40T6ayVOimXwdSTZ/8ISXGj4p
P8Sh0PlA6olZQ84L453/BUqB8BpdOGky4hsN
3AGcLEv1Gr0QMvirQaFcjzOECfnGyBm+wpFL
AhS+JOVfDI/79QtyTI0SaDWcg8U= )