draft-ietf-dnssec-secext2-02.txt   draft-ietf-dnssec-secext2-03.txt 
DNS Security Working Group Donald E. Eastlake 3rd DNS Security Working Group Donald E. Eastlake 3rd
INTERNET-DRAFT CyberCash INTERNET-DRAFT CyberCash
OBSOLETES RFC 2065 OBSOLETES RFC 2065
UPDATES RFC 1034, 1035 UPDATES RFC 1034, 1035
Expires: 20 May 1998 21 November 1997 Expires: July 1998 January 1998
Domain Name System Security Extensions Domain Name System Security Extensions
------ ---- ------ -------- ---------- ------ ---- ------ -------- ----------
Status of This Document Status of This Document
This draft, file name draft-ietf-dnssec-secext2-02.txt, is intended This draft, file name draft-ietf-dnssec-secext2-03.txt, is intended
to become a Draft Standard RFC obsoleting Proposed Standard RFC 2065. to become a Proposed Standard RFC obsoleting Proposed Standard RFC
Distribution of this document is unlimited. Comments should be sent 2065. Distribution of this document is unlimited. Comments should be
to the DNS Security Working Group mailing list <dns-security@tis.com> sent to the DNS Security Working Group mailing list <dns-
or to the author. security@tis.com> or to the author.
This document is an Internet-Draft. Internet-Drafts are working This document is an Internet-Draft. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, documents of the Internet Engineering Task Force (IETF), its areas,
and its working groups. Note that other groups may also distribute and its working groups. Note that other groups may also distribute
working documents as Internet-Drafts. working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six Internet-Drafts are draft documents valid for a maximum of six
months. Internet-Drafts may be updated, replaced, or obsoleted by months. Internet-Drafts may be updated, replaced, or obsoleted by
other documents at any time. It is not appropriate to use Internet- other documents at any time. It is not appropriate to use Internet-
Drafts as reference material or to cite them other than as a Drafts as reference material or to cite them other than as a
skipping to change at page 2, line 11 skipping to change at page 2, line 11
Directories on ds.internic.net (East USA), ftp.isi.edu (West USA), Directories on ds.internic.net (East USA), ftp.isi.edu (West USA),
nic.nordu.net (North Europe), ftp.nis.garr.it (South Europe), nic.nordu.net (North Europe), ftp.nis.garr.it (South Europe),
munnari.oz.au (Pacific Rim), or ftp.is.co.za (Africa). munnari.oz.au (Pacific Rim), or ftp.is.co.za (Africa).
Abstract Abstract
Extensions to the Domain Name System (DNS) are described that provide Extensions to the Domain Name System (DNS) are described that provide
data integrity and authentication to security aware resolvers or data integrity and authentication to security aware resolvers or
applications through the use of cryptographic digital signatures. applications through the use of cryptographic digital signatures.
These digital signatures are included in secured zones as resource These digital signatures are included in secured zones as resource
records. Security can also be provided even through non-security records. Security can also be provided through non-security aware
aware DNS servers in many cases. DNS servers in some cases.
The extensions provide for the storage of authenticated public keys The extensions provide for the storage of authenticated public keys
in the DNS. This storage of keys can support general public key in the DNS. This storage of keys can support general public key
distribution services as well as DNS security. The stored keys distribution services as well as DNS security. The stored keys
enable security aware resolvers to learn the authenticating key of enable security aware resolvers to learn the authenticating key of
zones in addition to those for which they are initially configured. zones in addition to those for which they are initially configured.
Keys associated with DNS names can be retrieved to support other Keys associated with DNS names can be retrieved to support other
protocols. Provision is made for a variety of key types and protocols. Provision is made for a variety of key types and
algorithms. algorithms.
In addition, the security extensions provide for the optional In addition, the security extensions provide for the optional
authentication of DNS protocol transactions and requests. authentication of DNS protocol transactions and requests.
This document incorporates feedback from early implementors and This document incorporates feedback on RFC 2065 from early
potential users on RFC 2065. implementers and potential users.
Acknowledgments Acknowledgments
The significant contributions of the following persons (in alphabetic The significant contributions and suggestions of the following
order) to DNS security are gratefully acknowledged: persons (in alphabetic order) to DNS security are gratefully
acknowledged:
James M. Galvin James M. Galvin
John Gilmore John Gilmore
Olafur Gudmundsson Olafur Gudmundsson
Charlie Kaufman Charlie Kaufman
Edward Lewis Edward Lewis
Radia J. Perlman Radia J. Perlman
Jeffrey I. Schiller Jeffrey I. Schiller
Steven (Xunhua) Wang
Brian Wellington
Table of Contents Table of Contents
Status of This Document....................................1 Status of This Document....................................1
Abstract...................................................2 Abstract...................................................2
Acknowledgments............................................2 Acknowledgments............................................2
Table of Contents..........................................3 Table of Contents..........................................3
1. Overview of Contents....................................5 1. Overview of Contents....................................5
2. Overview of the DNS Extensions..........................6 2. Overview of the DNS Extensions..........................6
2.1 Services Not Provided..................................6 2.1 Services Not Provided..................................6
2.2 Key Distribution.......................................6 2.2 Key Distribution.......................................6
2.3 Data Origin Authentication and Integrity...............7 2.3 Data Origin Authentication and Integrity...............7
2.3.1 The SIG Resource Record..............................7 2.3.1 The SIG Resource Record..............................8
2.3.2 Authenticating Name and Type Non-existence...........8 2.3.2 Authenticating Name and Type Non-existence...........8
2.3.3 Special Considerations With Time-to-Live.............8 2.3.3 Special Considerations With Time-to-Live.............8
2.3.4 Special Considerations at Delegation Points..........9 2.3.4 Special Considerations at Delegation Points..........9
2.3.5 Special Considerations with CNAME....................9 2.3.5 Special Considerations with CNAME....................9
2.3.6 Signers Other Than The Zone.........................10 2.3.6 Signers Other Than The Zone.........................10
2.4 DNS Transaction and Request Authentication............10 2.4 DNS Transaction and Request Authentication............10
3. The KEY Resource Record................................11 3. The KEY Resource Record................................12
3.1 KEY RDATA format......................................11 3.1 KEY RDATA format......................................12
3.1.1 Object Types, DNS Names, and Keys...................11 3.1.1 Object Types, DNS Names, and Keys...................12
3.1.2 The KEY RR Flag Field...............................12 3.1.2 The KEY RR Flag Field...............................13
3.1.3 The Protocol Octet..................................13 3.1.3 The Protocol Octet..................................14
3.2 The KEY Algorithm Number Specification................14 3.2 The KEY Algorithm Number Specification................15
3.2.1 The MD5/RSA Algorithm...............................15 3.3 Interaction of Flags, Algorithm, and Protocol Bytes...16
3.3 Interaction of Flags, Algorithm, and Protocol Bytes...15 3.4 Determination of Zone Secure/Unsecured Status.........17
3.4 Determination of Zone Secure/Unsecured Status.........16 3.5 KEY RRs in the Construction of Responses..............18
3.5 KEY RRs in the Construction of Responses..............17
4. The SIG Resource Record................................19 4. The SIG Resource Record................................19
4.1 SIG RDATA Format......................................19 4.1 SIG RDATA Format......................................19
4.1.1 ....................................................19 4.1.1 ....................................................19
4.1.2 Algorithm Number Field..............................20 4.1.2 Algorithm Number Field..............................20
4.1.3 Labels Field........................................20 4.1.3 Labels Field........................................20
4.1.4 Original TTL Field..................................20 4.1.4 Original TTL Field..................................20
4.1.5 Signature Expiration and Time Signed Fields.........21 4.1.5 Signature Expiration and Inception Fields...........21
4.1.6 Key Tag Field.......................................21 4.1.6 Key Tag Field.......................................21
4.1.7 Signer's Name Field.................................21 4.1.7 Signer's Name Field.................................21
4.1.8 Signature Field.....................................22 4.1.8 Signature Field.....................................22
4.1.8.1 Signature Data....................................22 4.1.8.1 Calculating Transaction and Request SIGs..........22
4.1.8.2 MD5/RSA Algorithm Signature Calculation...........22 4.2 SIG RRs in the Construction of Responses..............23
4.1.8.3 Transaction and Request SIGs......................23 4.3 Processing Responses and SIG RRs......................24
4.2 SIG RRs in the Construction of Responses..............24 4.4 Signature Lifetime, Expiration, TTLs, and Validity....25
4.3 Processing Responses and SIG RRs......................25 4.5 SIG Under The Meta-Root Key and The Root Zone.........25
4.4 Signature Lifetime, Expiration, TTLs, and Validity....26
4.5 The Root Zone as Signer...............................26
5. Non-existent Names and Types...........................27 5. Non-existent Names and Types...........................27
5.1 The NXT Resource Record...............................27 5.1 The NXT Resource Record...............................27
5.2 NXT RDATA Format......................................28 5.2 NXT RDATA Format......................................28
5.3 Additional Complexity Due to Wildcards................28 5.3 Additional Complexity Due to Wildcards................28
5.4 Example...............................................29 5.4 Example...............................................29
5.5 Special Considerations at Delegation Points...........29 5.5 Special Considerations at Delegation Points...........30
5.6 Zone Transfers........................................30 5.6 Zone Transfers........................................30
5.6.1 Incremental Zone Transfers..........................30 5.6.1 Incremental Zone Transfers..........................30
6. How to Resolve Securely and the AD and CD Bits.........32 6. How to Resolve Securely and the AD and CD Bits.........32
6.1 The AD and CD Header Bits.............................32 6.1 The AD and CD Header Bits.............................32
6.2 Staticly Configured Keys..............................33 6.2 Staticly Configured Keys..............................33
6.3 Chaining Through The DNS..............................34 6.3 Chaining Through The DNS..............................34
6.3.1 Chaining Through KEYs...............................34 6.3.1 Chaining Through KEYs...............................34
6.3.2 Conflicting Data....................................35 6.3.2 Conflicting Data....................................36
6.4 Secure Time...........................................36 6.4 Secure Time...........................................36
7. ASCII Representation of Security RRs...................37 7. ASCII Representation of Security RRs...................37
7.1 Presentation of KEY RRs...............................37 7.1 Presentation of KEY RRs...............................37
7.2 Presentation of SIG RRs...............................38 7.2 Presentation of SIG RRs...............................38
7.3 Presentation of NXT RRs...............................39 7.3 Presentation of NXT RRs...............................39
8. Canonical Form and Order of Resource Records...........40 8. Canonical Form and Order of Resource Records...........40
8.1 Canonical RR Form.....................................40 8.1 Canonical RR Form.....................................40
8.2 Canonical DNS Name Order..............................40 8.2 Canonical DNS Name Order..............................40
8.3 Canonical RR Ordering Within An RRset.................40 8.3 Canonical RR Ordering Within An RRset.................41
8.4 Canonical Ordering of RR Types........................41
9. Conformance............................................41 9. Conformance............................................42
9.1 Server Conformance....................................41 9.1 Server Conformance....................................42
9.2 Resolver Conformance..................................41 9.2 Resolver Conformance..................................42
10. Security Considerations...............................42 10. Security Considerations...............................43
References................................................43 References................................................44
Author's Addresses........................................45 Author's Address..........................................46
Expiration and File Name..................................45 Expiration and File Name..................................46
Appendix A: Base 64 Encoding..............................46 Appendix A: Base 64 Encoding..............................47
Appendix B: Changes from RFC 2065.........................48 Appendix B: Changes from RFC 2065.........................49
Appendix C: Key Tag Calculation...........................49 Appendix C: Key Tag Calculation...........................51
1. Overview of Contents 1. Overview of Contents
This document standardizes extensions of the Domain Name System (DNS) This document standardizes extensions of the Domain Name System (DNS)
protocol to support DNS security and public key distribution. It protocol to support DNS security and public key distribution. It
assumes that the reader is familiar with the Domain Name System, assumes that the reader is familiar with the Domain Name System,
particularly as described in RFCs 1033, 1034, and 1035. An earlier particularly as described in RFCs 1033, 1034, 1035 and later RFCs.
version of these extensions appears in RFC 2065. This replacement An earlier version of these extensions appears in RFC 2065. This
for that RFC incorporates early implementation experience and replacement for that RFC incorporates early implementation experience
requests from potential users. and requests from potential users.
Section 2 provides an overview of the extensions and the key Section 2 provides an overview of the extensions and the key
distribution, data origin authentication, and transaction and request distribution, data origin authentication, and transaction and request
security they provide. security they provide.
Section 3 discusses the KEY resource record, its structure, and use Section 3 discusses the KEY resource record, its structure, and use
in DNS responses. These resource records represent the public keys in DNS responses. These resource records represent the public keys
of entities named in the DNS and are used for key distribution. of entities named in the DNS and are used for key distribution.
Section 4 discusses the SIG digital signature resource record, its Section 4 discusses the SIG digital signature resource record, its
skipping to change at page 5, line 35 skipping to change at page 5, line 35
to authenticate other resource records in the DNS and optionally to to authenticate other resource records in the DNS and optionally to
authenticate DNS transactions and requests. authenticate DNS transactions and requests.
Section 5 discusses the NXT resource record (RR) and its use in DNS Section 5 discusses the NXT resource record (RR) and its use in DNS
responses including full and incremental zone transfers. The NXT RR responses including full and incremental zone transfers. The NXT RR
permits authenticated denial of the existence of a name or of an RR permits authenticated denial of the existence of a name or of an RR
type for an existing name. type for an existing name.
Section 6 discusses how a resolver can be configured with a starting Section 6 discusses how a resolver can be configured with a starting
key or keys and proceed to securely resolve DNS requests. key or keys and proceed to securely resolve DNS requests.
Interactions between resolvers and servers are discussed for Interactions between resolvers and servers are discussed for various
combinations of security aware and security non-aware. Two combinations of security aware and security non-aware. Two
additional DNS header bits are defined for signaling between additional DNS header bits are defined for signaling between
resolvers and servers. resolvers and servers.
Section 7 describes the ASCII representation of the security resource Section 7 describes the ASCII representation of the security resource
records for use in master files and elsewhere. records for use in master files and elsewhere.
Section 8 defines the canonical form and order of RRs for DNS Section 8 defines the canonical form and order of RRs for DNS
security purposes. security purposes.
Section 9 defines levels of conformance for resolvers and servers. Section 9 defines levels of conformance for resolvers and servers.
Section 10 provides a few paragraphs on overall security Section 10 provides a few paragraphs on overall security
considerations. considerations.
Appendix A gives details of base 64 encoding which is used in the Appendix A gives details of base 64 encoding which is used in the
file representation of some RR's defined in this document. file representation of some RRs defined in this document.
Appendix B summarizes changes between this draft and RFC 2065. Appendix B summarizes changes between this draft and RFC 2065.
Appendix C specified how to calculate the simple checksum used as a Appendix C specified how to calculate the simple checksum used as a
key tag in the SIG RR. key tag in the SIG RR.
2. Overview of the DNS Extensions 2. Overview of the DNS Extensions
The Domain Name System (DNS) protocol security extensions provide The Domain Name System (DNS) protocol security extensions provide
three distinct services: key distribution as described in Section 2.2 three distinct services: key distribution as described in Section 2.2
skipping to change at page 6, line 29 skipping to change at page 6, line 29
2.1 Services Not Provided 2.1 Services Not Provided
It is part of the design philosophy of the DNS that the data in it is It is part of the design philosophy of the DNS that the data in it is
public and that the DNS gives the same answers to all inquirers. public and that the DNS gives the same answers to all inquirers.
Following this philosophy, no attempt has been made to include any Following this philosophy, no attempt has been made to include any
sort of access control lists or other means to differentiate sort of access control lists or other means to differentiate
inquirers. inquirers.
No effort has been made to provide for any confidentiality for No effort has been made to provide for any confidentiality for
queries or responses. (This service may be available via IPSEC [RFC queries or responses. (This service may be available via IPSEC [RFC
1825] or TLS [draft-ietf-tls-*].) 1825], TLS [draft-ietf-tls-*], or other security protocols.)
Protection is not provided against denial of service. Protection is not provided against denial of service.
2.2 Key Distribution 2.2 Key Distribution
A resource record format is defined to associate keys with DNS names. A resource record format is defined to associate keys with DNS names.
This permits the DNS to be used as a public key distribution This permits the DNS to be used as a public key distribution
mechanism in support of DNS security itself and other protocols. mechanism in support of DNS security itself and other protocols.
The syntax of a KEY resource record (RR) is described in Section 3. The syntax of a KEY resource record (RR) is described in Section 3.
skipping to change at page 7, line 9 skipping to change at page 7, line 9
Under conditions described in Section 3.5, security aware DNS servers Under conditions described in Section 3.5, security aware DNS servers
will automatically attempt to return KEY resources as additional will automatically attempt to return KEY resources as additional
information, along with those resource records actually requested, to information, along with those resource records actually requested, to
minimize the number of queries needed. minimize the number of queries needed.
2.3 Data Origin Authentication and Integrity 2.3 Data Origin Authentication and Integrity
Authentication is provided by associating with resource record sets Authentication is provided by associating with resource record sets
(RRsets) in the DNS cryptographically generated digital signatures. (RRsets) in the DNS cryptographically generated digital signatures.
Commonly, there will be a single private key that signs for an entire Commonly, there will be a single private key that authenticates an
zone. If a security aware resolver reliably learns the public key of entire zone but there might be multiple keys for different
the zone, it can verify, for signed data read from that zone, that it algorithms, signers, etc. If a security aware resolver reliably
was properly authorized and is current. The most secure learns a public key of the zone, it can authenticate, for signed data
implementation is for the zone private key to be kept off-line and read from that zone, that it was properly authorized and is current.
used to re-sign all of the records in the zone periodically. The most secure implementation is for the zone private key(s) to be
kept off-line and used to re-sign all of the records in the zone
periodically. However, there are cases, for example dynamic update
[RFCs 2136, 2137], where DNS private keys need to be on-line.
This data origin authentication key belongs to the zone and not to This data origin authentication key(s) are associated with the zone
the servers that store copies of the data. That means compromise of and not to the servers that store copies of the data. That means
a server or even all servers for a zone will not necessarily affect compromise of a secondary server or, if the key(s) are kept off line,
the degree of assurance that a resolver has that it can determine even the primary server for a zone, will not necessarily affect the
whether data is genuine. degree of assurance that a resolver has that it can determine whether
data is genuine.
A resolver can learn the public key of a zone either by reading it A resolver could learn a public key of a zone either by reading it
from the DNS or by having it staticly configured. To reliably learn from the DNS or by having it or a key which authenticates it staticly
the public key by reading it from the DNS, the key itself must be configured. To reliably learn a public key by reading it from the
signed with a key the resolver trusts. The resolver must be DNS, the key itself must be signed with a key the resolver trusts.
configured with at least the public key of one zone as a starting The resolver must be configured with at least a public key which
point. From there, it can securely read the public keys of other authenticates one zone as a starting point. From there, it can
zones, if the intervening zones in the DNS tree are secure and their securely read public keys of other zones, if the intervening zones in
signed keys accessible. the DNS tree are secure and their signed keys accessible.
Adding data origin authentication and integrity requires no change to Adding data origin authentication and integrity requires no change to
the "on-the-wire" DNS protocol beyond the addition of the signature the "on-the-wire" DNS protocol beyond the addition of the signature
resource type and the key resource type needed for key distribution. resource type and the key resource type needed for key distribution.
(Data non-existence authentication also requires the NXT RR as (Data non-existence authentication also requires the NXT RR as
described in 2.3.2.) This service can be supported by existing described in 2.3.2.) This service can be supported by existing
resolver and caching server implementations so long as they can resolver and caching server implementations so long as they can
support the additional resource types (see Section 9). The one support the additional resource types (see Section 9). The one
exception is that CNAME referrals in a secure zone can not be exception is that CNAME referrals in a secure zone can not be
authenticated if they are from non-security aware servers (see authenticated if they are from non-security aware servers (see
skipping to change at page 8, line 40 skipping to change at page 8, line 46
time-to-live (TTL) field of resource records tick down while they are time-to-live (TTL) field of resource records tick down while they are
cached. cached.
This could be avoided by leaving the time-to-live out of the digital This could be avoided by leaving the time-to-live out of the digital
signature, but that would allow unscrupulous servers to set signature, but that would allow unscrupulous servers to set
arbitrarily long TTL values undetected. Instead, we include the arbitrarily long TTL values undetected. Instead, we include the
"original" TTL in the signature and communicate that data along with "original" TTL in the signature and communicate that data along with
the current TTL. Unscrupulous servers under this scheme can the current TTL. Unscrupulous servers under this scheme can
manipulate the TTL but a security aware resolver will bound the TTL manipulate the TTL but a security aware resolver will bound the TTL
value it uses at the original signed value. Separately, signatures value it uses at the original signed value. Separately, signatures
include a time signed and an expiration time. A resolver that knows include a signature inception time and a signature expiration time.
the absolute time can determine securely whether a signature is in A resolver that knows the absolute time can determine securely
effect. It is not possible to rely solely on the signature whether a signature is in effect. It is not possible to rely solely
expiration as a substitute for the TTL, however, since the TTL is on the signature expiration as a substitute for the TTL, however,
primarily a database consistency mechanism and non-security aware since the TTL is primarily a database consistency mechanism and non-
servers that depend on TTL must still be supported. security aware servers that depend on TTL must still be supported.
2.3.4 Special Considerations at Delegation Points 2.3.4 Special Considerations at Delegation Points
DNS security would like to view each zone as a unit of data DNS security would like to view each zone as a unit of data
completely under the control of the zone owner with each entry completely under the control of the zone owner with each entry
(RRset) signed by a special private key held by the zone. But the (RRset) signed by a special private key held by the zone. But the
DNS protocol views the leaf nodes in a zone, which are also the apex DNS protocol views the leaf nodes in a zone, which are also the apex
nodes of a subzone (i.e., delegation points), as "really" belonging nodes of a subzone (i.e., delegation points), as "really" belonging
to the subzone. These nodes occur in two master files and might have to the subzone. These nodes occur in two master files and might have
RRs signed by both the upper and lower zone's keys. A retrieval RRs signed by both the upper and lower zone's keys. A retrieval
could get a mixture of these RRs and SIGs, especially since one could get a mixture of these RRs and SIGs, especially since one
server could be serving both the zone above and below a delegation server could be serving both the zone above and below a delegation
point. point. [RFC 2181]
There MUST be a zone KEY RR, signed by its superzone, for every There MUST be a zone KEY RR, signed by its superzone, for every
subzone if the superzone is secure. In the case of an unsecured subzone if the superzone is secure. In the case of an unsecured
subzone which can not or will not be modified to add any security subzone which can not or will not be modified to add any security
RRs, a KEY declaring the subzone to be unsecured MUST appear in and RRs, a KEY declaring the subzone to be unsecured MUST appear in and
be signed by the superzone, if the superzone is secure. For all but be signed by the superzone, if the superzone is secure. For all but
one other RR type the data from the subzone is more authoritative so one other RR type the data from the subzone is more authoritative so
only the KEY RR in the superzone should be signed and the NS and any only the KEY RR in the superzone should be signed. The NS and any
glue address RRs should only be signed in the subzone. The SOA and glue address RRs should only be signed in the subzone. The SOA and
any other RRs that have the zone name as owner should appear only in any other RRs that have the zone name as owner should appear only in
the subzone and thus are signed only there. The NXT RR type is the the subzone and thus are signed only there. The NXT RR type is the
exceptional case that will always appear differently and exceptional case that will always appear differently and
authoritatively in both the superzone and subzone, if both are authoritatively in both the superzone and subzone, if both are
secure, as described in Section 5. secure, as described in Section 5.
2.3.5 Special Considerations with CNAME 2.3.5 Special Considerations with CNAME
There is a problem when security related RRs with the same owner name There is a problem when security related RRs with the same owner name
skipping to change at page 10, line 7 skipping to change at page 10, line 10
Security aware servers MUST (1) allow KEY, SIG, and NXT RRs along Security aware servers MUST (1) allow KEY, SIG, and NXT RRs along
with CNAME RRs, (2) suppress CNAME processing on retrieval of these with CNAME RRs, (2) suppress CNAME processing on retrieval of these
types as well as on retrieval of the type CNAME, and (3) types as well as on retrieval of the type CNAME, and (3)
automatically return SIG RRs authenticating the CNAME or CNAMEs automatically return SIG RRs authenticating the CNAME or CNAMEs
encountered in resolving a query. This is a change from the previous encountered in resolving a query. This is a change from the previous
DNS standard [RFCs 1034/1035] which prohibited any other RR type at a DNS standard [RFCs 1034/1035] which prohibited any other RR type at a
node where a CNAME RR was present. node where a CNAME RR was present.
2.3.6 Signers Other Than The Zone 2.3.6 Signers Other Than The Zone
There are two cases where a SIG resource record is signed by other There are cases where a SIG resource record is signed by other than a
than the zone private key (see Section 2.4). private key used to authenticate a zone.
One is for support of dynamic update [RFC 2136], or future requests One is for support of dynamic update [RFC 2136] (or future requests
which require authentication, where an entity is permitted to which require secure authentication) where an entity is permitted to
authenticate/update its records [RFC 2137]. The public key of the authenticate/update its records [RFC 2137]. The public key of the
entity must be present in the DNS and be appropriately signed but the entity must be present in the DNS and be appropriately signed but the
other RR(s) may be signed with the entity's key. other RR(s) may be signed with the entity's key.
The second case is support of transaction authentication. The second case is support of transaction and request authentication
as described in Section 2.4.
2.4 DNS Transaction and Request Authentication 2.4 DNS Transaction and Request Authentication
The data origin authentication service described above protects The data origin authentication service described above protects
retrieved resource records but provides no protection for DNS retrieved resource records but provides no protection for DNS
requests or for message headers. requests or for message headers.
If header bits are falsely set by a bad server, there is little that If header bits are falsely set by a bad server, there is little that
can be done. However, it is possible to add transaction can be done. However, it is possible to add transaction
authentication. Such authentication means that a resolver can be authentication. Such authentication means that a resolver can be
sure it is at least getting messages from the server it thinks it sure it is at least getting messages from the server it thinks it
queried and that the response is from the query it sent (i.e., that queried and that the response is from the query it sent (i.e., that
these messages have not been diddled in transit). This is these messages have not been diddled in transit). This is
accomplished by optionally adding a special SIG resource record at accomplished by optionally adding a special SIG resource record at
the end of the reply which digitally signs the concatenation of the the end of the reply which digitally signs the concatenation of the
server's response and the resolver's query. server's response and the resolver's query.
Requests can also be authenticated by including a special SIG RR at Requests can also be authenticated by including a special SIG RR at
the end of the request. Authenticating requests serves no function the end of the request. Authenticating requests serves no function
in older DNS servers and requests with a non-empty additional in older DNS servers and requests with a non-empty additional
information section are ignored by many older and current DNS information section are ignored by many DNS servers. However, this
servers. However, this syntax for signing requests is defined in syntax for signing requests is defined in connection with
connection with authenticating secure dynamic update requests [RFC authenticating secure dynamic update requests [RFC 2137] or future
2137] or future requests requiring authentication. requests requiring authentication.
The private keys used in transaction and request security belong to The private keys used in transaction and request security belong to
the host composing the request or reply, not to the zone involved. the host composing the request or reply, not to the zone involved.
The corresponding public key is normally stored in and retrieved from The corresponding public key is normally stored in and retrieved from
the DNS for verification. the DNS for verification.
Because requests and replies are highly variable, message Because requests and replies are highly variable, message
authentication SIGs can not be pre-calculated. Thus it will be authentication SIGs can not be pre-calculated. Thus it will be
necessary to keep the private key on-line, for example in software or necessary to keep the private key on-line, for example in software or
in a directly connected piece of hardware. in a directly connected piece of hardware.
skipping to change at page 11, line 34 skipping to change at page 12, line 34
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| flags | protocol | algorithm | | flags | protocol | algorithm |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| / | /
/ public key / / public key /
/ | / |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
The KEY RR is not intended for storage of certificates and a separate The KEY RR is not intended for storage of certificates and a separate
certificate RR is being considered, to be defined in a separate certificate RR is being developed, to be defined in a separate
document. document.
The meaning of the KEY RR owner name, flags, and protocol octet are The meaning of the KEY RR owner name, flags, and protocol octet are
described in Sections 3.1.1 through 3.1.5 below. The flags and described in Sections 3.1.1 through 3.1.5 below. The flags and
algorithm must be examined before any data following the algorithm algorithm must be examined before any data following the algorithm
octet as they control the existence and format of any following data. octet as they control the existence and format of any following data.
The algorithm and public key fields are described in Section 3.2. The algorithm and public key fields are described in Section 3.2.
The format of the public key is algorithm dependent. The format of the public key is algorithm dependent.
KEY RRs do not expire but their authenticating SIG RR does as KEY RRs do not specify their validity period but their authenticating
described in Section 4 below. SIG RR does as described in Section 4 below.
3.1.1 Object Types, DNS Names, and Keys 3.1.1 Object Types, DNS Names, and Keys
The public key in a KEY RR is for the object named in the owner name. The public key in a KEY RR is for the object named in the owner name.
This DNS name may refer to up to three different categories of This DNS name may refer to up to three different categories of
things. For example, foo.host.example could be (1) a zone, (2) a things. For example, foo.host.example could be (1) a zone, (2) a
host or other end entity , or (3) the mapping into a DNS name of the host or other end entity , or (3) the mapping into a DNS name of the
user or account foo@host.example. Thus, there are flag bits, as user or account foo@host.example. Thus, there are flag bits, as
described below, in the KEY RR to indicate with which of these roles described below, in the KEY RR to indicate with which of these roles
the owner name and public key are associated. Note that an the owner name and public key are associated. Note that an
appropriate zone KEY RR MUST occur at the apex node of a secure zone. appropriate zone KEY RR MUST occur at the apex node of a secure zone
and zone KEY RRs occur only at delegation points.
3.1.2 The KEY RR Flag Field 3.1.2 The KEY RR Flag Field
In the "flags" field: In the "flags" field:
1 1 1 1 1 1 1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| A/C | Z | XT| Z | Z | NAMTYP| IP| Z | Z | Z | SIG | | A/C | Z | XT| Z | Z | NAMTYP| Z | Z | Z | Z | SIG |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
Bit 0 and 1 are the key "type" bits. Bit 0 and 1 are the key "type" bits.
Bit 0 a one indicates that use of the key is prohibited for 10: Bit 0 a one indicates that use of the key is prohibited
authentication. for authentication.
Bit 1 a one indicates that use of the key is prohibited for 01: Bit 1 a one indicates that use of the key is prohibited
confidentiality. for confidentiality.
If this field is zero, then use of the key for authentication 00: If this field is zero, then use of the key for
and/or confidentiality is permitted. Note that DNS security makes authentication and/or confidentiality is permitted. Note that DNS
use of keys for authentication only. Confidentiality use flagging security makes use of keys for authentication only.
is provided for use of keys in other protocols. Implementations Confidentiality use flagging is provided for use of keys in other
not intended to support key distribution for confidentiality MAY protocols. Implementations not intended to support key
require that the confidentiality use prohibited bit be on for keys distribution for confidentiality MAY require that the
they serve. confidentiality use prohibited bit be on for keys they serve.
If both bits are one, the "no key" value, there is no key 11: If both bits are one, the "no key" value, there is no key
information and the RR stops after the algorithm octet. By the information and the RR stops after the algorithm octet. By the
use of this "no key" value, a signed KEY RR can authenticatably use of this "no key" value, a signed KEY RR can authenticatably
assert that, for example, a zone is not secured. See section 3.4 assert that, for example, a zone is not secured. See section 3.4
below. below.
Bits 2 is reserved and must be zero. Bits 2 is reserved and must be zero.
Bits 3 is reserved as a flag extension bit. If it is a one, a second Bits 3 is reserved as a flag extension bit. If it is a one, a second
16 bit flag field is added after the algorithm octet and before 16 bit flag field is added after the algorithm octet and before
the key data. This bit MUST NOT be set unless one or more such the key data. This bit MUST NOT be set unless one or more such
additional bits have been defined and are non-zero. additional bits have been defined and are non-zero.
Bits 4-5 are reserved and must be zero. Bits 4-5 are reserved and must be zero.
Bits 6 and 7 form a field that encodes the name type. Bits 6 and 7 form a field that encodes the name type.
A value of 0 indicates that this is a key associated with a 0 - indicates that this is a key associated with a "user" or
"user" or "account" at an end entity, usually a host. The coding "account" at an end entity, usually a host. The coding of the
of the owner name is that used for the responsible individual owner name is that used for the responsible individual mailbox in
mailbox in the SOA and RP RRs: The owner name is the user name as the SOA and RP RRs: The owner name is the user name as the name of
the name of a node under the entity name. For example, a node under the entity name. For example, "j_random_user" on
"j_random_user" on host.subdomain.example could have a public key host.subdomain.example could have a public key associated through
associated through a KEY RR with name a KEY RR with name j_random_user.host.subdomain.example. It could
j_random_user.host.subdomain.example. It could be used in a be used in a security protocol where authentication of a user was
security protocol where authentication of a user was desired. desired. This key might be useful in IP or other security for a
This key might be useful in IP or other security for a user level user level service such a telnet, ftp, rlogin, etc.
service such a telnet, ftp, rlogin, etc. 1 - indicates that this is a zone key for the zone whose name
A value of 1 indicates that this is a zone key for the zone is the KEY RR owner name. This is the public key used for the
whose name is the KEY RR owner name. This is the public key used primary DNS security feature of data origin authentication. Zone
for the primary DNS security feature of data origin KEY RRs occur only at delegation points.
authentication. 2 - indicates that this is a key associated with the non-zone
A value of 2 indicates that this is a key associated with the "entity" whose name is the RR owner name. This will commonly be a
non-zone "entity" whose name is the RR owner name. This will host but could, in some parts of the DNS tree, be some other type
commonly be a host but could, in some parts of the DNS tree, be of entity such as a telephone number [RFC 1530] or numeric IP
some other type of entity such as a telephone number [RFC 1530] or address. This is the public key used in connection with DNS
numeric IP address. This is the public key used in connection request and transaction authentication services if the owner name
with DNS request and transaction authentication services if the designates a DNS resolver or server host. It could also be used
owner name designates a DNS resolver or server host. It could in an IP-security protocol where authentication at the host,
also be used in an IP-security protocol where authentication at rather than user, level was desired, such as routing, NTP, etc.
the host, rather than user, level was desired, such as routing, 3 - reserved.
NTP, etc.
The value of 3 is reserved.
Bits 8-11 are reserved and must be zero. Bits 8-11 are reserved and must be zero.
Bits 12-15 are the "signatory" field. If non-zero, they indicate Bits 12-15 are the "signatory" field. If non-zero, they indicate
that the key can validly sign RRs or updates of the same name. If that the key can validly sign RRs or updates of the same name in
the owner name is a wildcard, then RRs or updates with any name connection with DNS dynamic update [RFC 2137]. If the owner name
which is in the wildcard's scope can, in some cases, be signed. is a wildcard, then RRs or updates with any name which is in the
Fifteen different non-zero values are possible for this field and wildcard's scope can, in some cases, be signed. Fifteen different
any differences in their meaning are reserved for definition in non-zero values are possible for this field and any differences in
connection with DNS dynamic update [RFC 2137] or other new DNS their meaning are reserved for definition with DNS dynamic update.
commands. Zone keys (see bits 6 and 7 above) always have Note that zone keys (see bits 6 and 7 above) always have authority
authority to sign any RRs in the zone regardless of the value of to sign any RRs in the zone regardless of the value of the
the signatory field. The signatory field, like all other aspects signatory field. The signatory field, like all other aspects of
of the KEY RR, is only effective if the KEY RR is appropriately the KEY RR, is only effective if the KEY RR is appropriately
signed by a SIG RR. signed by a SIG RR.
3.1.3 The Protocol Octet 3.1.3 The Protocol Octet
It is anticipated that some keys stored in DNS will be used in It is anticipated that keys stored in DNS will be used in conjunction
conjunction with Internet protocols other than DNS (keys with the with a variety of Internet protocols. It is intended that the
zone name type or with their signatory field non-zero). It is protocol octet and possibly some of the currently unused (must be
intended that the protocol octet and possibly some of the unused zero) bits in the KEY RR flags as specified in the future will be
(must be zero) bits in the KEY RR flags will be used for this used to indicate a key's validity for different protocols.
purpose.
The following values of the Protocol Octet are reserved as indicated: The following values of the Protocol Octet are reserved as indicated:
VALUE Protocol VALUE Protocol
0 -reserved 0 -reserved
1 TLS 1 TLS
2 email 2 email
3 dnssec 3 dnssec
4 IPSEC 4 IPSEC
5-254 -available for assignment by IANA 5-254 -available for assignment by IANA
255 -reserved 255 All
In more detail: In more detail:
1 is reserved to refer to the TLS standard being developed by 1 is reserved to refer to the TLS standard being developed by
the tls working group. The presence of a KEY resource with this the tls working group. The presence of a KEY resource with this
protocol value is an assertion that the host speaks TLS. protocol value is an assertion that the host speaks TLS.
2 is reserved 2 is reserved for use in connection with email.
3 is used for DNS security. The protocol field should be set to 3 is used for DNS security. The protocol field should be set to
this value for zone keys and other keys used in DNS security. this value for zone keys and other keys used in DNS security.
Implementations that can determine that a key is a DNS security key Implementations that can determine that a key is a DNS security key
by the fact that flags label it a zone key or the signatory flag by the fact that flags label it a zone key or the signatory flag
field is non-zero are not required to check the protocol field. field is non-zero are not required to check the protocol field.
4 is reserved to refer to the Oakley/IPSEC [RFC 1825] protocol 4 is reserved to refer to the Oakley/IPSEC [RFC 1825] protocol
and indicates that this key is valid for use in conjunction with that and indicates that this key is valid for use in conjunction with that
security standard. This key could be used in connection with secured security standard. This key could be used in connection with secured
communication on behalf of an end entity or user whose name is the communication on behalf of an end entity or user whose name is the
owner name of the KEY RR if the entity or user bits are on. The owner name of the KEY RR if the entity or user bits are on. The
presence of a KEY resource with this protocol value is an assertion presence of a KEY resource with this protocol value is an assertion
that the host speaks Oakley/IPSEC. that the host speaks Oakley/IPSEC.
255 indicates that the key can be used in connection with any
protocol for which KEY RR protocol octet values have been defined.
The use of this value is discouraged and the use of different keys
for different protocols is encouraged.
3.2 The KEY Algorithm Number Specification 3.2 The KEY Algorithm Number Specification
This octet is the key algorithm parallel to the same field for the This octet is the key algorithm parallel to the same field for the
SIG resource. The MD5/RSA algorithm described in this document is SIG resource as described in Section 4.1. The following values are
number 1. Numbers 2 through 253 are available for assignment should assigned:
sufficient reason arise. However, the designation of a new algorithm
could have a major impact on interoperability and requires an IETF
standards action. Number 254 is reserved for private use and will
never be assigned a specific algorithm. For number 254, the public
key area for the KEY RR and the signature will actually begin with a
length byte followed by an Object Identifier (ISO OID) of that
length. The OID indicates the private algorithm in use and the
remainder of the area is whatever is required by that algorithm.
Values 0 and 255 are reserved.
3.2.1 The MD5/RSA Algorithm VALUE Protocol
If the type flag field does not have the "no key" value and the 0 - reserved
algorithm field is 1, indicating the MD5/RSA algorithm, the public 1 RSA/MD5 [RFC xxx1] - recommended
key field is structured as follows: 2 Diffie-Hellman [RFC xxx2] - key only
3 DSA [RFC xxx3] - MANDATORY
4 reserved for elliptic curve
5-251 - available (see below)
252 indirect keys [RFC xxx4]
253 - available (but was "null" [RFC 2065])
254 private (see below)
255 - reserved
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 Algorithm specific formats and procedures are given in separate
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 documents. The mandatory to implement for interoperability algorithm
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ is number 3, DSA. It is recommended that the RSA/MD5 algorithm,
| pub exp length| public key exponent / number 1, also be implemented. Algorithm 2 is used to indicate
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Diffie-Hellman keys and algorithm 4 is reserved for elliptic curve.
| /
+- modulus /
| /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-/
For interoperability, the exponent and modulus are each currently Numbers 5 through 251 and 253 are available for assignment should
limited to 4096 bits in length. The public key exponent is a sufficient reason arise. However, the designation of a new algorithm
variable length unsigned integer. Its length in octets is could have a major impact on interoperability and requires an IETF
represented as one octet if it is in the range of 1 to 255 and by a standards action.
zero octet followed by a two octet unsigned length if it is longer
than 255 bytes. The public key modulus field is a multiprecision Number 254 is reserved for private use and will never be assigned a
unsigned integer. The length of the modulus can be determined from specific algorithm. For number 254, the public key area for the KEY
the RDLENGTH and the preceding RDATA fields including the exponent. RR and the signature will actually begin with a length byte followed
Leading zero octets are prohibited in the exponent and modulus. by an Object Identifier (ISO OID) of that length. The OID indicates
the private algorithm in use and the remainder of the area is
whatever is required by that algorithm.
Values 0 and 255 are reserved but the value 0 is used in the
algorithm field when that field is not used. An example is in a KEY
RR with the top two flag bits on, the "no-key" value, where no key is
present. Such a KEY RR should have an algorithm field of zero.
3.3 Interaction of Flags, Algorithm, and Protocol Bytes 3.3 Interaction of Flags, Algorithm, and Protocol Bytes
Various combinations of the no-key type flags, algorithm byte, Various combinations of the no-key type flags, algorithm byte,
protocol byte, and any future assigned protocol indicating flags are protocol byte, and any future assigned protocol indicating flags are
possible. (Note that the zone value of the name type flags or the possible. The meaning of these combinations is indicated below:
signatory field being non-zero means usability in the DNS protocol.)
The meaning of these combinations is indicated below:
NK = no key type flags (bits 0 and 1 on) NK = no key type flags (bits 0 and 1 on)
AL = algorithm byte AL = algorithm byte
PR = protocols indicated by protocol byte or future assigned flags PR = protocols indicated by protocol byte or future assigned flags
x represents any valid non-zero value(s). x represents any valid non-zero value(s).
AL PR NK Meaning AL PR NK Meaning
0 0 0 Illegal, claims key but has bad algorithm field. 0 0 0 Illegal, claims key but has bad algorithm field.
0 0 1 Specifies total lack of security for owner. 0 0 1 Specifies total lack of security for owner zone.
0 x 0 Illegal, claims key but has bad algorithm field. 0 x 0 Illegal, claims key but has bad algorithm field.
0 x 1 Specified protocols unsecured, others may be secure. 0 x 1 Specified protocols unsecured, others may be secure.
x 0 0 Useless. Gives key but no protocols to use it. x 0 0 Useless. Gives key but no protocols to use it.
x 0 1 Useless. Denies key but for no protocols. x 0 1 Useless. Denies key but for no protocols.
x x 0 Specifies key for protocols. x x 0 Specifies key for protocols.
x x 1 Algorithm not understood for protocol. x x 1 Algorithm not understood for protocol.
3.4 Determination of Zone Secure/Unsecured Status 3.4 Determination of Zone Secure/Unsecured Status
A zone KEY RR with the "no-key" type field value (both bits 0 and 1 A zone KEY RR with the "no-key" type field value (both bits 0 and 1
on) indicates that the zone named is unsecured while a zone KEY RR on) indicates that the zone named is unsecured while a zone KEY RR
with a key present indicates that the zone named is secure. It is with a key present indicates that the zone named is secure. It is
possible for conflicting zone KEY RRs to be present. possible for conflicting zone KEY RRs to be present.
Zone KEY RRs, like all RRs, are only trusted if they are Zone KEY RRs, like all RRs, are only trusted if they are
authenticated by a SIG RR whose signer field is a signer for which authenticated by a SIG RR whose signer field is a signer for which
the resolver has a public key they trust and where resolver policy the resolver has a public key they trust and where resolver policy
permits that signer to sign for the KEY owner name. Untrusted zone permits that signer to sign for the KEY owner name. Untrusted zone
KEY RRs can be ignored in determining the security status of the KEY RRs MUST be ignored in determining the security status of the
zone. There can be multiple sets of trusted zone KEY RRs for a zone zone. However, there can be multiple sets of trusted zone KEY RRs
with each set having a different signer. for a zone with different algorithms, signers, etc.
Zones can be (1) secure, indicating that any retrieved RR must be Zones can be (1) secure, indicating that any retrieved RR must be
authenticated by a SIG RR or it will be discarded as bogus, (2) authenticated by a SIG RR or it will be discarded as bogus, (2)
unsecured, indicating that SIG RRs are not expected or required for unsecured, indicating that SIG RRs are not expected or required for
RRs retrieved from the zone, or (3) experimentally secure, which RRs retrieved from the zone, or (3) experimentally secure, which
indicates that SIG RRs might or might not be present but must be indicates that SIG RRs might or might not be present but must be
checked if found. The status of a zone is determined as follows: checked if found. The status of a zone is determined as follows:
1. If, for a zone, every zone KEY RR signed by a signer trusted by 1. If, for a zone, every trusted zone KEY RR for the zone says there
the resolver and authorized by resolver policy to sign says there
is no key for that zone, it is unsecured. is no key for that zone, it is unsecured.
2. If, for at least one trusted and resolver policy authorized zone 2. If, there is at least one trusted no-key zone KEY RR and one
KEY RR signer for a zone, there is both a no-key KEY RR and a key trusted key specifying zone KEY RR, then that zone is only
specifying KEY RR(s), then that zone is only experimentally experimentally secure. Both authenticated and non-authenticated
secure. Both authenticated and non-authenticated RRs for it RRs for it should be accepted by the resolver.
should be accepted by the resolver.
3. If every trusted and resolver policy authorized zone KEY RR signer 3. If every trusted zone KEY RR for the zone has is key specifying,
for the zone has only key specifying KEY RR(s) for the zone, then then it is secure and only authenticated RRs from it will be
it is secure and only authenticated RRs from it will be accepted. accepted.
Examples: Examples:
(1) A resolver only trusts signatures by the superzone within the (1) A resolver only trusts signatures by the superzone within the
DNS hierarchy so it will look only at the KEY RRs that are signed by DNS hierarchy so it will look only at the KEY RRs that are signed by
the superzone. If it finds only no-key KEY RRs, it will assume the the superzone. If it finds only no-key KEY RRs, it will assume the
zone is not secure. If it finds only key specifying KEY RRs, it will zone is not secure. If it finds only key specifying KEY RRs, it will
assume the zone is secure and reject any unsigned responses. If it assume the zone is secure and reject any unsigned responses. If it
finds both, it will assume the zone is experimentally secure finds both, it will assume the zone is experimentally secure
skipping to change at page 17, line 36 skipping to change at page 18, line 33
r +-----------+-----------+----------+----------+ r +-----------+-----------+----------+----------+
Z Mixed | experim. | experim. | experim. | secure | Z Mixed | experim. | experim. | experim. | secure |
o +-----------+-----------+----------+----------+ o +-----------+-----------+----------+----------+
n Keys | secure | secure | secure | secure | n Keys | secure | secure | secure | secure |
e +-----------+-----------+----------+----------+ e +-----------+-----------+----------+----------+
3.5 KEY RRs in the Construction of Responses 3.5 KEY RRs in the Construction of Responses
An explicit request for KEY RRs does not cause any special additional An explicit request for KEY RRs does not cause any special additional
information processing except, of course, for the corresponding SIG information processing except, of course, for the corresponding SIG
RR from a security aware server. RR from a security aware server (see Section 4.2).
Security aware DNS servers include KEY RRs as additional information Security aware DNS servers include KEY RRs as additional information
in responses, where a KEY is available, in the following cases: in responses, where a KEY is available, in the following cases:
(1) On the retrieval of SOA or NS RRs, the KEY RRset with the same (1) On the retrieval of SOA or NS RRs, the KEY RRset with the same
name (usually just a zone key) SHOULD be included as additional name (usually just a zone key) SHOULD be included as additional
information if space is available. There will always be at least one information if space is available. There will always be at least one
such KEY RR in a secure zone in connection with a subzone delegation such KEY RR in a secure zone in connection with a subzone delegation
point, even if it has the no-key type value to indicate that the point, even if it has the no-key type value to indicate that the
subzone is unsecured. If not all additional information will fit, subzone is unsecured. If not all additional information will fit,
the type A or AAAA glue RRs have higher priority than KEY RR(s). type A and AAAA glue RRs have higher priority than KEY RR(s).
(2) On retrieval of type A or AAAA RRs, the KEY RRset with the same (2) On retrieval of type A or AAAA RRs, the KEY RRset with the same
name (usually just a host RR and NOT the zone key which usually would name (usually just a host RR and NOT the zone key which usually would
have a different name) SHOULD be included if space is available. On have a different name) SHOULD be included if space is available. On
inclusion of A or AAAA RRs as additional information, the KEY RRset inclusion of A or AAAA RRs as additional information, the KEY RRset
with the same name should also be included but with lower priority with the same name should also be included but with lower priority
than the A or AAAA RRs. than the A or AAAA RRs.
4. The SIG Resource Record 4. The SIG Resource Record
skipping to change at page 19, line 34 skipping to change at page 19, line 34
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| type covered | algorithm | labels | | type covered | algorithm | labels |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| original TTL | | original TTL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| signature expiration | | signature expiration |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| time signed | | signature inception |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| key tag | | | key tag | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ signer's name + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ signer's name +
| / | /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-/ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-/
/ / / /
/ signature / / signature /
/ / / /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 21, line 5 skipping to change at page 21, line 5
cause by decrementing the real TTL field and (2) security problems cause by decrementing the real TTL field and (2) security problems
that unscrupulous servers could otherwise cause by manipulating the that unscrupulous servers could otherwise cause by manipulating the
real TTL field. This original TTL is protected by the signature real TTL field. This original TTL is protected by the signature
while the current TTL field is not. while the current TTL field is not.
NOTE: The "original TTL" must be restored into the covered RRs when NOTE: The "original TTL" must be restored into the covered RRs when
the signature is verified (see Section 8). This implies that all RRs the signature is verified (see Section 8). This implies that all RRs
for a particular type, name, and class must have the same TTL to for a particular type, name, and class must have the same TTL to
start with. start with.
4.1.5 Signature Expiration and Time Signed Fields 4.1.5 Signature Expiration and Inception Fields
The SIG is valid until the "signature expiration" time which is an The SIG is valid from the "signature inception" time until the
unsigned number of seconds since the start of 1 January 1970, GMT, "signature expiration" time. Both are unsigned numbers of seconds
ignoring leap seconds. (See also Section 4.4.) Ring arithmetic is since the start of 1 January 1970, GMT, ignoring leap seconds. (See
used as for DNS SOA serial numbers [RFC 1982] which means that the also Section 4.4.) Ring arithmetic is used as for DNS SOA serial
expiration date can never be more than ~136.09 years in the future. numbers [RFC 1982] which means that these times can never be more
than about 136.09 years in the future.
The "time signed" field is an unsigned number of seconds since the (To prevent misordering of network requests to update a zone
start of 1 January 1970, GMT, ignoring leap seconds. SIG RRs SHOULD dynamically, monotonically increasing "signature inception" times may
NOT have a date signed more than a few days in the future. To be necessary. [RFC 2137])
prevent misordering of network requests to update a zone dynamically,
monotonically increasing "time signed" dates may be necessary.
SOA serial numbers for secure zones MUST not only be advanced when SOA serial numbers for secure zones MUST not only be advanced when
their data is updated but also when new SIG RRs are inserted (ie, the their data is updated but also when new SIG RRs are inserted (ie, the
zone or any part of it is re-signed). zone or any part of it is re-signed).
A SIG RR may have an expiration date numerically less than the time A SIG RR may have an expiration time numerically less than the time
signed if time is near the 32 bit wrap around point and/or the signed if time is near the 32 bit wrap around point and/or the
signature is long lived. signature is long lived.
4.1.6 Key Tag Field 4.1.6 Key Tag Field
The "key Tag" is a two octet quantity that is used to efficiently The "key Tag" is a two octet quantity that is used to efficiently
select between multiple keys which may be applicable and thus check select between multiple keys which may be applicable and thus check
that a public key about to be used for the computationally expensive that a public key about to be used for the computationally expensive
effort to check the signature is possibly valid. For algorithm 1 effort to check the signature is possibly valid. For algorithm 1
(MD5/RSA) as defined below, it is the next to the bottom two octets (MD5/RSA) as defined in [RFC xxx1], it is the next to the bottom two
of the public key modulus needed to decode the signature field. That octets of the public key modulus needed to decode the signature
is to say, the most significant 16 of the lest significant 24 bits of field. That is to say, the most significant 16 of the lest
the modulus in network (big endian) order. For all other algorithms, significant 24 bits of the modulus in network (big endian) order.
including private algorithms, it is calculated as a simple checksum For all other algorithms, including private algorithms, it is
of the KEY RR as described in Appendix C. calculated as a simple checksum of the KEY RR as described in
Appendix C.
4.1.7 Signer's Name Field 4.1.7 Signer's Name Field
The "signer's name" field is the domain name of the signer generating The "signer's name" field is the domain name of the signer generating
the SIG RR. This is the owner of the public KEY RR that can be used the SIG RR. This is the owner of the public KEY RR that can be used
to verify the signature. It is frequently the zone which contained to verify the signature. It is frequently the zone which contained
the RRset being authenticated. What signers should be authorized to the RRset being authenticated. Which signers should be authorized to
sign what is a significant resolver policy question as discussed in sign what is a significant resolver policy question as discussed in
Section 6. The signer's name may be compressed with standard DNS name Section 6. The signer's name may be compressed with standard DNS name
compression when being transmitted over the network. compression when being transmitted over the network.
4.1.8 Signature Field 4.1.8 Signature Field
The structure of the "signature" field is described below. The structure of the "signature" field is described below.
4.1.8.1 Signature Data
The actual signature portion of the SIG RR binds the other RDATA The actual signature portion of the SIG RR binds the other RDATA
fields to all of the "type covered" RRs with that owner name and fields to the RRset of the "type covered" RRs with that owner name
class. This covered RRset is thereby authenticated. To accomplish and class. This covered RRset is thereby authenticated. To
this, a data sequence is constructed as follows: accomplish this, a data sequence is constructed as follows:
data = RDATA | RR(s)... data = RDATA | RR(s)...
where "|" is concatenation, RDATA is wire format of all the RDATA where "|" is concatenation, RDATA is wire format of all the RDATA
fields in the SIG RR itself including the canonical form of the fields in the SIG RR itself including the canonical form of the
signers name before but not including the signature, and RR(s) are signers name before but not including the signature, and RR(s) is the
all the RR(s) of the type covered with the same owner name and class RRset of the RR(s) of the type covered with the same owner name and
as the SIG RR in canonical form and order as defined in Section 8. class as the SIG RR in canonical form and order as defined in Section
How this data sequence is processed into the signature is algorithm 8. How this data sequence is processed into the signature is
dependent. algorithm dependent. These algorithm dependent formats and
procedures are described in separate documents (Section 3.2).
SIGs SHOULD NOT be included in a zone for any "meta-type" such as SIGs SHOULD NOT be included in a zone for any "meta-type" such as
ANY, AXFR, etc. ANY, AXFR, etc.
4.1.8.2 MD5/RSA Algorithm Signature Calculation 4.1.8.1 Calculating Transaction and Request SIGs
For the MD5/RSA algorithm, the signature is as follows
hash = MD5 ( data )
signature = ( 01 | FF* | 00 | prefix | hash ) ** e (mod n)
where MD5 is the message digest algorithm documented in RFC 1321, "|"
is concatenation, "e" is the private key exponent of the signer, and
"n" is the modulus of the signer's public key. 01, FF, and 00 are
fixed octets of the corresponding hexadecimal value. "prefix" is the
ASN.1 BER MD5 algorithm designator prefix specified in PKCS1, that
is,
hex 3020300c06082a864886f70d020505000410 [NETSEC].
This prefix is included to make it easier to use RSAREF (or similar
packages such as EuroRef). The FF octet MUST be repeated the maximum
number of times such that the value of the quantity being
exponentiated is one octet shorter than the value of n.
(The above specifications are identical to the corresponding part of
Public Key Cryptographic Standard #1 [PKCS1].)
The size of n, including most and least significant bits (which will
be 1) MUST be not less than 512 bits and not more than 4096 bits. n
and e SHOULD be chosen such that the public exponent is small.
Leading zero bytes are permitted in the MD5/RSA algorithm signature.
A public exponent of 3 minimizes the effort needed to decode a
signature. Use of 3 as the public exponent is weak for
confidentiality uses since, if the same data can be collected
encrypted under three different keys with an exponent of 3 then,
using the Chinese Remainder Theorem [NETSEC], the original plain text
can be easily recovered. This weakness is not significant for DNS
security because we seek only authentication, not confidentiality.
4.1.8.3 Transaction and Request SIGs
A response message from a security aware server may optionally A response message from a security aware server may optionally
contain a special SIG at the end of the additional information contain a special SIG at the end of the additional information
section to authenticate the transaction. section to authenticate the transaction.
This SIG has a "type covered" field of zero, which is not a valid RR This SIG has a "type covered" field of zero, which is not a valid RR
type. It is calculated by using a "data" (see Section 4.1.8.1) of type. It is calculated by using a "data" (see Section 4.1.8) of the
the entire preceding DNS reply message, including DNS header but not entire preceding DNS reply message, including DNS header but not the
the IP header and before the reply RR counts have been adjusted for IP header and before the reply RR counts have been adjusted for the
the inclusion of any transaction SIG, concatenated with the entire inclusion of any transaction SIG, concatenated with the entire DNS
DNS query message that produced this response, including the query's query message that produced this response, including the query's DNS
DNS header and any request SIGs but not its IP header. That is header and any request SIGs but not its IP header. That is
data = full response (less transaction SIG) | full query data = full response (less transaction SIG) | full query
Verification of the transaction SIG (which is signed by the server Verification of the transaction SIG (which is signed by the server
host key, not the zone key) by the requesting resolver shows that the host key, not the zone key) by the requesting resolver shows that the
query and response were not tampered with in transit, that the query and response were not tampered with in transit, that the
response corresponds to the intended query, and that the response response corresponds to the intended query, and that the response
comes from the queried server. comes from the queried server.
A DNS request may be optionally signed by including one or more SIGs A DNS request may be optionally signed by including one or more SIGs
skipping to change at page 24, line 28 skipping to change at page 23, line 35
included. If space does not permit its inclusion, the response included. If space does not permit its inclusion, the response
MUST be considered truncated except as provided in 2 below. MUST be considered truncated except as provided in 2 below.
2. when a SIG RR is present in the zone for an additional 2. when a SIG RR is present in the zone for an additional
information section RR, the response MUST NOT be considered information section RR, the response MUST NOT be considered
truncated merely because space does not permit the inclusion of truncated merely because space does not permit the inclusion of
its SIG RR. its SIG RR.
3. SIGs to authenticate non-authoritative data (glue records and NS 3. SIGs to authenticate non-authoritative data (glue records and NS
RRs for subzones) are unnecessary and MUST NOT be sent. (Note RRs for subzones) are unnecessary and MUST NOT be sent. (Note
that KEYs given for a subzone in that subzone's superzone is that KEYs given for a subzone in that subzone's superzone are
controlling so the superzone's signature on the KEY MUST be controlling so the superzone's signature on the KEY MUST be
included (unless the KEY was additional information and the SIG included (unless the KEY was additional information and the SIG
did not fit).) did not fit).)
4. If a SIG covers any RR that would be in the answer section of 4. If a SIG covers any RR that would be in the answer section of
the response, its automatic inclusion MUST be in the answer the response, its automatic inclusion MUST be in the answer
section. If it covers an RR that would appear in the authority section. If it covers an RR that would appear in the authority
section, its automatic inclusion MUST be in the authority section, its automatic inclusion MUST be in the authority
section. If it covers an RR that would appear in the additional section. If it covers an RR that would appear in the additional
information section it MUST appear in the additional information information section it MUST appear in the additional information
section. This is a change in the existing standard [RFCs section. This is a change in the existing standard [RFCs 1034,
10334/1035] which contemplates only NS and SOA RRs in the 1035] which contemplates only NS and SOA RRs in the authority
authority section. section.
5. Optionally, DNS transactions may be authenticated by a SIG RR at 5. Optionally, DNS transactions may be authenticated by a SIG RR at
the end of the response in the additional information section the end of the response in the additional information section
(Section 4.1.8.3). Such SIG RRs are signed by the DNS server (Section 4.1.8.1). Such SIG RRs are signed by the DNS server
originating the response. Although the signer field MUST be the originating the response. Although the signer field MUST be the
name of the originating server host, the owner name, class, TTL, name of the originating server host, the owner name, class, TTL,
and original TTL, are meaningless. The class and TTL fields and original TTL, are meaningless. The class and TTL fields
SHOULD be zero. To conserve space, the owner name SHOULD be SHOULD be zero. To conserve space, the owner name SHOULD be
root (a single zero octet). If transaction authentication is root (a single zero octet). If transaction authentication is
desired, that SIG RR must be considered the highest priority for desired, that SIG RR must be considered the highest priority for
inclusion. inclusion.
4.3 Processing Responses and SIG RRs 4.3 Processing Responses and SIG RRs
skipping to change at page 26, line 8 skipping to change at page 25, line 12
authenticate RRs depending on resolver policy (see Section 6). If a authenticate RRs depending on resolver policy (see Section 6). If a
resolver does not implement transaction and/or request SIGs, it MUST resolver does not implement transaction and/or request SIGs, it MUST
ignore them without error. ignore them without error.
If all checks indicate that the SIG RR is valid then RRs verified by If all checks indicate that the SIG RR is valid then RRs verified by
it should be considered authenticated. it should be considered authenticated.
4.4 Signature Lifetime, Expiration, TTLs, and Validity 4.4 Signature Lifetime, Expiration, TTLs, and Validity
Security aware servers MUST NOT consider SIG RRs to authenticate Security aware servers MUST NOT consider SIG RRs to authenticate
anything before their time signed or after their expiration time and anything before their signature inception or after its expiration
NOT consider any RR to be authenticated after all its signatures have time. (Actually after the authentication chain expiration time, see
expired. Within that constraint, servers should continue to follow Section 6.) Security aware servers MUST NOT consider any RR to be
DNS TTL aging. Thus authoritative servers should continue to follow authenticated after all its signatures have expired. When a secure
the zone refresh and expire parameters and a non-authoritative server server caches authenticated data, if the TTL would expire at a time
should count down the TTL and discard RRs when the TTL is zero. In further in the future than the authentication expiration time, the
addition, when RRs are transmitted in a query response, the TTL server SHOULD trim the TTL in the cache entry not to extent beyond
should be trimmed so that current time plus the TTL does not extend the authentication expiration time. Within these constraint, servers
beyond the signature expiration time. Thus, in general, the TTL on a should continue to follow DNS TTL aging. Thus authoritative servers
transmitted RR would be should continue to follow the zone refresh and expire parameters and
a non-authoritative server should count down the TTL and discard RRs
when the TTL is zero (even for a SIG that has not yet reached its
authentication expiration time). In addition, when RRs are
transmitted in a query response, the TTL should be trimmed so that
current time plus the TTL does not extend beyond the authentication
expiration time. Thus, in general, the TTL on a transmitted RR would
be
min(sigExpTim,max(zoneMinTTL,min(originalTTL,currentTTL))) min(authExpTim,max(zoneMinTTL,min(originalTTL,currentTTL)))
When signatures are generated, signature expiration times should be When signatures are generated, signature expiration times should be
set far enough in the future that it is quite certain that new set far enough in the future that it is quite certain that new
signatures can be generated before the old ones expire. However, signatures can be generated before the old ones expire. However,
setting expiration too far into the future could, if bad data or setting expiration too far into the future could, if bad data or
signatures were ever generated, mean a long time to flush such signatures were ever generated, mean a long time to flush such
badness. badness.
It is recommended that signature lifetime be a small multiple of the It is recommended that signature lifetime be a small multiple of the
TTL (ie, 4 to 16 times the TTL) but not less than a reasonable TTL (ie, 4 to 16 times the TTL) but not less than a reasonable
maximum re-signing interval and not less than the zone expiry time. maximum re-signing interval and not less than the zone expiry time.
4.5 The Root Zone as Signer 4.5 SIG Under The Meta-Root Key and The Root Zone
It should be noted that in DNS the root is a zone unto itself. Thus To minimize exposure of the ultimate key of the DNS tree, there will
the root zone key should only be seen signing itself or signing RRs be a "meta-root" key used rarely and then only to sign a sequence of
with names one level below root, such as .aq, .edu, or .arpa. regular root key RRsets with overlapping time validity periods that
Implementations SHOULD reject as bogus any purported root signature are to be rolled out. The root zone contains the meta-root and
of records with a name more than one level below root. The root zone current regular root KEY RR(s) signed by SIG RRs under both the
contains the root KEY RR signed by a SIG RR under the root key meta-root and other root key(s) themselves.
itself.
For example, assume that the regular root key is to be changed once a
month. If the meta-root key were to be exposed only once a year,
then for each exposure you might use the meta-key to sign twenty four
key RRsets as follows:
one with a date signed of the middle of January and expiring the
middle of February with the January and Jan/Feb root keys,
one with a date signed of the beginning of February and expiring
the end of February with the Jan/Feb and February root keys,
one with a date signed of the middle of February and expiring
the middle of March with the February and Feb/Mar root keys,
one with the data signed of the beginning of March and expiring
the end of March with with Feb/Mar and March root keys,
etc.
During the first half of January, the data in the root zone with the
above hypothetical key policy would be signed with the Dec/Jan and
January keys. During the second half of January, it would be signed
with the January and Jan/Feb keys. During the first half of
February, it would be signed with the Jan/Feb and February keys. Etc.
Security in the storage and use of the meta-root key should be
maximized. The particular techniques are precautions to be used are
an operational matter beyond the scope of this document.
It should also be noted that in DNS the root is a single level zone
unto itself. Thus the root zone key should only be seen signing
itself or signing RRs with names one level below root, such as .aq,
.com, or signature of records with a name more than one level below
root.
5. Non-existent Names and Types 5. Non-existent Names and Types
The SIG RR mechanism described in Section 4 above provides strong The SIG RR mechanism described in Section 4 above provides strong
authentication of RRs that exist in a zone. But is it not clear authentication of RRs that exist in a zone. But is it not clear
above how to authenticatably deny the existence of a name in a zone above how to verifiably deny the existence of a name in a zone or a
or a type for an existent name. type for an existent name.
The nonexistence of a name in a zone is indicated by the NXT ("next") The nonexistence of a name in a zone is indicated by the NXT ("next")
RR for a name interval containing the nonexistent name. A NXT RR and RR for a name interval containing the nonexistent name. An NXT RR or
its SIG are returned in the authority section, along with the error, RRs and its or their SIG(s) are returned in the authority section,
if the server is security aware. The same is true for a non-existent along with the error, if the server is security aware. The same is
type under an existing name. This is a change in the existing true for a non-existent type under an existing name except that there
standard [RFCs 1034/1035] which contemplates only NS and SOA RRs in is no error indication other than an empty answer section
the authority section. NXT RRs will also be returned if an explicit accompanying the NXT(s). This is a change in the existing standard
query is made for the NXT type. [RFCs 1034/1035] which contemplates only NS and SOA RRs in the
authority section. NXT RRs will also be returned if an explicit query
is made for the NXT type.
The existence of a complete set of NXT records in a zone means that The existence of a complete set of NXT records in a zone means that
any query for any name and any type to a security aware server any query for any name and any type to a security aware server
serving the zone will result in an reply containing at least one serving the zone will result in an reply containing at least one
signed RR unless it is a query for delegation point NS or glue A or signed RR unless it is a query for delegation point NS or glue A or
AAAA RRs. AAAA RRs.
5.1 The NXT Resource Record 5.1 The NXT Resource Record
The NXT resource record is used to securely indicate that RRs with an The NXT resource record is used to securely indicate that RRs with an
skipping to change at page 28, line 20 skipping to change at page 28, line 22
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| next domain name / | next domain name /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| type bit map / | type bit map /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The NXT RR type bit map format currently defined is one bit per RR The NXT RR type bit map format currently defined is one bit per RR
type present for the owner name similar to the WKS RR socket bit map. type present for the owner name similar to the WKS RR socket bit map.
The first bit represents RR type zero (an illegal type which can not A one bit indicates that at least one RR of that type is present for
be present.) A one bit indicates that at least one RR of that type the owner name. A zero indicates that no such RR is present. All
is present for the owner name. A zero indicates that no such RR is bits not specified because they are beyond the end of the bit map are
present. All bits not specified because they are beyond the end of assumed to be zero. Note that bit 30, for NXT, will always be on so
the bit map are assumed to be zero. Note that bit 30, for NXT, will the minimum bit map length is actually four octets. Trailing zero
always be on so the minimum bit map length is actually four octets. octets are prohibited in this format. The first bit represents RR
Trailing zero octets are prohibited in this format. This format must type zero (an illegal type which can not be present) and so will be
be used unless there are RRs with a type number greater than 127. If zero in this format. This format must be used unless there are RRs
the zero bit of the type bit map is a one, it indicates that there with a type number greater than 127. If the zero bit of the type bit
exists at least on RR with a type number greater than 127 and a map is a one, it indicates that there exists at least on RR with a
different format is in use which is to be defined. type number greater than 127 and a different format is in use which
is to be defined.
The NXT bit map should be printed as a list of RR type mnemonics or The NXT bit map should be printed as a list of RR type mnemonics or
decimal numbers similar to the WKS RR. decimal numbers similar to the WKS RR.
The domain name may be compressed with standard DNS name compression The domain name may be compressed with standard DNS name compression
when being transmitted over the network. The size of the bit map can when being transmitted over the network. The size of the bit map can
be inferred from the RDLENGTH and the length of the next domain name. be inferred from the RDLENGTH and the length of the next domain name.
5.3 Additional Complexity Due to Wildcards 5.3 Additional Complexity Due to Wildcards
skipping to change at page 30, line 5 skipping to change at page 30, line 10
Note that this response implies that big.foo.nil is an existing name Note that this response implies that big.foo.nil is an existing name
in the zone and thus has other RR types associated with it than NXT. in the zone and thus has other RR types associated with it than NXT.
However, only the NXT (and its SIG) RR appear in the response to this However, only the NXT (and its SIG) RR appear in the response to this
query for huge.foo.nil, which is a non-existent name. query for huge.foo.nil, which is a non-existent name.
5.5 Special Considerations at Delegation Points 5.5 Special Considerations at Delegation Points
A name (other than root) which is the head of a zone also appears as A name (other than root) which is the head of a zone also appears as
the leaf in a superzone. If both are secure, there will always be the leaf in a superzone. If both are secure, there will always be
two different NXT RRs with the same name. They can be distinguished two different NXT RRs with the same name. They can be distinguished
by their signers and next domain name fields. Security aware servers by their signers, the next domain name fields, the presence of the
should return the correct NXT automatically when required to SOA type bit, etc. Security aware servers should return the correct
authenticate the non-existence of a name and both NXTs, if available, NXT automatically when required to authenticate the non-existence of
on explicit query for type NXT. a name and both NXTs, if available, on explicit query for type NXT.
Non-security aware servers will never automatically return an NXT and Non-security aware servers will never automatically return an NXT and
some old implementations may only return the NXT from the subzone on some old implementations may only return the NXT from the subzone on
explicit queries. explicit queries.
5.6 Zone Transfers 5.6 Zone Transfers
The sections below describe how full and incremental zone transfers The sections below describe how full and incremental zone transfers
are secured. are secured.
skipping to change at page 30, line 36 skipping to change at page 30, line 41
be sent as long as at least one of each type is included. be sent as long as at least one of each type is included.
To provide server authentication that a complete transfer has To provide server authentication that a complete transfer has
occurred, transaction authentication SHOULD be used on all full zone occurred, transaction authentication SHOULD be used on all full zone
transfers. This provides strong server based protection for the transfers. This provides strong server based protection for the
entire zone in transit. entire zone in transit.
When an incremental or full zone transfer request is received with When an incremental or full zone transfer request is received with
the same or newer version number than that of the server's copy of the same or newer version number than that of the server's copy of
the zone, it is replied to with just the SOA RR of the server's the zone, it is replied to with just the SOA RR of the server's
current version and the SIG(s) verifying that SOA RR. current version and the SIG RRset verifying that SOA RR.
5.6.1 Incremental Zone Transfers 5.6.1 Incremental Zone Transfers
Individual RRs in an incremental (IXFR) transfer [RFC 1995] can be Individual RRs in an incremental (IXFR) transfer [RFC 1995] can be
verified in the same way as for a full zone transfer and the verified in the same way as for a full zone transfer and the
integrity of the NXT name chain and correctness of the NXT type bits integrity of the NXT name chain and correctness of the NXT type bits
for the zone after the incremental RR deletes and adds can check each for the zone after the incremental RR deletes and adds can check each
disjoint area of the zone updated. But the completeness of an disjoint area of the zone updated. But the completeness of an
incremental transfer can not be confirmed because usually neither the incremental transfer can not be confirmed because usually neither the
deleted RR section nor the added RR section has a compete NXT chain. deleted RR section nor the added RR section has a compete NXT chain.
skipping to change at page 32, line 11 skipping to change at page 32, line 11
sent as part of an incremental zone transfer. After validation of sent as part of an incremental zone transfer. After validation of
the IXFR SIG, the transferred RRs MAY be considered valid without the IXFR SIG, the transferred RRs MAY be considered valid without
verification of the internal SIGs. verification of the internal SIGs.
6. How to Resolve Securely and the AD and CD Bits 6. How to Resolve Securely and the AD and CD Bits
Retrieving or resolving secure data from the Domain Name System (DNS) Retrieving or resolving secure data from the Domain Name System (DNS)
involves starting with one or more trusted public keys that have been involves starting with one or more trusted public keys that have been
staticly configured at the resolver. With starting trusted keys, a staticly configured at the resolver. With starting trusted keys, a
resolver willing to perform cryptography can progress securely resolver willing to perform cryptography can progress securely
through the secure DNS zone structure to the zone of interest as through the secure DNS structure to the zone of interest as described
described in Section 6.3. Such trusted public keys would normally be in Section 6.3. Such trusted public keys would normally be configured
configured in a manner similar to that described in Section 6.2. in a manner similar to that described in Section 6.2. However, as a
However, as a practical matter, a security aware resolver would still practical matter, a security aware resolver would still gain some
gain some confidence in the results it returns even if it was not confidence in the results it returns even if it was not configured
configured with any keys but trusted what it got from a local well with any keys but trusted what it got from a local well known server
known server as a starting point. as if it were staticly configured.
Data stored at a security aware server needs to be internally Data stored at a security aware server needs to be internally
categorized as Authenticated, Pending, or Insecure. There is also a categorized as Authenticated, Pending, or Insecure. There is also a
fourth transient state of Bad which indicates that all SIG checks fourth transient state of Bad which indicates that all SIG checks
have explicitly failed on the data. Such Bad data is not retained at have explicitly failed on the data. Such Bad data is not retained at
a security aware server. Authenticated means that the data has a a security aware server. Authenticated means that the data has a
valid SIG under a KEY traceable via a chain of zero or more SIG and valid SIG under a KEY traceable via a chain of zero or more SIG and
KEY RRs allowed by the resolvers policies to a KEY staticly KEY RRs allowed by the resolvers policies to a KEY staticly
configured at the resolver. Pending data has no authenticated SIGs configured at the resolver. Pending data has no authenticated SIGs
and at least one additional SIG the resolver is still trying to and at least one additional SIG the resolver is still trying to
authenticate. Insecure data is data which it is known can never be authenticate. Insecure data is data which it is known can never be
either Authenticated or found Bad because it is in or has been either Authenticated or found Bad in the zone where it was found
reached via a unsecured zone. Behavior in terms of control of and because it is in or has been reached via a unsecured zone or because
flagging based on such data labels is described in Section 6.1. it is unsigned glue address or delegation point NS data. Behavior in
terms of control of and flagging based on such data labels is
described in Section 6.1.
The proper validation of signatures requires a reasonably secure The proper validation of signatures requires a reasonably secure
shared opinion of the absolute time between resolvers and servers as shared opinion of the absolute time between resolvers and servers as
described in Section 6.4. described in Section 6.4.
6.1 The AD and CD Header Bits 6.1 The AD and CD Header Bits
Two previously unused bits are allocated out of the DNS Two previously unused bits are allocated out of the DNS
query/response format header. The AD (authentic data) bit indicates query/response format header. The AD (authentic data) bit indicates
in a response that the data included has been verified by the server in a response that the data included in the answer and authority
providing it according to the policies of that server. The CD sections has been authenticated by the server according to the
(checking disabled) bit indicates in a query that Pending (non- policies of that server or is accompanying glue address or delegation
verified) data is acceptable to the resolver sending the query. point NS data. The CD (checking disabled) bit indicates in a query
that Pending (non-authenticated) data is acceptable to the resolver
sending the query.
These bits are allocated from the previously must-be-zero Z field as These bits are allocated from the previously must-be-zero Z field as
follows: follows:
1 1 1 1 1 1 1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ID | | ID |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR| Opcode |AA|TC|RD|RA| Z|AD|CD| RCODE | |QR| Opcode |AA|TC|RD|RA| Z|AD|CD| RCODE |
skipping to change at page 33, line 35 skipping to change at page 33, line 35
servers only with Authenticated or Insecure data. Security aware servers only with Authenticated or Insecure data. Security aware
resolvers MUST NOT trust the AD bit unless they trust the server they resolvers MUST NOT trust the AD bit unless they trust the server they
are talking to and either have a secure path to it or use DNS are talking to and either have a secure path to it or use DNS
transaction security. transaction security.
Any security aware resolver willing to do cryptography SHOULD assert Any security aware resolver willing to do cryptography SHOULD assert
the CD bit on all queries to permit it to impose its own policies and the CD bit on all queries to permit it to impose its own policies and
to reduce DNS latency time by allowing security aware servers to to reduce DNS latency time by allowing security aware servers to
answer with Pending data. answer with Pending data.
Security aware servers NEVER return Bad data. For non-security aware Security aware servers MUST NOT return Bad data. For non-security
resolvers or security aware resolvers requesting service by having aware resolvers or security aware resolvers requesting service by
the CD bit clear, security aware servers MUST return only having the CD bit clear, security aware servers MUST return only
Authenticated or Insecure data with the AD bit set in the response. Authenticated or Insecure data in the answer and authority sections
Security aware servers SHOULD return Pending data, with the AD bit with the AD bit set in the response. Security aware servers SHOULD
clear in the response, to security aware resolvers requesting the return Pending data, with the AD bit clear in the response, to
service by asserting the CD bit in their request. The AD bit MUST security aware resolvers requesting the service by asserting the CD
NOT be set on a response unless all of the RRs in the response are bit in their request. The AD bit MUST NOT be set on a response
either Authenticated or Insecure. unless all of the RRs in the answer and authority sections of the
response are either Authenticated or Insecure.
6.2 Staticly Configured Keys 6.2 Staticly Configured Keys
The public key to authenticate a zone SHOULD be defined in local The public key to authenticate a zone SHOULD be defined in local
configuration files before that zone is loaded at the primary server configuration files before that zone is loaded at the primary server
so the zone can be authenticated. so the zone can be authenticated.
While it might seem logical for everyone to start with a key for the While it might seem logical for everyone to start with the meta-root
root zone and staticly configure this in every resolver, this has public key and staticly configure this in every resolver, this has
problems. The logistics of updating every DNS resolver in the world problems. The logistics of updating every DNS resolver in the world
when the root key changes would be excessive. Furthermore, many should this key ever change would be severe. Furthermore, many
organizations will explicitly wish their "interior" DNS organizations will explicitly wish their "interior" DNS
implementations to completely trust only their own zone. Such implementations to completely trust only their own DNS servers.
interior resolvers can then go through the organization's zone Interior resolvers of such organizations can then go through the
servers to access data outsize the organization's domain and should organization's zone servers to access data outsize the organization's
not be configured with keys above the organization's DNS apex. domain and should not be configured with keys above the
organization's DNS apex.
Host resolvers that are not part of a larger organization will likely Host resolvers that are not part of a larger organization may be
be configures with a key for the domain of their local ISP whose configured with a key for the domain of their local ISP whose
recursive secure DNS caching server they use. recursive secure DNS caching server they use.
6.3 Chaining Through The DNS 6.3 Chaining Through The DNS
Starting with one or more trusted keys for any zone, it should be Starting with one or more trusted keys for any zone, it should be
possible to retrieve signed keys for its subzones which have a key possible to retrieve signed keys for that zone's subzones which have
and, if the zone is not root, for its superzone. Every authoritative a key and, if the zone is not root, for its superzone. If an
secure zone server MUST also include the KEY RR for one or more authoritative secure zone server will have its public key (or that of
super-zones (possibly including root) signed by the secure zone via any subzone) staticly configured, then it MUST also include the KEY
static configuration. This makes it possible to climb the tree of RR for one or more super-zones (possibly including root) signed by
the secure zone via static configuration. It is safest to always
include this upward key. This makes it possible to climb the tree of
zones if one starts below root. A secure sub-zone is indicated by a zones if one starts below root. A secure sub-zone is indicated by a
KEY RR with non-null key information appearing with the NS RRs for KEY RR with non-null key information appearing with the NS RRs for
the sub-zone. These make it possible to descend within the tree of the sub-zone. These make it possible to descend within the tree of
zones. zones.
6.3.1 Chaining Through KEYs 6.3.1 Chaining Through KEYs
In general, some RRset in the secure DNS will be signed by one or In general, some RRset that you wish to validate in the secure DNS
more SIG RRs. Each of these SIG RRs has a signer under whose name is will be signed by one or more SIG RRs. Each of these SIG RRs has a
stored the public KEY to use in verifying the SIG. Each of those signer under whose name is stored the public KEY to use in
KEYs will, generally, also be signed with a SIG. And those SIGs will authenticating the SIG. Each of those KEYs will, generally, also be
have signer names also refering to KEYs. And so on. As a result, signed with a SIG. And those SIGs will have signer names also
verifying leads to chains of alternating SIG and KEY RRs with the referring to KEYs. And so on. As a result, authentication leads to
first SIG signing the original data whose validity is to be shown and chains of alternating SIG and KEY RRs with the first SIG signing the
the final KEY being some key staticly configured at the resolver original data whose authenticity is to be shown and the final KEY
performing the verification. being some key staticly configured at the resolver performing the
authentication.
In testing such a chain, the validation of a SIG over some data with In testing such a chain, the validity periods of the SIGs encountered
reference to a KEY is an objective cryptographic test; however, the must be intersected to determine the validity period of the
judgement that a SIG with a particular signer name can authenticate authentication of the data, a purely algorithm process. In addition,
data (possibly a KEY RRset) with a particular owner name is a policy the validation of each SIG over the data with reference to a KEY must
question. Ultimately, this is a policy local to the resolver and any meet the objective cryptographic test implied by the cryptographic
clients that depend on that resolver's decisions. It is, however, algorithm used, although even here the resolver may have policies as
strongly recommended, that the following policy be adopted: to trusted algorithms and key lengths. In addition, The judgement
that a SIG with a particular signer name can authenticate data
(possibly a KEY RRset) with a particular owner name, however, is
primarily a policy question. Ultimately, this is a policy local to
the resolver and any clients that depend on that resolver's
decisions. It is, however, strongly recommended, that the following
policy be adopted:
Let A < B mean that A is a shorter domain name than B formed by Let A < B mean that A is a shorter domain name than B formed by
dropping one or more whole labels from the left end of B. Let A dropping one or more whole labels from the left end of B, i.e.,
= B mean that A and B are the same domain name (i.e., are A is a direct or indirect superdomain of B. Let A = B mean that
identical after letter case canonicalization). Let A > B mean A and B are the same domain name (i.e., are identical after
that A is a longer domain name than B formed by adding one or letter case canonicalization). Let A > B mean that A is a
more whole labels on the left end of B. longer domain name than B formed by adding one or more whole
labels on the left end of B, i.e., A is a direct or indirect
subdomain of B
Let Static be the owner names of the set of staticly configured Let Static be the owner names of the set of staticly configured
trusted keys at a resolver. trusted keys at a resolver.
Then Sign is a valid signer name for a SIG authenticating data Then Signer is a valid signer name for a SIG authenticating data
(possibly a KEY RRset) with owner name Own at a resolver if any (possibly a KEY RRset) with owner name Owner at a resolver if
of the following three rules apply: any of the following three rules apply:
(1) Own > Sign except that if Sign is root (.), Own must be a (1) Owner > or = Signer (except that if Signer is root, Owner
top level domain name. must be root or a top level domain name).
(2) ( Own < or = Sign ) and ( Sign > some Static ). (2) ( Owner < or = Signer ) and ( Signer > some Static ).
(3) Sign = some Static. (3) Signer = some Static.
Rule 1 is the rule for descending the DNS tree and includes a special Rule 1 is the rule for descending the DNS tree and includes a special
prohibition on the root zone key due to the restriction that the root prohibition on the root zone key due to the restriction that the root
zone be only one label deep. zone be only one label deep. This is the most fundamental rule.
Rule 2 is the rule for ascending the DNS tree from one or more Rule 2 is the rule for ascending the DNS tree from one or more
staticly configured keys. Rule 2 has no effect if only root keys are staticly configured keys. Rule 2 has no effect if only root keys or
staticly configured. the meta-root key are staticly configured.
Rule 3 is a rule permitting direct cross certification. Rule 3 is a rule permitting direct cross certification. Rule 3 has
no effect if only root keys or the meta-root key are staticly
configured.
Great care should be taken that the consequences have been fully Great care should be taken that the consequences have been fully
considered before making any local policy adjustments to these rules. considered before making any local policy adjustments to these rules
(other than dispensing with rules 2 and 3 if only root keys or the
meta-root key are staticly configured).
6.3.2 Conflicting Data 6.3.2 Conflicting Data
It is possible that there will be multiple SIG-KEY chains that appear It is possible that there will be multiple SIG-KEY chains that appear
to authenticate conflicting RRset answers to the same query. A to authenticate conflicting RRset answers to the same query. A
resolver should choose only the most reliable answer to return and resolver should choose only the most reliable answer to return and
discard other data. This choice of most reliable is a matter of discard other data. This choice of most reliable is a matter of
local policy which could take into account differing trust in local policy which could take into account differing trust in
algorithms, key sizes, staticly configured keys, zones traversed, algorithms, key sizes, staticly configured keys, zones traversed,
etc. The technique given below is recommended for taking into etc. The technique given below is recommended for taking into
account SIG-KEY chain length. account SIG-KEY chain length.
A resolver should keep track of the number of successive secure zones A resolver should keep track of the number of successive secure zones
traversed from a staticly configured zone key starting point to any traversed from a staticly configured key starting point to any secure
secure zone it can reach. In general, the lower such a distance zone it can reach. In general, the lower such a distance number is,
number is, the greater the confidence in the data. Staticly the greater the confidence in the data. Staticly configured data
configured data should be given a distance number of zero. If a should be given a distance number of zero. If a query encounters
query encounters different Authenticated data for the same query with different Authenticated data for the same query with different
different distance values, that with a larger value should be ignored distance values, that with a larger value should be ignored unless
unless some other local policy covers the case. some other local policy covers the case.
A security conscious resolver should completely refuse to step from a A security conscious resolver should completely refuse to step from a
secure zone into a unsecured zone unless the unsecured zone is secure zone into a unsecured zone unless the unsecured zone is
certified to be non-secure by the presence of an authenticated KEY RR certified to be non-secure by the presence of an authenticated KEY RR
for the unsecured zone with the no-key type value. Otherwise the for the unsecured zone with the no-key type value. Otherwise the
resolver is getting bogus or spoofed data. resolver is getting bogus or spoofed data.
If legitimate unsecured zones are encountered in traversing the DNS If legitimate unsecured zones are encountered in traversing the DNS
tree, then no zone can be trusted as secure that can be reached only tree, then no zone can be trusted as secure that can be reached only
via information from such non-secure zones. Since the unsecured zone via information from such non-secure zones. Since the unsecured zone
data could have been spoofed, the "secure" zone reach via it could be data could have been spoofed, the "secure" zone reach via it could be
counterfeit. The "distance" to data in such zones or zones reached counterfeit. The "distance" to data in such zones or zones reached
via such zones could be set to 256 or more as this exceeds the via such zones could be set to 256 or more as this exceeds the
largest possible distance through secure zones in the DNS. largest possible distance through secure zones in the DNS.
Nevertheless, continuing to apply secure checks within "secure" zones
reached via unsecured zones is a good practice and will, as a
practical matter, provide some small increase in confidence.
6.4 Secure Time 6.4 Secure Time
Coordinated interpretation of the time fields in SIG RRs requires Coordinated interpretation of the time fields in SIG RRs requires
that reasonably consistent time be available to the hosts that reasonably consistent time be available to the hosts
implementing the DNS security extensions. implementing the DNS security extensions.
A variety of time synchronization protocols exist including the A variety of time synchronization protocols exist including the
Network Time Protocol (NTP, RFC 1305). If such protocols are used, Network Time Protocol (NTP [RFC 1305]). If such protocols are used,
they MUST be used securely so that time can not be spoofed. they MUST be used securely so that time can not be spoofed.
Otherwise, for example, a host could get its clock turned back and Otherwise, for example, a host could get its clock turned back and
might then believe old SIG RRs, and the data they authenticate, which might then believe old SIG RRs, and the data they authenticate, which
were valid but are no longer. were valid but are no longer.
7. ASCII Representation of Security RRs 7. ASCII Representation of Security RRs
This section discusses the format for master file and other ASCII This section discusses the format for master file and other ASCII
presentation of the three DNS security resource records. presentation of the three DNS security resource records.
The algorithm field in KEY and SIG RRs can be represented as either The algorithm field in KEY and SIG RRs can be represented as either
an unsigned integer or symbolicly. The following initial symbols are an unsigned integer or symbolicly. The following initial symbols are
defined as indicated: defined as indicated:
value symbol Value Symbol
001 RSAMD5 001 RSAMD5
002 DH
003 DSA
004 ECC
252 INDIRECT
253 NULL (obsolete, see RFC 2065) 253 NULL (obsolete, see RFC 2065)
254 PRIVATE 254 PRIVATE
7.1 Presentation of KEY RRs 7.1 Presentation of KEY RRs
KEY RRs may appear as single logical lines in a zone data master file KEY RRs may appear as single logical lines in a zone data master file
[RFC 1033]. [RFC 1033].
The flag field is represented as an unsigned integer or a sequence of The flag field is represented as an unsigned integer or a sequence of
mnemonics as follows: mnemonics as follows:
BIT Mnemonic Explanation BIT Mnemonic Explanation
0 NOAUTH authentication use prohibited 0-1 key type
1 NOCONF confidentiality use prohibited NOCONF =1 confidentiality use prohibited
NOAUTH =2 authentication use prohibited
NOKEY =3 no key present
2 FLAG2 - reserved 2 FLAG2 - reserved
3 EXTEND flags extension 3 EXTEND flags extension
4 FLAG4 - reserved 4 FLAG4 - reserved
5 FLAG5 -reserved 5 FLAG5 -reserved
6-7 name type 6-7 name type
USER =0 USER =0 (default, may be omitted)
ZONE =1 ZONE =1
HOST =2 (host or other end entity) HOST =2 (host or other end entity)
NTYP3 - reserved NTYP3 - reserved
8 FLAG8 - reserved 8 FLAG8 - reserved
9 FLAG9 - reserved 9 FLAG9 - reserved
10 FLAG10 - reserved 10 FLAG10 - reserved
11 FLAG11 - reserved 11 FLAG11 - reserved
12-15 signatory field, values 0 to 15 12-15 signatory field, values 0 to 15
can be represented by SIG0, SIG1, ... SIG15 can be represented by SIG0, SIG1, ... SIG15
The protocol octet can be represented as either an unsigned integer The protocol octet can be represented as either an unsigned integer
or symbolicly. The following initial symbols are defined: or symbolicly. The following initial symbols are defined:
000 NONE 000 NONE
001 TLS 001 TLS
002 EMAIL 002 EMAIL
003 DNSSEC 003 DNSSEC
004 IPSEC 004 IPSEC
255 ALL
Note that if the type field has the "no key" value (ie, both NOAUTH Note that if the type field has the NOKEY value, nothing appears
and NOCONF are on), nothing appears after the algorithm octet. after the algorithm octet.
The remaining public key portion is represented in base 64 (see The remaining public key portion is represented in base 64 (see
Appendix A) and may be divided up into any number of white space Appendix A) and may be divided up into any number of white space
separated substrings, down to single base 64 digits, which are separated substrings, down to single base 64 digits, which are
concatenated to obtain the full signature. These substrings can span concatenated to obtain the full signature. These substrings can span
lines using the standard parenthesis. lines using the standard parenthesis.
Note that the public key may have internal sub-fields but these do Note that the public key may have internal sub-fields but these do
not appear in the master file representation. For example, with not appear in the master file representation. For example, with
algorithm 1 there is a public exponent size, then a public exponent, algorithm 1 there is a public exponent size, then a public exponent,
skipping to change at page 40, line 8 skipping to change at page 40, line 8
NXT RRs do not appear in original unsigned zone master files since NXT RRs do not appear in original unsigned zone master files since
they should be derived from the zone as it is being signed. If a they should be derived from the zone as it is being signed. If a
signed file with NXTs added is printed or NXTs are printed by signed file with NXTs added is printed or NXTs are printed by
debugging code, they appear as the next domain name followed by the debugging code, they appear as the next domain name followed by the
RR type present bits in the same format as the WKS RR. RR type present bits in the same format as the WKS RR.
8. Canonical Form and Order of Resource Records 8. Canonical Form and Order of Resource Records
This section describes the canonical form of resource records (RRs), This section describes the canonical form of resource records (RRs),
their default name order, and their intra-RRset order, for purposes their default name order, and their order, for purposes of domain
of domain name system (DNS) security. A canonical name order is name system (DNS) security. A canonical name order is necessary to
necessary to construct the NXT name chain. A canonical form and construct the NXT name chain. A canonical form and ordering within
ordering within an RRset is necessary in constructing SIG RRs. There an RRset is necessary in constructing SIG RRs. A canonical ordering
is no requirement in DNS security for a canonical ordering of types of types within a name is required in connection with incremental
within a name so none is defined. transfer (Section 5.6.1).
8.1 Canonical RR Form 8.1 Canonical RR Form
For purposes of DNS security, the canonical form for an RR is the For purposes of DNS security, the canonical form for an RR is the
wire format of the RR with domain names (1) fully expanded (no name wire format of the RR with domain names (1) fully expanded (no name
compression via pointers), (2) all domain name letters set to lower compression via pointers), (2) all domain name letters set to lower
case, and (3) the original TTL substituted for the current TTL. case, (3) owner name wild cards in master file form (no substitution
made for *), and (4) the original TTL substituted for the current
TTL.
8.2 Canonical DNS Name Order 8.2 Canonical DNS Name Order
For purposes of DNS security, the canonical ordering of owner names For purposes of DNS security, the canonical ordering of owner names
is to sort labels as unsigned left justified octet strings where the is to sort individual labels as unsigned left justified octet strings
absence of a octet sorts before a zero value octet and upper case where the absence of a octet sorts before a zero value octet and
letters are treated as lower case letters. Names are then sorted by upper case letters are treated as lower case letters. Names are then
sorting on the highest level label and then, within those names with sorted by sorting on the highest level label and then, within those
the same highest level label by the next lower label, etc. down to names with the same highest level label by the next lower label, etc.
leaf node labels. Within a zone, the zone name itself always exists down to leaf node labels. Within a zone, the zone name itself always
and all other names are the zone name with some prefix of lower level exists and all other names are the zone name with some prefix of
labels. Thus the zone name itself always sorts first. lower level labels. Thus the zone name itself always sorts first.
Example: Example:
foo.example foo.example
a.foo.example a.foo.example
yljkjljk.a.foo.example yljkjljk.a.foo.example
Z.a.foo.example Z.a.foo.example
zABC.a.FOO.EXAMPLE zABC.a.FOO.EXAMPLE
z.foo.example z.foo.example
*.z.foo.example *.z.foo.example
\200.z.foo.example \200.z.foo.example
8.3 Canonical RR Ordering Within An RRset 8.3 Canonical RR Ordering Within An RRset
Within any particular owner name and type, RRs are sorted by RDATA as Within any particular owner name and type, RRs are sorted by RDATA as
a left justified unsigned octet sequence where the absence of an a left justified unsigned octet sequence where the absence of an
octet sorts before the zero octet. octet sorts before the zero octet.
8.4 Canonical Ordering of RR Types
When RRs of the same name but different types must be ordered, they
are ordered by type, considering the type to be an unsigned integer,
except that SIG RRs are placed immediately after the type they cover.
Thus, for example, an A record would be put before an MX record but
if both were signed, the order would be A < SIG(A) < MX < SIG(MX).
9. Conformance 9. Conformance
Levels of server and resolver conformance are defined below. Levels of server and resolver conformance are defined below.
9.1 Server Conformance 9.1 Server Conformance
Two levels of server conformance for DNS security are defined as Two levels of server conformance for DNS security are defined as
follows: follows:
BASIC: Basic server compliance is the ability to store and retrieve BASIC: Basic server compliance is the ability to store and retrieve
skipping to change at page 43, line 5 skipping to change at page 43, line 22
validity of resource records, including KEY resource records, validity of resource records, including KEY resource records,
retrieved from the DNS. They do not magically solve other security retrieved from the DNS. They do not magically solve other security
problems. For example, using secure DNS you can have high confidence problems. For example, using secure DNS you can have high confidence
in the IP address you retrieve for a host name; however, this does in the IP address you retrieve for a host name; however, this does
not stop someone for substituting an unauthorized host at that not stop someone for substituting an unauthorized host at that
address or capturing packets sent to that address and falsely address or capturing packets sent to that address and falsely
responding with packets apparently from that address. Any reasonably responding with packets apparently from that address. Any reasonably
complete security system will require the protection of many complete security system will require the protection of many
additional facets of the Internet. additional facets of the Internet.
References A number of precautions in DNS implementation have evolved over the
years to provide maximum resisitence of the insecure DNS against
[NETSEC] - Network Security: PRIVATE Communications in a PUBLIC spoofing. These precautions should not be abandoned but should be
World, Charlie Kaufman, Radia Perlman, & Mike Speciner, Prentice Hall considered to provide minor additional protection in case of key
Series in Computer Networking and Distributed Communications, 1995. compromise in secure DNS.
[PKCS1] - PKCS #1: RSA Encryption Standard, RSA Data Security, Inc., References
3 June 1991, Version 1.4.
[RFC 1032] - M. Stahl, "Domain Administrators Guide", November 1987. [RFC 1032] - M. Stahl, "Domain Administrators Guide", November 1987.
[RFC 1033] - M. Lottor, "Domain Administrators Operations Guide", [RFC 1033] - M. Lottor, "Domain Administrators Operations Guide",
November 1987. November 1987.
[RFC 1034] - P. Mockapetris, "Domain Names - Concepts and [RFC 1034] - P. Mockapetris, "Domain Names - Concepts and
Facilities", STD 13, November 1987. Facilities", STD 13, November 1987.
[RFC 1035] - P. Mockapetris, "Domain Names - Implementation and [RFC 1035] - P. Mockapetris, "Domain Names - Implementation and
Specifications", STD 13, November 1987. Specifications", STD 13, November 1987.
[RFC 1305] - Mills, D., "Network Time Protocol (v3)", March 1992. [RFC 1305] - D. Mills, "Network Time Protocol (v3)", March 1992.
[RFC 1321] - R. Rivest, "The MD5 Message-Digest Algorithm", April
1992.
[RFC 1530] - Malamud, C., and M. Rose, "Principles of Operation for [RFC 1530] - C. Malamud, and M. Rose, "Principles of Operation for
the TPC.INT Subdomain: General Principles and Policy", October 1993. the TPC.INT Subdomain: General Principles and Policy", October 1993.
[RFC 1750] - D. Eastlake, S. Crocker, and J. Schiller, "Randomness [RFC 1750] - D. Eastlake, S. Crocker, and J. Schiller, "Randomness
Requirements for Security", December 1994. Requirements for Security", December 1994.
[RFC 1825] - Atkinson, R., "Security Architecture for the Internet [RFC 1825] - Ran Atkinson, "Security Architecture for the Internet
Protocol", August 1995. Protocol", August 1995.
[RFC 1982] - R. Elz, R. Bush, "Serial Number Arithmetic", 09/03/1996. [RFC 1982] - Robert Elz, Rrandy Bush, "Serial Number Arithmetic",
09/03/1996.
[RFC 1995] - Ohta, M., "Incremental Zone Transfer in DNS", August [RFC 1995] - Masatka Ohta, "Incremental Zone Transfer in DNS", August
1996. 1996.
[RFC 2065] - D. Eastlake, C. Kaufman, "Domain Name System Security [RFC 2045] - N. Freed & N. Borenstein, "Multipurpose Internet Mail
Extensions", 01/03/1997. Extensions (MIME) Part One: Format of Internet Message Bodies",
November 1996.
[RFC 2065] - Donald Eastlake, Charles Kaufman, "Domain Name System
Security Extensions", 01/03/1997.
[RFC 2136] - P. Vixie, S. Thomson, Y. Rekhter, J. Bound, "Dynamic [RFC 2136] - P. Vixie, S. Thomson, Y. Rekhter, J. Bound, "Dynamic
Updates in the Domain Name System (DNS UPDATE)", 04/21/1997. Updates in the Domain Name System (DNS UPDATE)", 04/21/1997.
[RFC 2137] - D. Eastlake, "Secure Domain Name System Dynamic Update", [RFC 2137] - Donald Eastlake, "Secure Domain Name System Dynamic
04/21/1997. Update", 04/21/1997.
[RFC 2181] - Robert Elz, Randy Bush, "Clarifications to the DNS
Specification", July 1997.
[RFC xxx1] - draft-ietf-dnssec-rsa-*, "RSA/MD5 KEYs and SIGs in the
Domain Name System (DNS)".
[RFC xxx2] - draft-ietf-dnssec-dhk-*, "Storage of Diffie-Hellman Keys
in the Domain Name System (DNS)".
[RFC xxx3] - draft-ietf-dnssec-dss-*, "DSA KEYs and SIGs in the
Domain Name System (DNS)".
[RFC xxx4] - draft-ietf-dnssec-indirect-key-*, "Indirect KEY RRs in
the Domain Name System (DNS)".
[RSA FAQ] - RSADSI Frequently Asked Questions periodic posting. [RSA FAQ] - RSADSI Frequently Asked Questions periodic posting.
draft-ietf-tls-*.txt draft-ietf-tls-*.txt
Author's Addresses Author's Address
Donald E. Eastlake 3rd Donald E. Eastlake 3rd
CyberCash, Inc. CyberCash, Inc.
318 Acton Street 318 Acton Street
Carlisle, MA 01741 USA Carlisle, MA 01741 USA
Telephone: +1 978-287-4877 Telephone: +1 978-287-4877
+1 978-371-7148(fax) +1 978-371-7148(fax)
+1 703-620-4200(main office, Reston, Virginia, USA) +1 703-620-4200(main office, Reston, Virginia, USA)
EMail: dee@cybercash.com email: dee@cybercash.com
Expiration and File Name Expiration and File Name
This draft expires 20 May 1998. This draft expires July 1998.
Its file name is draft-ietf-dnssec-secext2-02.txt. Its file name is draft-ietf-dnssec-secext2-03.txt.
Appendix A: Base 64 Encoding Appendix A: Base 64 Encoding
The following encoding technique is taken from RFC 1521 by N. The following encoding technique is taken from [RFC 2045] by N.
Borenstein and N. Freed. It is reproduced here in an edited form for Borenstein and N. Freed. It is reproduced here in an edited form for
convenience. convenience.
A 65-character subset of US-ASCII is used, enabling 6 bits to be A 65-character subset of US-ASCII is used, enabling 6 bits to be
represented per printable character. (The extra 65th character, "=", represented per printable character. (The extra 65th character, "=",
is used to signify a special processing function.) is used to signify a special processing function.)
The encoding process represents 24-bit groups of input bits as output The encoding process represents 24-bit groups of input bits as output
strings of 4 encoded characters. Proceeding from left to right, a strings of 4 encoded characters. Proceeding from left to right, a
24-bit input group is formed by concatenating 3 8-bit input groups. 24-bit input group is formed by concatenating 3 8-bit input groups.
skipping to change at page 48, line 10 skipping to change at page 49, line 10
unit of encoded output will be two characters followed by two "=" unit of encoded output will be two characters followed by two "="
padding characters, or (3) the final quantum of encoding input is padding characters, or (3) the final quantum of encoding input is
exactly 16 bits; here, the final unit of encoded output will be three exactly 16 bits; here, the final unit of encoded output will be three
characters followed by one "=" padding character. characters followed by one "=" padding character.
Appendix B: Changes from RFC 2065 Appendix B: Changes from RFC 2065
This section summarizes the most important changes that have been This section summarizes the most important changes that have been
made since RFC 2065. made since RFC 2065.
1. Most of Section 7 of RFC 2065 called "Operational Considerations", 1. Most of Section 7 of [RFC 2065] called "Operational
has been removed and may be made into a separate document. Considerations", has been removed and may be made into a separate
document.
2. The KEY RR has been changed by (2a) eliminating the "experimental" 2. The KEY RR has been changed by (2a) eliminating the "experimental"
flag as unnecessary, (2b) reserving a flag bit for flags flag as unnecessary, (2b) reserving a flag bit for flags
expansion, (2c) more compactly encoding a number of bit fields in expansion, (2c) more compactly encoding a number of bit fields in
such a way as to leave unchanged bits actually used by the limited such a way as to leave unchanged bits actually used by the limited
code currently deployed, (2d) eliminating the IPSEC and email flag code currently deployed, (2d) eliminating the IPSEC and email flag
bits which are replaced by reserved values of the protocol field, bits which are replaced by values of the protocol field and adding
and (2e) for the RSA MD5 algorithm increasing the maximum required a protocol field value for dnssec, (2e) adding material to
key modulus size implementation to 4096 bits. Section 3.4 indicate that zone KEY RRs occur only at delegation points, and
describing the meaning of various combinations of "no-key" and key (2f) removing the description of the RSA/MD5 algorithm to a
present KEY RRs has been added. separate document. Section 3.4 describing the meaning of various
combinations of "no-key" and key present KEY RRs has been added.
3. The SIG RR has been changed by (3a) clarifying that signature 3. The SIG RR has been changed by (3a) renaming the "time signed"
expiration and date signed used serial number ring arithmetic, and field to be the "signature inception" field, (3b) clarifying that
(3b) changing the definition of the key footprint/tag for signature expiration and inception used serial number ring
algorithms other than 1 (i.e., algorithms to be defined in the arithmetic, (3c) changing the definition of the key footprint/tag
for algorithms other than 1 (i.e., algorithms to be defined in the
future) and adding Appendix C to document its calculation. In future) and adding Appendix C to document its calculation. In
addition, the SIG covering type AXFR has been eliminated. addition, the SIG covering type AXFR has been eliminated while one
covering IXFR has been added.
5. Both the KEY and SIG RR definitions have been simplified by 4. Algorithm 3, the DSA algorithm, is designated as the mandatory to
eliminating the "null" algorithm 253 as defined in RFC 2065. That implement algorithm. Algorithm 1, the RSA/MD5 algorithm, is now a
algorithm had been included because at the time it was thought it recommended option. Both the KEY and SIG RR definitions have been
might be useful in DNS dynamic update [RFC 2136]. It was in fact simplified by eliminating the "null" algorithm 253 as defined in
not so used and it is dropped to simplify DNS security. [RFC 2065]. That algorithm had been included because at the time
it was thought it might be useful in DNS dynamic update [RFC
2136]. It was in fact not so used and it is dropped to simplify
DNS security.
6. The NXT RR has been changed so that (6a) the NXT RRs in a zone 5. The NXT RR has been changed so that (5a) the NXT RRs in a zone
cover all names, including wildcards as literal names without cover all names, including wildcards as literal names without
expansion, (6b) all NXT bit map areas whose first octet has bit expansion, except for glue address records whose names would not
zero set have been reserved for future definition, (6c) extending otherwise appear, (5b) all NXT bit map areas whose first octet has
the number of and circumsatnces under which an NXT must be bit zero set have been reserved for future definition, and (5c)
returned in connection with wildcard names, and (6d) additional extending the number of and circumstances under which an NXT must
minor changes made to assure a unique encoding of RR type be returned in connection with wildcard names.
combinations currently existing int he DNS.
7. Information on the canonical form and ordering of RRs has been 6. Information on the canonical form and ordering of RRs has been
moved into a separate section, number 8. moved into a separate Section 8.
8. A subsection covering incremental and full zone transfer has been 7. A subsection covering incremental and full zone transfer has been
added in Section 5. added in Section 5.
9. Further specification and policy recommendations on secure 8. Concerning DNS chaining: Further specification and policy
resolution have been added, primarily in section 6.3.1. recommendations on secure resolution have been added, primarily in
Section 6.3.1. That authenticated data has a validity period of
the intersection of the validity periods of the SIG RRs in its
authentication chain was clarified. The requirement to staticly
configure a superzone's key signed by a zone in all of the zone's
authoritative servers has been relaxed in cases where the public
key for that zone and all of its direct and indirect subzones will
never be staticly configured. The recommendation was dropped to
continue DNS security checks in a secure island of DNS data that
is separated from other parts of the DNS tree by insecure zones
and does not contain a zone for which a key has been staticly
configured.
9. The concept of a meta-root key has been added in Section 4.5.
10. That the presence of the AD bit in a response does not apply to
the additional information section or to glue address or
delegation point NS RRs was clarified.
Appendix C: Key Tag Calculation Appendix C: Key Tag Calculation
The key tag field in the SIG RR is just a means of more efficiently The key tag field in the SIG RR is just a means of more efficiently
selecting the correct KEY RR to use in verifying the signature when selecting the correct KEY RR to use in verifying the signature when
there is more than one KEY RR candidate. It is possible for more there is more than one KEY RR candidate. It is possible for more
than one candidate key to have the same tag, in which case each must than one candidate key to have the same tag, in which case each must
be tried in verifying the signature until one works or all fail. The be tried in verifying the signature until one works or all fail. The
following reference implementation is in ANSI C. It is not coded for following reference implementation is in ANSI C. It is coded for
efficiency. clarity, not efficiency.
/* assumes int is at least 16 bits /* assumes int is at least 16 bits
first byte of tag is most significant byte of return value first byte of key tag is the most significant byte of return value
second byte of tag is least significatn byte of return value */ second byte of key tag is the least significant byte of return value */
int keytag ( int keytag (
unsigned char key[], /* the RDATA part of the KEY RR */ unsigned char key[], /* the RDATA part of the KEY RR */
unsigned int keysize, /* the RDLENGTH */ unsigned int keysize, /* the RDLENGTH */
) )
{ {
long int ac; /* assumed to be 32 bits or larger */ long int ac; /* assumed to be 32 bits or larger */
for ( ac = 0, i = 0; i < keysize; ++i ) for ( ac = 0, i = 0; i < keysize; ++i )
ac += (i&1) ? key[i] : key[i]<<8; ac += (i&1) ? key[i] : key[i]<<8;
 End of changes. 143 change blocks. 
484 lines changed or deleted 564 lines changed or added

This html diff was produced by rfcdiff 1.34. The latest version is available from http://tools.ietf.org/tools/rfcdiff/