draft-ietf-dnssec-secext-02.txt   draft-ietf-dnssec-secext-03.txt 
INTERNET-DRAFT DNS Protocol Security Extensions DNS Security Working Group Donald E. Eastlake, 3rd
20 November 1994 INTERNET-DRAFT DEC
Charles W. Kaufman
Iris
Domain Name System Protocol Security Extensions Domain Name System Protocol Security Extensions
------ ---- ------ -------- -------- ---------- ------ ---- ------ -------- -------- ----------
Donald E. Eastlake 3rd & Charles W. Kaufman
Status of This Document Status of This Document
This draft, file name draft-ietf-dnssec-secext-02.txt, is intended to This draft, file name draft-ietf-dnssec-secext-03.txt, is intended to
be become a standards track RFC. Distribution of this document is be become a proposed standard RFC. Distribution of this document is
unlimited. Comments should be sent to the DNS Security Working Group unlimited. Comments should be sent to the DNS Security Working Group
mailing list <dns-security@tis.com> or to the authors. mailing list <dns-security@tis.com> or to the authors.
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
``working draft'' or ``work in progress.'' ``working draft'' or ``work in progress.''
To learn the current status of any Internet-Draft, please check the To learn the current status of any Internet-Draft, please check the
1id-abstracts.txt listing contained in the Internet-Drafts Shadow 1id-abstracts.txt listing contained in the Internet-Drafts Shadow
Directories on ds.internic.net, nic.nordu.net, ftp.isi.edu, or Directories on ds.internic.net, nic.nordu.net, ftp.isi.edu,
munnari.oz.au. munnari.oz.au, or ftp.is.co.za.
INTERNET-DRAFT DNS Protocol Security Extensions
Abstract Abstract
The Domain Name System (DNS) has become a critical operational part The Domain Name System (DNS) has become a critical operational part
of the Internet infrastructure yet it has no strong security of the Internet infrastructure yet it has no strong security
mechanisms to assure data integrity or authentication. Extensions to mechanisms to assure data integrity or authentication. Extensions to
the DNS are described in detail that provide these services to the DNS are described that provide these services to security aware
security aware resolvers or applications through the use of resolvers or applications through the use of cryptographic digital
cryptographic digital signatures. These digital signatures are signatures. These digital signatures are included in secured zones
included in secured zones as resource records. Security can still be as resource records. Security can still be provided even through
provided even through non-security aware DNS servers. non-security aware DNS servers.
A explanatory overview of the proposed extensions appears in draft-
ietf-dnssec-over-*.txt.
The extensions also provide for the storage of authenticated keys in The extensions also provide for the storage of authenticated public
the DNS for DNS use and to support a general public key distribution keys in the DNS. This storage of keys can support a general public
service. The stored keys enable security aware resolvers to learn key distribution service as well as DNS security. The stored keys
the authenticating key of zones in addition to keys for which they enable security aware resolvers to learn the authenticating key of
are initially configured. Keys associated with DNS names can be zones in addition to keys for which they are initially configured.
retrieved to support other protocols. Provision is made for a Keys associated with DNS names can be retrieved to support other
variety of key types and algorithms. protocols. Provision is made for a variety of key types and
algorithms.
In addition, the security extensions provide for the optional In addition, the security extensions provide for the optional
authentication of DNS protocol transactions. authentication of DNS protocol transactions.
Acknowledgements Acknowledgements
The significant contributions of the following persons (in alphabetic The significant contributions of the following persons (in alphabetic
order) to this draft are gratefully acknowledged: Madelyn Badger, order) to this draft are gratefully acknowledged: Madelyn Badger,
James M. Galvin, Olafur Gudmundsson, Sandy Murphy, Masataka Ohta, Matt Crawford, James M. Galvin, Olafur Gudmundsson, Sandy Murphy,
Jeffrey I. Schiller. Masataka Ohta, Michael A. Patton, Jeffrey I. Schiller.
INTERNET-DRAFT DNS Protocol Security Extensions
Table of Contents Table of Contents
Status of This Document....................................1 Status of This Document....................................1
Abstract...................................................2 Abstract...................................................2
Acknowledgements...........................................2 Acknowledgements...........................................2
Table of Contents..........................................3 Table of Contents..........................................3
1. Introduction............................................5 1. Introduction............................................5
2. Brief Overview of the Extensions.......................6 2. Brief Overview of the Extensions.......................6
2.1 Key Distribution.......................................6 2.1 Services Not Provided..................................6
2.2 Data Origin Authentication.............................6 2.2 Key Distribution.......................................6
2.2.1 Security Provided...................................6 2.3 Data Origin Authentication and Integrity...............7
2.2.2 The SIG Resource Record..............................7 2.3.2 The SIG Resource Record..............................7
2.2.3 The NXD Resource Record..............................7 2.3.3 Authenticating Name Non-existence....................8
2.2.4 Signers Other Than The Zone..........................8 2.3.5 Special Problems With Time-to-Live...................8
2.2.5 Special Problems With Time-to-Live...................8 2.3.5 Signers Other Than The Zone..........................9
2.3 DNS Transaction Authentication.........................8 2.4 DNS Transaction Authentication.........................9
3. The KEY Resource Record................................10 3. The KEY Resource Record................................10
3.1 KEY RDATA format......................................10 3.1 KEY RDATA format......................................10
3.2 Object Types and DNS Names and Keys...................11 3.2 Object Types and DNS Names and Keys...................10
3.3 The KEY RR Flag Octet.................................11 3.3 The KEY RR Flag Octet.................................11
3.4 The KEY Algorithm Version.............................12 3.4 The KEY Algorithm Version and MD5/RSA Algorithm.......12
3.5 KEY RRs in the Construction of Responses..............13 3.5 KEY RRs in the Construction of Responses..............13
3.6 File Representation of KEY RRs........................13 3.6 File Representation of KEY RRs........................14
4. The SIG Resource Record................................15 4. The SIG Resource Record................................15
4.1 SIG RDATA Format......................................15 4.1 SIG RDATA Format......................................15
4.1.1 Signature Format....................................17 4.1.1 Signature Format....................................17
4.1.2 SIG RRs Covering Type ANY...........................18 4.1.2 SIG RRs Covering Type ANY...........................18
4.1.3 Zone Transfer (AXFR) SIG............................18 4.1.3 Zone Transfer (AXFR) SIG............................18
4.1.4 Transaction SIGs....................................18 4.1.4 Transaction SIGs....................................19
4.2 SIG RRs in the Construction of Responses..............19 4.2 SIG RRs in the Construction of Responses..............19
4.3 Processing Responses with SIG RRs.....................19 4.3 Processing Responses with SIG RRs.....................20
4.4 File Representation of SIG RRs........................20 4.4 File Representation of SIG RRs........................21
5. Non-existent Names.....................................22 5. Non-existent Names.....................................22
5.1 The NXD Resource Record...............................22 5.1 The NXD Resource Record...............................22
5.2 NXD RDATA Format......................................23 5.2 NXD RDATA Format......................................23
5.3 Example...............................................23 5.3 Example...............................................23
5.4 Interaction of NXD RRs and Wildcard RRs...............23 5.4 Interaction of NXD RRs and Wildcard RRs...............23
5.5 Blocking NXD Pseudo-Zone Transfers....................24 5.5 Blocking NXD Pseudo-Zone Transfers....................24
6. How to Resolve Securely................................25 6. How to Resolve Securely................................25
6.1 Boot File Format......................................25 6.1 Boot File Format......................................25
6.2 Chaining Through Zones................................26 6.2 Chaining Through Zones................................25
6.3 Secure Time...........................................27 6.3 Secure Time...........................................27
INTERNET-DRAFT DNS Protocol Security Extensions
7. Operational Considerations.............................28 7. Operational Considerations.............................28
7.1 Key Size Considerations...............................28 7.1 Key Size Considerations...............................28
7.2 Key Storage...........................................28 7.2 Key Storage...........................................28
7.3 Key Generation........................................29 7.3 Key Generation........................................29
7.4 Key Lifetimes.........................................29 7.4 Key Lifetimes.........................................29
7.5 Revocation............................................29 7.5 Signature Lifetime....................................30
7.6 Root..................................................30 7.6 Root..................................................30
8. Conformance............................................31 8. Conformance............................................31
8.1 Server Conformance....................................31 8.1 Server Conformance....................................31
8.2 Resolver Conformance..................................31 8.2 Resolver Conformance..................................31
9. Security Considerations................................32 9. Security Considerations................................32
References................................................32 References................................................32
Authors Addresses.........................................33 Authors Addresses.........................................33
Expiration and File Name..................................33 Expiration and File Name..................................33
INTERNET-DRAFT DNS Protocol Security Extensions Appendix: Base 64 Encoding................................34
1. Introduction 1. Introduction
This draft provides detailed descriptions of the DNS protocol This draft describes extensions of the DNS protocol to support DNS
extensions to support DNS security and public key distribution. security and public key distribution.
A broad overview of these extensions is provided in draft-ietf-
dnssec-over-*.txt. This draft assumes that the reader is familiar
with that overview and with the Domain Name System particularly as
described in RFCs 1034 and 1035. The requirements and goals of DNS
security are described in the overview document.
INTERNET-DRAFT DNS Protocol Security Extensions This draft assumes that the reader is familiar with the Domain Name
System, particularly as described in RFCs 1034 and 1035.
2. Brief Overview of the Extensions 2. Brief Overview of the Extensions
The DNS protocol extensions provide three distinct services: key The DNS protocol extensions provide three distinct services: key
distribution as described in section 2.1 below, data origin distribution as described in section 2.2 below, data origin
authentication as described in section 2.2 below, and transaction authentication as described in section 2.3 below, and transaction
authentication, described in section 2.3 below. authentication, described in section 2.4 below.
2.1 Key Distribution 2.1 Services Not Provided
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.
Following this philosophy, no attempt has been made to include any
sort of access control lists or other means to differentiate
inquirers.
In addition, no effort has been made to provide for any
confidentiality for queries or responses. (This service may be
available via an IP network level security protocol for which there
is current an IETF working group.)
2.2 Key Distribution
The resource records are defined to associate keys with DNS names. The resource records are defined to associate keys with DNS names.
This permits the DNS to be used as a general public key distribution This permits the DNS to be used as a general public key distribution
mechanism in support of the data origin authentication and mechanism in support of the data origin authentication and
transaction authentication DNS services as well as other security transaction authentication DNS services as well as other security
services such as IP level security. services such as IP level security.
The syntax of a KEY resource record is described in Section 3. It The syntax of a KEY resource record is described in Section 3. It
includes the name of the entity the key is associated with includes the name of the entity the key is associated with
(frequently but not always the KEY RR owner name), an algorithm (frequently but not always the KEY resource record owner name), an
identifier, flags indicating the type of entity the key is associated algorithm identifier, flags indicating the type of entity the key is
with or asserting that there is no key associated with that entity, associated with and/or asserting that there is no key associated with
and the actual public key parameters. that entity, and the actual public key parameters.
2.2 Data Origin Authentication
Adding security requires no change to the "on-the-wire" DNS protocol
beyond the addition of the signature resource types (and, as a
practical matter, the key resource type needed for key distribution).
An additional domain name non-existence resource is added to extend
authentication to negative responses. This service can be supported
by existing resolver and server implementations so long as they could
support the additional resource types.
If signatures are always separately retrieved and verified when Under conditions described in Section 3, security aware DNS servers
retrieving the information they authenticate, there will be more will automatically attempt to return KEY resources as additional
trips to the server and performance will suffer. To avoid this, information, along with those actually requested, to minimize query
security aware servers mitigate that degradation by automatically traffic.
send exactly the signature(s) needed.
2.2.1 Security Provided 2.3 Data Origin Authentication and Integrity
Security is provided by associating with resource records in the DNS Security is provided by associating with resource records in the DNS
a cryptographically generated digital signature. Commonly, there cryptographically generated digital signatures. Commonly, there will
will be a single private key that signs for an entire zone. If a be a single private key that signs for an entire zone. If a security
security aware resolver reliably learns the public key of the zone, aware resolver reliably learns the public key of the zone, it can
verify that all the data read was properly authorized and is
INTERNET-DRAFT DNS Protocol Security Extensions
it can verify that all the data read was properly authorized and is
reasonably current. The expected implementation is for the zone reasonably current. The expected implementation is for the zone
private key to be kept off-line and used to re-sign all of the private key to be kept off-line and used to re-sign all of the
records in the zone periodically. records in the zone periodically.
The data origin authentication key belongs to the zone and not to the The data origin authentication key belongs to the zone and not to the
servers that store copies of the data. That means compromise of a servers that store copies of the data. That means compromise of a
server or even all servers for a zone will not affect the degree of server or even all servers for a zone will not affect the degree of
assurance that a resolver has that the data is genuine. assurance that a resolver has that the data is genuine.
A resolver can learn the public key of a zone either by reading it A resolver can learn the public key of a zone either by reading it
skipping to change at page 7, line 30 skipping to change at page 7, line 34
Thus, to provide a reasonable degree of security, the resolver must Thus, to provide a reasonable degree of security, the resolver must
be configured with at least the public key of one zone. From that, be configured with at least the public key of one zone. From that,
it can securely read the public keys of other zones if the it can securely read the public keys of other zones if the
intervening zones in the DNS tree are secure. It is in principle intervening zones in the DNS tree are secure. It is in principle
more secure to have the resolver manually configured with the public more secure to have the resolver manually configured with the public
keys of multiple zones, since then the compromise of a single zone keys of multiple zones, since then the compromise of a single zone
would not permit the faking of information from other zones. It is would not permit the faking of information from other zones. It is
also more administratively cumbersome, however, particularly when also more administratively cumbersome, however, particularly when
public keys change. public keys change.
2.2.2 The SIG Resource Record Adding origin authentication and integrity requires no change to the
"on-the-wire" DNS protocol beyond the addition of the signature
resource types (and, as a practical matter, the key resource type
needed for key distribution). This service can be supported by
existing resolver and server implementations so long as they could
support the additional resource types.
If signatures are always separately retrieved and verified when
retrieving the information they authenticate, there will be more
trips to the server and performance will suffer. To avoid this,
security aware servers mitigate that degradation by automatically
sending exactly the signature(s) needed.
2.3.2 The SIG Resource Record
The syntax of a SIG resource record (signature) is described in The syntax of a SIG resource record (signature) is described in
Section 4. It includes the type of the RR(s) being signed, the name Section 4. It includes the type of the RR(s) being signed, the name
of the signer, the time at which the signature was created, the time of the signer, the time at which the signature was created, the time
it expires (when it is no longer to be believed), its original time it expires (when it is no longer to be believed), its original time
to live (which may be longer than its current time to live but cannot to live (which may be longer than its current time to live but cannot
be shorter), the cryptographic algorithm in use, and the actual be shorter), the cryptographic algorithm in use, and the actual
signature. signature.
Every name in a zone supporting signed data will have associated with Every name in a zone supporting signed data will have associated with
it a SIG resource records for each resource type under that name. A it at least one SIG resource record for each resource type under that
security aware server supporting the performance enhanced version of name. A security aware server supporting the performance enhanced
the DNS protocol security extensions will return with all records version of the DNS protocol security extensions will attempt to
retrieved the corresponding SIGs. If a server does not support the return, with all records retrieved, the corresponding SIGs. If a
protocol, the resolver must retrieve all the SIG records for a name server does not support the protocol, the resolver must retrieve all
and select the one or ones that sign the resource record(s) that the SIG records for a name and select the one or ones that sign the
resolver is interested in. resource record(s) that resolver is interested in.
2.2.3 The NXD Resource Record 2.3.3 Authenticating Name Non-existence
The above security mechanism provides only a way to sign existing RRs The above security mechanism provides only a way to sign existing RRs
in a zone. Data origin authentication is not obviously provided for in a zone. Data origin authentication is not obviously provided for
INTERNET-DRAFT DNS Protocol Security Extensions
the non-existence of a domain name in a zone. This gap is filled by the non-existence of a domain name in a zone. This gap is filled by
the NXD RR which authenticatably asserts a range of non-existent the NXD RR which authenticatably asserts a range of non-existent
names in a zone. The owner of the NXD RR is the start of such a names in a zone. The owner of the NXD RR is the start of such a
ranger and its RDATA is the end of the range; however, there are ranger and its RDATA is the end of the range; however, there are
additional complexities due to wildcards. Section 6 below covers the additional complexities due to wildcards.
NXD RR.
2.2.4 Signers Other Than The Zone
There are two general cases where a signature is generated by other Section 6 below covers the NXD RR.
than the zone private key. One is for future support of dynamic
update where an entity is permitted to authenticate/update its own
record. The public key of 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. The other is for support of transaction authentication
as described in 2.3 below.
2.2.5 Special Problems With Time-to-Live 2.3.5 Special Problems With Time-to-Live
A digital signature will fail to verify if any change has occurred to A digital signature will fail to verify if any change has occurred to
the data between the time it was originally signed and the time the the data between the time it was originally signed and the time the
signature is verified. This conflicts with our desire to have the signature is verified. This conflicts with our desire to have the
time-to-live field tick down when resource records are cached. time-to-live field tick down when resource records are 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 secondaries to set signature, but that would allow unscrupulous secondaries to set
arbitrarily long time to live values undetected. Instead, we include arbitrarily long time to live values undetected. Instead, we include
the "original" time-to-live in the signature and communicate that the "original" time-to-live in the signature and communicate that
data in addition to the current time-to-live. Unscrupulous servers data in addition to the current time-to-live. Unscrupulous servers
under this scheme can manipulate the time to live but a security under this scheme can manipulate the time to live but a security
aware resolver will bound the TTL value it uses at the original aware resolver will bound the TTL value it uses at the original
signed value. Separately, signatures include a time signed and an signed value. Separately, signatures include a time signed and an
expiration time. A resolver that knows an absolute time can expiration time. A resolver that knows an absolute time can
determine securely whether a signature has expired. determine securely whether a signature has expired. It is not
possible to rely solely on the signature expiration as a substitute
for the TTL, however, singe non-security aware servers must still be
supported.
2.3 DNS Transaction Authentication 2.3.5 Signers Other Than The Zone
There are two general cases where a SIG resource record is signed by
other than the zone private key. One is for future support of
dynamic update where an entity is permitted to authenticate/update
its own records. The public key of 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. The other is for support of transaction
authentication as described in Section 2.3 below.
2.4 DNS Transaction Authentication
The data origin authentication service described above protects The data origin authentication service described above protects
resource records but provides no protection for message headers. If resource records but provides no protection for DNS message headers.
header bits are falsely set by a server, there is little that can be If header bits are falsely set by a server, there is little that can
done. However, it is possible to add transaction authentication. be done. However, it is possible to add transaction authentication.
Such authentication means that a resolver can be sure it is getting Such authentication means that a resolver can be sure it is getting
messages from the server it thinks it queried and that the response messages from the server it thinks it queried and that the response
is from the query it sent and that these messages have not been is from the query it sent and that these messages have not been
INTERNET-DRAFT DNS Protocol Security Extensions
diddled in transit. diddled in transit.
This is accomplished by optionally adding a special SIG resource This is accomplished by optionally adding a special SIG resource
record to end of the reply which digitally signs the concatenation of record to the end of the reply which digitally signs the
the server's response and the resolver's query. The private key used concatenation of the server's response and the resolver's query. The
belongs to the host composing the reply, not to the zone being private key used belongs to the host composing the reply, not to the
queried. The corresponding public key is stored in and retrieved zone being queried. The corresponding public key is stored in and
from the DNS. Because replies are highly variable, message retrieved from the DNS. Because replies are highly variable, message
authentication SIGs can not be precalculated. 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.
The best way to get the security provided by the transaction DNS level transaction authentication would be unnecessary if a lower
authentication service would be to use a good IP level security level (i.e., IP level) end-to-end security protocol were available.
protocol. The authors of this draft decry the every growing number However, such a protocol is not yet standardized and when it is,
of IP application level security protocols such as Telnet, NTP, FTP, there will be a considerable time during which there will be systems
etc., etc. when a single IP-security protocol could secure most of on which it will be hard to add IPSEC but relatively easy to replace
these applications. the DNS components.
Unfortunately, an IP-security standard has not yet been adopted. And
even if it had, there will be many systems for many years where it
will be hard to add IP security but relatively easy to replace the
DNS components. Furthermore, the data origin authentication service
requires the implementation of essentially all the mechanisms needed
for a rudimentary message authentication service. Thus a simple
transaction authentication service based on mechanisms already
required by DNS security is included as a strictly optional part of
these extensions.
INTERNET-DRAFT DNS Protocol Security Extensions
3. The KEY Resource Record 3. The KEY Resource Record
The KEY RR is used to document a key that is associated with a DNS The KEY RR is used to document a key that is associated with a DNS
name. It will be a public key as only public keys are stored in the name. It will be a public key as only public keys are stored in the
DNS. This can be the public key of a zone owner, of a host or other DNS. This can be the public key of a zone owner, of a host or other
end entity, or a user. A KEY RR is, like any other RR, authenticated end entity, or a user. A KEY RR is, like any other RR, authenticated
by a SIG RR. Security aware DNS implementations should be designed by a SIG RR. Security aware DNS implementations should be designed
to handle at least two simultaneously valid keys of the same type to handle at least two simultaneously valid keys of the same type
associated with a name. associated with a name.
The type number for the KEY RR is 25. The type number for the KEY RR is 25.
3.1 KEY RDATA format 3.1 KEY RDATA format
The RDATA for a KEY RR consists of an object name, flags, the The RDATA for a KEY RR consists of an object name, flags, the
algorithm version, and the public key itself. For the MD5/RSA algorithm version, and the public key itself. The format is as
algorithm, that is the public exponent and the public modulus. The follows:
format is as follows:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| / | /
+- object name +---------------+ +- object name +---------------+---------------+
/ | flags | / | flags | algorithm |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| algorithm | public key exponent |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| modulus length| | | /
+---------------+ public key modulus -+ + - public key /
/ / / /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-/
The object name, and the flags octets are described in Sections 3.2 The object name, and the flags octets are described in Sections 3.2
and 3.3 below. The flags must be examined before any following data and 3.3 below respectively. The flags must be examined before any
as they control its the format and even whether there is any following data as they control the format and even whether there is
following data. any following data. The algorithm and public key fields are
described in Section 3.4. The format of the public key is algorithm
The public key exponent and modulus length fields show apply only if dependent.
the MD5/RSA algorithm is in use and a key is present. The public key
exponent is an unsigned 24 bit integer. The public key modulus field
is a multiprecision unsigned integer. The "modulus length" is an
unsigned octet which is the actual modulus length minus 64. This
limits keys to a maximum of 255+64 or 319 octets and a minimum of 64
octets. Although moduluses of less than 512 significant bits are not
recommended, due to the weak security they provide, they can be
represented by using leading zeros.
INTERNET-DRAFT DNS Protocol Security Extensions
3.2 Object Types and DNS Names and Keys 3.2 Object Types and DNS Names and Keys
The public key in a KEY RR belongs to the object named in the object The public key in a KEY RR belongs to the object named in the object
name field. Frequently this will also be the owner name of the KEY name field. Frequently this will also be the owner name of the KEY
RR. But they will be different in the case of the key or keys stored RR. But they will be different in the case of the key or keys stored
under a zone's name for the zone's superzone or keys that are stored under a zone's name for the zone's superzone or keys that are stored
for cross certification. for cross certification of other zones.
The DNS object name may refer to up to three things. For example, The DNS object name may refer to up to three different things. For
dee.lkg.dec.com could be (1) a zone, (2) a host, and (3) the mapping example, dee.lkg.dec.com could be (1) a zone, (2) a host or other end
into a DNS name of the user dee@lkg.dec.com . Thus, there are flags entity , and (3) the mapping into a DNS name of the user or account
in the KEY RR to indicate with which of these roles the object name dee@lkg.dec.com . Thus, there are flags in the KEY RR to indicate
and public key are associated as described below. It is possible to with which of these roles the object name and public key are
use the same key for these different things with the same name but associated as described below.
this is discouraged.
In addition, there are three control bits, the "no key" bit, the Although the same name can be used for up to all three of these
"experimental" bit, and the "signatory" bit, as described in 3.3 contexts, such overloading of a name is discouraged. It is also
below. possible to use the same key for different things with the same name
or even different names, but this is strongly discouraged. In
particular, the use of a zone key as a non-zone key will usually
require that the private key be kept on line and thereby become much
more vulnerable.
It would be desirable for the growth of DNS to be managed so that It would be desirable for the growth of DNS to be managed so that
additional possible simultaneous uses for names are NOT added. New additional possible simultaneous uses for names are NOT added. New
uses should be distinguished by exclusive domains. For example, all uses should be distinguished by exclusive domains. For example, all
IP autonomous system numbers have been mapped into the in-as.arpa IP autonomous system numbers have been mapped into the in-as.arpa
domain [draft-ietf-dnssec-as-map-*.txt] and all telephone numbers in domain [draft-ietf-dnssec-as-map-*.txt] and all telephone numbers in
the world have been mapped into the tpc.int domain [...]. This is the world have been mapped into the tpc.int domain [RFC 1530]. This
preferable to having the same name possibly be an autonomous system is much preferable to having the same name possibly be an autonomous
number, telephone number, and/or host as well as a zone and a user. system number, telephone number, and/or host as well as a zone and a
user.
In addition to the name type bits, there are three control bits, the
"no key" bit, the "experimental" bit, and the "signatory" bit, as
described below.
3.3 The KEY RR Flag Octet 3.3 The KEY RR Flag Octet
In the "flags" field: In the "flags" field:
Bit 0 is the "no key" bit. If this bit is on, there is no key Bit 0 is the "no key" bit. If this bit is on, there is no key
information and the RR stopw with the flags octet. information and the RR stops with the flags octet. By the use of
this bit, a signed KEY RR can authenticatably assert that, for
example, a zone is not secured.
Bits 1 is the "experimental" bit. Keys may be associated with Bits 1 is the "experimental" bit. Keys may be associated with
zones or entities for experimental, trial, or optional use, in which zones, entities, or users for experimental, trial, or optional use,
case this bit will be one. If this bit is a zero, it means that the in which case this bit will be one. If this bit is a zero, it means
use or availability of security based on the key is "mandatory". that the use or availability of security based on the key is
Thus, if this bit is off for a zone, the zone should be assumed "mandatory". Thus, if this bit is off for a zone, the zone should be
secured by SIG RRs and any responses indicating the zone is not assumed secured by SIG RRs and any responses indicating the zone is
secured should be considered bogus. Similarly, if this bit were off not secured should be considered bogus. Similarly, if this bit were
for a host key and attempts to negotiate IP-security with the host off for a host key and attempts to negotiate IP-security with the
produced indications that IP-security was not supported, it should be host produced indications that IP-security was not supported, it
assumed that the host has been compromised or communications with it should be assumed that the host has been compromised or
are being spoofed. On the other hand, if this bit were a one, the communications with it are being spoofed. On the other hand, if this
host might very well sometimes operate in a secure mode and at other bit were a one, the host might very well sometimes operate in a
secure mode and at other times operate without the availability of
INTERNET-DRAFT DNS Protocol Security Extensions IP-security. The experimental bit, like all other aspects of the KEY
RR, is only effective if the KEY RR is appropriately signed by a SIG
times operate without the availability of IP-security. The RR. The experimental bit must be zero for safe secure operation and
experimental bit, like all other aspects of the KEY RR, is only should only be a one for a minimal transition period.
effective if the KEY RR is appropriately signed by a SIG RR.
Bit 2 is the "signatory" bit. It indicates that the key can Bit 2 is the "signatory" bit. It indicates that the key can
validly sign RRs of the same name. If the owner name is a wildcard, validly sign RRs of the same name. If the owner name is a wildcard,
then RRs with any name which is in the wildcard's scope can be signed then RRs with any name which is in the wildcard's scope can be signed
including NS and corresponding KEY RRs to carve out a subzone. This including NS and corresponding zone KEY RRs to carve out a subzone.
bit is meaningless for zone keys which always have authority to sign This bit is meaningless for zone keys which always have authority to
any RRs in the zone. The signatory bit, like all other aspects of sign any RRs in the zone. The signatory bit, like all other aspects
the KEY RR, is only effective if the KEY RR is appropriately signed of the KEY RR, is only effective if the KEY RR is appropriately
by a SIG RR. signed by a SIG RR.
Bits 3-4 are reserved and must be zero. If they are found non- Bits 3-4 are reserved and must be zero. If they are found non-
zero, they should be ignored and the KEY RR used as indicated by the zero, they should be ignored and the KEY RR used as indicated by the
other flags. other flags.
Bit 5 on indicates that this is a key associated with a "user" Bit 5 on indicates that this is a key associated with a "user"
or "account" at an end entity, usually a host. The coding of the or "account" at an end entity, usually a host. The coding of the
owner name is that used for the responsible individual mailbox in the owner name is that used for the responsible individual mailbox in the
SOA record: The owner name is the user name as the name of a node SOA record: The owner name is the user name as the name of a node
under the entity name. For example, "j.random_user" on under the entity name. For example, "j.random_user" on
host.subdomain.domain could have a public key associated through an host.subdomain.domain could have a public key associated through a
KEY RR with name j\.random_user.host.subdomain.domain. It could be KEY RR with name j\.random_user.host.subdomain.domain. It could be
used in an IP-security protocol where authentication of a user was used in an IP-security protocol where authentication of a user was
desired. This key would be useful in IP or other security for a user desired. This key would be useful in IP or other security for a user
level service such a telnet, ftp, rlogin, etc. level service such a telnet, ftp, rlogin, etc.
Bit 6 on indicates that this is a key associated with the non- Bit 6 on indicates that this is a key associated with the non-
zone entity whose name is the RR owner name. This will commonly be a zone entity whose name is the RR owner name. This will commonly be a
host but could, in some parts of the DNS tree, be some other type of host but could, in some parts of the DNS tree, be some other type of
entity such as an Autonomous System [draft-ietf-dnssec-as-map-*.txt]. entity such as an Autonomous System [draft-ietf-dnssec-as-map-*.txt].
This is the public key used in connection with the optional DNS This is the public key used in connection with the optional DNS
transaction authentication service that can be used if the owner name transaction authentication service that can be used if the owner name
is a DNS server host. It could also be used in an IP-security is a DNS server host. It could also be used in an IP-security
protocol where authentication of a host was desired. protocol where authentication of a host was desired.
Bit 7 on indicates that this is a zone key for the zone whose Bit 7 on indicates that this is a zone key for the zone whose
name is the RSA RR owner name. This is the fundamental type of DNS name is the KEY RR owner name. This is the fundamental type of DNS
data origin authentication public key. data origin authentication public key.
3.4 The KEY Algorithm Version 3.4 The KEY Algorithm Version and MD5/RSA Algorithm
This octet is the key algorithm version parallel to the same field This octet is the key algorithm version parallel to the same field
for the SIG resource. The MD5/RSA algorithm described in this draft for the SIG resource. The MD5/RSA algorithm described in this draft
is number 1. Version numbers 2 through 253 are available for is number 1. Version numbers 2 through 253 are available for
assignment should sufficient reason arise. However, the designation assignment should sufficient reason arise. However, the designation
of a new version could have a major impact on interoperability of a new version could have a major impact on interoperability and
INTERNET-DRAFT DNS Protocol Security Extensions
requires an IETF standards action. Version 254 is reserved for requires an IETF standards action. Version 254 is reserved for
private use and will never be assigned a specific algorithm. For private use and will never be assigned a specific algorithm. For
version 254, the combined "public exponent", "modulus length" and version 254, the public key area shown in the packet diagram above
"modulus" area shown above will actually begin with an Object will actually begin with an Object Identifier (OID) indicating the
Identifier (OID) indicating the private algorithm in use and the private algorithm in use and the remainder of the combined area is
remainder of the combined area is whatever is required by that whatever is required by that algorithm. Algorithm versions 0 and 255
algorithm. Algorithm versions 0 and 255 are illegal. are reserved.
If the no key bit is zero and the algorithm field is 1, indicating
the MD5/RSA algorithm, the public key filed is structured as follows:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| public key exponent |modulus length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| /
+- modulus /
| /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The public key modulus field is a multiprecision unsigned integer.
The "modulus length" is an unsigned octet which is the actual modulus
length minus 64. This limits keys to a maximum of 255+64 or 319
octets and a minimum of 64 octets. Although moduluses of less than
512 significant bits are not permitted, due to the weak security they
provide, they can be represented by using leading zeros.
3.5 KEY RRs in the Construction of Responses 3.5 KEY RRs in the Construction of Responses
A 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.
Security aware DNS servers will include KEY RRs as additional Security aware DNS servers will include KEY RRs as additional
information in responses where appropriate as follows: information in responses where appropriate including the following:
On the retrieval of NS RRs, the zone key KEY RR(s) for the zone On the retrieval of NS RRs, the zone key KEY RR(s) for the zone
served by these name servers will be included. If not all additional served by these name servers will be included. If not all additional
info will fit, the KEY RR(s) have lower priority than type A glue info will fit, the KEY RR(s) have lower priority than type A or AAAA
RRs. glue RRs.
On retrieval of type A RRs, the end entity KEY RR(s) for the On retrieval of type A or AAAA RRs, the end entity KEY RR(s)
host named will be included. On inclusion of A RRs as additional will be included. On inclusion of A or AAAA RRs as additional
information, their KEY RRs will also be included but with lower information, their KEY RRs will also be included but with lower
priority than the relevant A RRs. priority than the relevant A or AAAA RRs.
3.6 File Representation of KEY RRs 3.6 File Representation of KEY RRs
KEY RRs may appear as lines in a zone data file. KEY RRs may appear as lines in a zone data file.
The object name appears first. In the RDATA portion, the object name appears first.
The flag octet and algorithm version octets are then represented as The flag octet and algorithm version octets are then represented as
unsigned integers; however, if the "no key" flag is on in the flags, unsigned integers; however, if the "no key" flag is on in the flags,
nothing appears after the flag octet. nothing appears after the flag octet.
If the algorithm specified is the MD5/RSA algorithm, then the If the algorithm specified is the MD5/RSA algorithm, then the
exponent and modulus appear. The public key exponent is an unsigned exponent and modulus appear. The public key exponent is an unsigned
integer from 3 to 16777215. The public key modulus can be quite integer from 3 to 16777215. The public key modulus can be quite
large, up to 319 octets. It is the last data field and is large, up to 319 octets. It is the last data field and is
represented in hex and may be divided up into any number of white represented in base 64 (see Appendix) and may be divided up into any
space separated substrings, down to single hex digits, which are number of white space separated substrings, down to single base 64
concatenated to obtain the full signature. These hex substrings can digits, which are concatenated to obtain the full signature. These
span lines using the standard parenthesis. substrings can span lines using the standard parenthesis.
INTERNET-DRAFT DNS Protocol Security Extensions
If an algorithm from 2 through 253 is specified, the public key If an algorithm from 2 through 253 is specified, the public key
parameters required by that algorithm are given. If the algorithm parameters required by that algorithm are given. If the algorithm
specified is number 254, then an OID appears followed by whatever is specified is number 254, then an OID appears followed by whatever is
required for the private algorithm. Algorithm versions 0 and 255 are required for the private algorithm. An implementation that does not
illegal. understand a particular standard or private algorithm should attempt
to parse the rest of the line as one or more base 64 substrings to be
INTERNET-DRAFT DNS Protocol Security Extensions concatenated to yield the key parameters. Algorithm versions 0 and
255 are reserved.
4. The SIG Resource Record 4. The SIG Resource Record
The SIG or "signature" resource record (RR) is the fundamental way The SIG or "signature" resource record (RR) is the fundamental way
that data is authenticated in the secure DNS. As such it is the that data is authenticated in the secure DNS. As such it is the
heart of the security provided. heart of the security provided.
The SIG RR unforgably authenticates other RRs of a particular type The SIG RR unforgably authenticates other RRs of a particular type,
and binds them to a time interval and the signer's fully qualified class, and name and binds them to a time interval and the signer's
domain name. This is done using cryptographic techniques and the fully qualified domain name. This is done using cryptographic
signer's private key. The signer is usually the owner of the zone techniques and the signer's private key. The signer is frequently
from which the RR originated. the owner of the zone from which the RR originated.
4.1 SIG RDATA Format 4.1 SIG RDATA Format
The RDATA portion of a SIG RR is as shown below. The integrity of The RDATA portion of a SIG RR is as shown below. The integrity of
the RDATA information and that of the SIG RRs owner, type, and class the RDATA information is protected by the signature field.
are protected by the signature field.
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 | | time signed |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| key footprint | / | key footprint | /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ signer's name / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ signer's name /
/ / / /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| signature / | /
+- signature /
/ / / /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The value of the SIG type is 24. The value of the SIG RR type is 24.
The "type covered" is the type of the other RRs covered by this SIG. The "type covered" is the type of the other RRs covered by this SIG.
The algorithm version number is an octet specifying the digital The algorithm version number is an octet specifying the digital
signature algorithm used. The MD5/RSA algorithm described in this signature algorithm used. The MD5/RSA algorithm described in this
draft is version one. Version numbers 2 through 253 are available draft is version 1. Version numbers 2 through 253 are available for
for assignment should sufficient reason arise to allocate them. assignment should sufficient reason arise to allocate them. However,
However, the designation of a new version could have a major impact the designation of a new version could have a major impact on the
on the interoperability of the global DNS systems and requires an interoperability of the global DNS systems and requires an IETF
IETF standards action. Version 254 is reserved for private use and standards action. Version 254 is reserved for private use and will
never be assigned a specific algorithm. For version 254, the
INTERNET-DRAFT DNS Protocol Security Extensions
will never be assigned a specific algorithm. For version 254, the
"signature" area shown above will actually begin with an Object "signature" area shown above will actually begin with an Object
Identified (OID) indicating the private algorithm in use and the Identified (OID) indicating the private algorithm in use and the
remainder of the signature area is whatever is required by that remainder of the signature area is whatever is required by that
algorithm. Version numbers 0 and 2555 are illegal. algorithm. Version numbers 0 and 255 are reserved.
The "labels" octet is an unsigned count of how many labels there are The "labels" octet is an unsigned count of how many labels there are
in the original SIG RR owner name not counting the null label for in the original SIG RR owner name not counting the null label for
root and not counting any initial "*" for a wildcard. If, on root and not counting any initial "*" for a wildcard. If, on
retrieval, the RR appears to have a longer name, the resolver can retrieval, the RR appears to have a longer name, the resolver can
tell it is the result of wildcard substitution. If the RR owner name tell it is the result of wildcard substitution. If the RR owner name
appears to be shorter than the labels count, the SIG RR should be appears to be shorter than the labels count, the SIG RR should be
considered corrupt and ignored. The maximum number of labels considered corrupt and ignored. The maximum number of labels
possible in the current DNS is 127 but the entire octet is reserved possible in the current DNS is 127 but the entire octet is reserved
and would be required should DNS names ever be expanded to 255 and would be required should DNS names ever be expanded to 255
labels. If a secured retrieval is the result of wild card labels. If a secured retrieval is the result of wild card
substitution, it is necessary for the resolver to use the original substitution, it is necessary for the resolver to use the original
form of the name in verifying the digital signature. The field helps form of the name in verifying the digital signature. The field helps
optimize the determination of the original form. optimize the determination of the original form reducing the effort
in authentication signed data. The following table give some
examples. The value of "labels" is at the top, the retrieved owner
name on the left, and the table entry is the name to use in signature
verification except that "bad" means the RR is corrupt.
labels= | 0 | 1 | 2 | 3 | 4 |
--------+-----+------+--------+----------+----------+
.| . | bad | bad | bad | bad |
d.| *. | d. | bad | bad | bad |
c.d.| *. | *.d. | c.d. | bad | bad |
b.c.d.| *. | *.d. | *.c.d. | b.c.d. | bad |
a.b.c.d.| *. | *.d. | *.c.d. | *.b.c.d. | a.b.c.d. |
The "original TTL" field is included in the RDATA portion to avoid The "original TTL" field is included in the RDATA portion to avoid
authentication problems that caching servers would otherwise cause by authentication problems that caching servers would otherwise cause by
decrementing the real TTL field and security problems that decrementing the real TTL field and security problems that
unscrupulous servers could otherwise cause by manipulating the real unscrupulous servers could otherwise cause by manipulating the real
TTL field. This original TTL is protected by the signature while the TTL field. This original TTL is protected by the signature while the
real TTL field is not. current TTL field is not.
NOTE: The "original TTL" must be restored into the covered RRs when
the signature is verified. This implies that the RRs need to all
have the same TTL to start with.
The SIG is valid until the "signature expiration" time which is an The SIG is valid until the "signature expiration" time which is an
unsigned number of seconds since the start of 1 January 1970. unsigned number of seconds since the start of 1 January 1970, GMT.
The "time signed" field is an unsigned number of seconds since the The "time signed" field is an unsigned number of seconds since the
start of 1 January 1970. start of 1 January 1970, GMT.
The "key footprint" is a 16 bit quantity that is used to help The "key footprint" is a 16 bit quantity that is used to help
efficiently select between multiple keys which may be applicable and efficiently select between multiple keys which may be applicable and
as a quick check that a public key about to be used for the as a quick check that a public key about to be used for the
computationally expensive effort to decode the signature is possibly computationally expensive effort to check the signature is possibly
valid. Its exact meaning is algorithm dependent. For the MD5/RSA valid. Its exact meaning is algorithm dependent. For the MD5/RSA
algorithm, it is the next to the bottom two octets of the public key algorithm, it is the next to the bottom two octets of the public key
modulus needed to decode the signature field. That is to say, the modulus needed to decode the signature field. That is to say, the
most significant 16 of the lest significant 24 bits of this quantity. most significant 16 of the lest significant 24 bits of this quantity
in network order.
The "signer's name" field is the fully qualified domain name of the The "signer's name" field is the fully qualified domain name of the
signer generating the SIG RR. This is usually the zone which signer generating the SIG RR. This is frequently the zone which
contained the RR(s) being authenticated. contained the RR(s) being authenticated.
The structured of the "signature" field depends on the algorithm The structured of the "signature" field depends on the algorithm
chosen and is described below. chosen and is described below for the MD5/RSA algorithm.
INTERNET-DRAFT DNS Protocol Security Extensions
4.1.1 Signature Format 4.1.1 Signature Format
The actual signature portion of the SIG RR binds the owner, signer, The actual signature portion of the SIG RR binds RDATA to all of the
class, original TTL, time signed, flags, and expiration time of the "type covered" RRs with that owner name. These covered RRs are
SIG RR to all of the "type covered" RRs with that owner name. These thereby authenticated. To accomplish this, a data sequence is
covered RRs are thereby authenticated. To accomplish this, a data constructed as follows:
sequence is constructed as follows:
data = algorithm | original TTL | Expiration Time | Time signed | data = RDATA | RR(s)...
Signer's Name | RR(s)...
where | is concatenation and RR(s) are all the expanded (no name where | is concatenation and RR(s) are all the expanded (no name
abbreviation) RR(s) of the type covered with the same owner name as abbreviation) RR(s) of the type covered with the same owner name and
the SIG RR in canonical order. The canonical order for RRs is to class as the SIG RR in canonical order. The canonical order for RRs
sort them in ascending order as left justified unsigned octet is to sort them in ascending order as left justified unsigned octet
sequences where a missing octet sorts before a zero octet. sequences where a missing octet sorts before a zero octet.
How this data sequence is processed into the signature is algorithm How this data sequence is processed into the signature is algorithm
dependent. dependent.
For the MD5/RSA algorithm, the signature is as follows For the MD5/RSA algorithm, the signature is as follows
hash = MD5 ( data ) hash = MD5 ( data )
signature = ( 01 | FF* | 00 | hash ) ** e (mod n) signature = ( 01 | FF* | 00 | hash ) ** e (mod n)
where "|" is concatenation, "e" is the secret key exponent of the where "|" is concatenation, "e" is the secret key exponent of the
signer, and "n" is the public modulus that is the signer's public signer, and "n" is the public modulus that is the signer's public
key. 01, FF, and 00 are fixed octets of the corresponding key. 01, FF, and 00 are fixed octets of the corresponding
hexadecimal value. The FF octet is repeated the maximum number of hexadecimal value. The FF octet is repeated the maximum number of
times such that the value of the quantity being exponentiated is one times such that the value of the quantity being exponentiated is one
octet shorter than the value of n. octet shorter than the value of n.
The size of n, including most and least significant bits (which will The size of n, including most and least significant bits (which will
be 1) SHALL be not less than 512 bits and not more than 2552 bits. n be 1) SHALL be not less than 512 bits and not more than 2552 bits. n
and e MUST be chosen such that the public exponent is less than 2**24 and e MUST be chosen such that the public exponent is less than or
- 1 and SHOULD be chosen such that the public exponent is small. equal to 2**24 - 1 and SHOULD be chosen such that the public exponent
is small.
The above specifications are similar to Public Key Cryptographic The above specifications are similar to Public Key Cryptographic
Standard #1 [PKCS1]. Standard #1 [PKCS1].
(A public exponent of 3 minimizes the effort needed to decode a (A public exponent of 3 minimizes the effort needed to decode a
signature. Use of 3 as the public exponent may be weak for signature. Use of 3 as the public exponent may be weak for
confidentiality uses since, if the same data can be collected confidentiality uses since, if the same data can be collected
encrypted under three different keys with an exponent of 3 then, encrypted under three different keys with an exponent of 3 then,
using the Chinese Remainder Theorem [ref], the original plain text using the Chinese Remainder Theorem, the original plain text can be
can be easily recovered. This weakness is not significant for DNS easily recovered. This weakness is not significant for DNS because
because we seek only authentication, not confidentiality.) we seek only authentication, not confidentiality.)
INTERNET-DRAFT DNS Protocol Security Extensions
4.1.2 SIG RRs Covering Type ANY 4.1.2 SIG RRs Covering Type ANY
The SIG RR described above protects all the RRs with a particular The SIG RR described above protects all the RRs with a particular
owner name and type. Thus a server must supply them all to convince owner name, class, and type. Thus a server must supply them all to
a security aware resolver. However, an unscrupulous server could convince a security aware resolver. However, an unscrupulous server
claim there were no RRs of a particular type under an owner name could claim there were no RRs of a particular type and class under an
while presenting signed RRs of other types. To provide a means of owner name while presenting signed RRs of other types. To provide a
protection against this, one SIG RR is added for each owner name that means of protection against this, one or more SIG RR is added for
covers the type ANY. It is calculated as indicated above except that each owner name that covers the type ANY. It is calculated as
all RRs for that owner name, except the SIG RR covering type ANY indicated above except that all RRs for that owner name and SIG key,
itself, are included in the data string which is processed into the except the SIG RR covering type ANY itself, are included in the data
signature. string which is processed into the signature.
To allow for dynamic update, the zone key signed ANY SIG RR covers
only zone signed RRs. If RRs are added to a zone authenticated by an
entity or user key, then an ANY SIG RR signed by that key covering
the RRs signed by that key should be added.
4.1.3 Zone Transfer (AXFR) SIG 4.1.3 Zone Transfer (AXFR) SIG
The above SIG mechanisms assure the authentication of all the RRs of The above SIG mechanisms assure the authentication of all the RRs of
a particular name and type and all the RRs of a particular name and a particular name, class and type and all the RRs of a particular
any type. However, to secure complete zone transfers, a SIG RR owned name, class and any type. However, to secure complete zone
by the zone name must be created with a type covered of AXFR that transfers, a SIG RR owned by the zone name must be created with a
covers all other zone signed RRs. It will be calculated by hashing type covered of AXFR that covers all other zone signed RRs. It will
together all other static zone RRs, including SIGs. The RRs are be calculated by hashing together all other static zone RRs,
ordered and concatenated for hashing as described in Section 4.1.1. including SIGs. The RRs are ordered and concatenated for hashing as
This SIG, other than having to be calculated last of all zone key described in Section 4.1.1. This SIG, other than having to be
signed SIGs in the zone, is the same as any other SIG. calculated last of all zone key signed SIGs in the zone, is the same
as any other SIG.
Dynamic zone RRs which might be added by some future dynamic zone Dynamic zone RRs which might be added by some future dynamic zone
update protocol and signed by an end entity or user key rather than a update protocol and signed by an end entity or user key rather than a
zone key (see Section 3.2) are not included. They originate in the zone key (see Section 3.2) are not included. They originate in the
network and will not, in general, be migrated to the recommended off network and will not, in general, be migrated to the recommended off
line zone signing procedure (see Section 8.2). Thus such dynamic RRs line zone signing procedure (see Section 8.2). Thus such dynamic RRs
are not directly signed by the zone and are not generally protected are not directly signed by the zone and are not generally protected
against omission during zone transfers. against omission during zone transfers.
4.1.4 Transaction SIGs 4.1.4 Transaction 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 as the last item in the additional information contain a special SIG as the last item in 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.1) of the type. It is calculated by using a "data" (see section 4.1.1) of the
entire preceding DNS reply message, including header, concatenated entire preceding DNS reply message, including DNS header,
with the entire DNS query message that produced this response, concatenated with the entire DNS query message that produced this
including the query's header. That is response, including the query's DNS header. That is
data = full response (less trailing message SIG) | full query data = full response (less trailing message SIG) | full query
INTERNET-DRAFT DNS Protocol Security Extensions
Verification of the message SIG (which is signed by the server host Verification of the message SIG (which is signed by the server host
key, not the zone key) by the requesting resolver shows that the key, not the zone key) by the requesting resolver shows that the
query and response were not tampered with in transit and that the query and response were not tampered with in transit and that the
response corresponds to the intended query. response corresponds to the intended query.
4.2 SIG RRs in the Construction of Responses 4.2 SIG RRs in the Construction of Responses
Security aware servers MUST, for every RR the query will return, Security aware servers MUST, for every authoritative RR the query
attempt to send the available SIG RRs which authenticate the will return, attempt to send the available SIG RRs which authenticate
requested RR. If multiple such SIGs are available, there may be the requested RR. If multiple such SIGs are available, there may be
insufficient space in the response to include them all. In this insufficient space in the response to include them all. In this
case, SIGs whose signer is the zone containing the RR MUST be given case, SIGs whose signer is the zone containing the RR MUST be given
highest priority and retained even if SIGs with other signers must be highest priority and retained even if SIGs with other signers must be
dropped. dropped.
To minimize possible truncation problems, if a SIG covers any RR that Sending SIGs to authenticate non-authoritative data (glue records and
would be in the answer section of the response, its automatic NS RRs for subzones) is optional and should be avoided if it will
inclusion MUST be the answer section. If it covers an RR that would lead to UDP DNS response truncation.
appear in the authority section, its automatic inclusion MUST be in
the authority section. If it covers an RR that would appear in the If a SIG covers any RR that would be in the answer section of the
additional information section it MUST appear in the additional response, its automatic inclusion MUST be the answer section. If it
information section. covers an RR that would appear in the authority section, its
automatic inclusion MUST be in the authority section. If it covers
an RR that would appear in the additional information section it MUST
appear in the additional information section.
Optionally, DNS transactions may be authenticated by a SIG RR at the Optionally, DNS transactions may be authenticated by a SIG RR at the
end of the response in the additional information section (section end of the response in the additional information section (section
4.1.4). Such SIG RRs are signed by the DNS server originating the 4.1.4). Such SIG RRs are signed by the DNS server originating the
response. Although the signer field must be the name of the response. Although the signer field must be the name of the
originating server host, the name, class, TTL, and original TTL, are originating server host, the owner name, class, TTL, and original
meaningless. The class and TTL fields can be zero. To save space, TTL, are meaningless. The class and TTL fields can be zero. To save
the name should be root (a single zero octet). space, the name should be root (a single zero octet).
[There may be a problem with SIG and NXD RR's associated with domain [There may be a problem with SIG and NXD RR's associated with domain
names that are CNAMEs. The DNS RFCs prohibit other types of RRs names that are CNAMEs. The DNS RFCs prohibit other types of RRs
appearing with a CNAME RR. This problem is being ignored until it is appearing with a CNAME RR. This problem is being ignored until it is
clear if DNS servers will really have a problem with this.] clear if DNS servers will really have a problem with this.]
4.3 Processing Responses with SIG RRs 4.3 Processing Responses with SIG RRs
If SIG RRs are received in response to a query specifying the SIG If SIG RRs are received in response to a query explicitly specifying
type, no special processing is required but a security aware client the SIG type, no special processing is required but a security aware
may wish to authenticate them by decoding the signature and applying client MAY wish to authenticate them by checking the signature and
consistency checks. applying consistency checks.
If SIG RRs are received in any other response, a security aware If SIG RRs are received in any other response, a security aware
client should decoded them using the public key of the signer. The client should check them using the public key of the signer. The
result of such decoding should thenbe verified against the result should then be verified against the appropriate other RRs
retrieved.
INTERNET-DRAFT DNS Protocol Security Extensions
appropriate other RRs retrieved.
If the message does not pass reasonable checks or the SIG does not If the message does not pass reasonable checks or the SIG does not
check against the signed RRs, the SIG RR is invalid and should be check against the signed RRs, the SIG RR is invalid and should be
ignored. The time of receipt of the SIG RR must be in the inclusive ignored. The time of receipt of the SIG RR must be in the inclusive
range of the time signed and the signature expiration but the SIG can range of the time signed and the signature expiration but the SIG can
be retained and remains locally valid until the expiration time plus be retained and remains locally valid until the expiration time plus
the authenticated TTL. the authenticated TTL.
If the SIG RR is the last RR in a response in the additional If the SIG RR is the last RR in a response in the additional
information section and has a type covered of zero, it is a information section and has a type covered of zero, it is a
transaction signature of the the response and the query that produced transaction signature of the the response and the query that produced
the response. It may be optionally checked and the message rejected the response. It may be optionally checked and the message rejected
if the checks fail. But even it the checks succeed, such a if the checks fail. But even it the checks succeed, such a
transaction authentication SIG does NOT authenticate any RRs in the transaction authentication SIG does NOT authenticate any RRs in the
message. Only proper direct or hashed RR signets signed by the zone message. Only a proper SIG RR signets signed by the zone can
can authenticate RRs. If a resolver does not implement transaction authenticate RRs. If a resolver does not implement transaction SIGs,
SIGs, it MUST at least ignore them without error. it MUST at least ignore them without error.
If all reasonable checks indicate that the SIG RR is valid then RRs If all reasonable checks indicate that the SIG RR is valid then RRs
verified by it should be considered authenticated and all other RRs verified by it should be considered authenticated and all other RRs
in the response should be considered with suspicion. in the response should be considered with suspicion.
4.4 File Representation of SIG RRs 4.4 File Representation of SIG RRs
A SIG RR covering RRs can be represented as a single logical line in A SIG RR can be represented as a single logical line in a zone data
a zone data file [RFC1033] but there are some special problems as file [RFC1033] but there are some special problems as described
described below. (It does not make sense to include a transaction below. (It does not make sense to include a transaction
authenticating SIG RR in a file as it is a transient authentication authenticating SIG RR in a file as it is a transient authentication
that must be calculated in real time by the DNS server.) that must be calculated in real time by the DNS server.)
There is no particular problem with the signer, covered type, and There is no particular problem with the signer, covered type, and
times. The time fields appears in the form YYYYMMDDHHMMSS where YYYY times. The time fields appears in the form YYYYMMDDHHMMSS where YYYY
is the year, the first MM is the month number (01-12), DD is the day is the year, the first MM is the month number (01-12), DD is the day
of the month (01-31), HH is the hour in 24 hours notation (00-23), of the month (01-31), HH is the hour in 24 hours notation (00-23),
the second MM is the minute (00-59), and SS is the second (00-59). the second MM is the minute (00-59), and SS is the second (00-59).
The original TTL and algorithm fields appears as unsigned integers. The original TTL and algorithm fields appears as unsigned integers.
The "labels" field does not appear in the file representation as it The "labels" field does not appear in the file representation as it
can be calculated from the owner name. can be calculated from the owner name.
The key footprint appears as an eight digit unsigned hexadecimal The key footprint appears as an eight digit unsigned hexadecimal
number. number.
However, the signature itself can be very long. It is the last data However, the signature itself can be very long. It is the last data
field and is represented in hex and may be divided up into any number field and is represented in base 64 (see Appendix) and may be divided
of white space separated substrings, down to single hex digits, which up into any number of white space separated substrings, down to
single base 64 digits, which are concatenated to obtain the full
INTERNET-DRAFT DNS Protocol Security Extensions signature. These substrings can be split between lines using the
standard parenthesis.
are concatenated to obtain the full signature. These hex substrings
can be split between lines using the standard parenthesis.
INTERNET-DRAFT DNS Protocol Security Extensions
5. Non-existent Names 5. Non-existent Names
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 authentication of RRs that exist in a zone. But is it not
immediately clear how to authenticatably deny the existence of a name immediately clear how to authenticatably deny the existence of a name
in a zone. in a zone.
The nonexistence of a name in a zone is indicates by the NXD RR for a The nonexistence of a name in a zone is indicated by the NXD RR for a
name interval containing the nonexistent name. An NXD RR and its SIG name interval containing the nonexistent name. An NXD RR and its SIG
are returned in the additional information section, along with the are returned in the additional information section, along with the
error, if the resolver is security aware. NXD RRs can also be error, if the resolver is security aware. NXD RRs can also be
returned if an explicit query is made for the NXD type. returned if an explicit query is made for the NXD type.
The existence of a complete set of NXD records in a zone means that The existence of a complete set of NXD records in a zone means that
any query for any name to a security aware server serving the zone any query for any name to a security aware server serving the zone
should result in an reply containing at least one signed RR. should result in an reply containing at least one signed RR.
5.1 The NXD Resource Record 5.1 The NXD Resource Record
skipping to change at page 23, line 4 skipping to change at page 23, line 4
have an owner name which is the last existing name in sort order, have an owner name which is the last existing name in sort order,
which is easy, but it is not obvious what name to put in its RDATA to which is easy, but it is not obvious what name to put in its RDATA to
indicate the entire remainder of the name space. This is handled by indicate the entire remainder of the name space. This is handled by
treating the name space as circular and putting the zone name in the treating the name space as circular and putting the zone name in the
RDATA of the last NXD. RDATA of the last NXD.
There are additional complexities due to interaction with wildcards There are additional complexities due to interaction with wildcards
as explained below. as explained below.
The NXD RRs for a zone can be automatically calculated and added to The NXD RRs for a zone can be automatically calculated and added to
INTERNET-DRAFT DNS Protocol Security Extensions
the zone by the same recommended off-line process that signs the the zone by the same recommended off-line process that signs the
zone. The NXD RRs TTL should not exceed the zone minimum TTL. zone. The NXD RR's TTL should not exceed the zone minimum TTL.
The type number for the NXD RR is xxx. The type number for the NXD RR is xxx.
5.2 NXD RDATA Format 5.2 NXD RDATA Format
The RDATA for an NXD RR consists simply of a domain name. The RDATA for an NXD RR consists simply of a domain name.
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 /
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5.3 Example 5.3 Example
Assume a zone has entries for Assume a zone has entries for
big.foo.bar big.foo.bar,
medium.foo.bar medium.foo.bar.
small.foo.bar small.foo.bar.
tiny.foo.bar tiny.foo.bar.
Then a query to a security aware server for huge.foo.bar would Then a query to a security aware server for huge.foo.bar would
produce an error reply with the additional information section produce an error reply with the additional information section
containing containing
big.foo.bar NXD medium.foo.bar big.foo.bar. NXD medium.foo.bar.
and the corresponding SIG RR.
5.4 Interaction of NXD RRs and Wildcard RRs 5.4 Interaction of NXD RRs and Wildcard RRs
As a wildcard RR causes all possible names in an interval to exist, As a wildcard RR causes all possible names in an interval to exist,
there should not be an NXD record that would cover any part of this there should not be an NXD record that would cover any part of this
interval. Thus if *.X.ZONE exists you would expect an NXD RR that interval. Thus if *.X.ZONE exists you would expect an NXD RR that
ends at X.ZONE and one that starts with the last name covered by ends at X.ZONE and one that starts with the last name covered by
*.X.ZONE. However, this "last name covered" is something very ugly *.X.ZONE. However, this "last name covered" is something very ugly
and long like \255\255\255....X.zone. So the NXD for the interval and long like \255\255\255....X.zone. So the NXD for the interval
following is simply given the owner name *.X.zone. This "*" type following is simply given the owner name *.X.zone. This "*" type
name is not expanded when the NXD is returned as additional name is not expanded when the NXD is returned as additional
information in connection with a query for a non-existent name. information in connection with a query for a non-existent name and
type.
INTERNET-DRAFT DNS Protocol Security Extensions
If there could be any wildcard RRs in a zone and thus wildcard NXDs, If there could be any wildcard RRs in a zone and thus wildcard NXDs,
care must be taken in interpreting the results of explicit NXD care must be taken in interpreting the results of explicit NXD
retrievals as the owner name may be a wildcard expansion. retrievals as the owner name may be a wildcard expansion.
The existence of one or more wildcard RRs covering a name interval The existence of one or more wildcard RRs covering a name interval
makes it possible for a malicious server to hide any more specificly makes it possible for a malicious server to hide any more specificly
named RRs in the internal. The server can just falsely return the named RRs in the internal. The server can just falsely return the
wildcard match NXD instead of the more specificly named RRs. If wildcard match NXD instead of the more specificly named RRs. If
there is a zone wide wildcard, there will be only one NXD RR whose there is a zone wide wildcard, there will be only one NXD RR whose
owner name and RDATA are both the zone name. In this case a server owner name and RDATA are both the zone name. In this case a server
could conceal the existence of any more specific RRs in the zone. It could conceal the existence of any more specific RRs in the zone.
would be possible to make a more complex NXD feature, taking into (It would be possible to make a more complex NXD feature, taking into
account the types of RRs that did not exist in a name interval, and account the types of RRs that did not exist in a name interval, and
the like, which would eliminate this possibility. But it would be the like, which would eliminate this possibility. But it would be
more complex and would be so constraining as to make any future more complex and would be so constraining as to make any future
dynamic update feature that could create new names very difficult dynamic update feature that could create new names very difficult
(see Section 3.2). (see Section 3.2).)
5.5 Blocking NXD Pseudo-Zone Transfers 5.5 Blocking NXD Pseudo-Zone Transfers
In a secure zone, a resolver can query for the initial NXD associated In a secure zone, a resolver can query for the initial NXD associated
with the zone name. Using the RDATA field from that RR, it can query with the zone name. Using the RDATA field from that RR, it can query
for the next NXD RR. By repeating this, it can walk through all the for the next NXD RR. By repeating this, it can walk through all the
NXDs in the zone. If there are no wildcards, it can use this NXDs in the zone. If there are no wildcards, it can use this
technique to find all names in a zone. If it does type ANY queries, technique to find all names in a zone. If it does type ANY queries,
it can incrementally get all information in the zone and perhaps it can incrementally get all information in the zone and perhaps
defeat attempts to administratively block zone transfers. defeat attempts to administratively block zone transfers.
If there are any wildcards, this NXD walking technique will not find If there are any wildcards, this NXD walking technique will not find
any more specific RR names in the part of the name space the wildcard any more specific RR names in the part of the name space the wildcard
covers. By doing explicit retrievals for wildcard names, a resolver covers. By doing explicit retrievals for wildcard names, a resolver
could determine what intervals are covered by wildcards but still could determine what intervals are covered by wildcards but still
could not, with these techniques, find any names inside such could not, with these techniques, find any names inside such
intervals except by trying every name. intervals except by trying every name.
If it is desired to block NXD walking, the recommended method is to If it is desired to block NXD walking, the recommended method is to
add a zone wide wildcard of the KEY type which asserts the add a zone wide wildcard of the KEY type with the no key bit on and
nonexistence of any keys. This will cause there to be only one NXD with no type (zone, entity, or user) bit on. This will cause there
RR in the zone for the zone name and leak no information about what to be only one NXD RR in the zone for the zone name and leak no
real names exist in the zone. This protection from pseudo-zone information about what real names exist in the zone. This protection
transfers is bought at the expense of eliminating the data origin from pseudo-zone transfers is bought at the expense of eliminating
authentication of the non-existence of names that NXD RRs can the data origin authentication of the non-existence of names that NXD
provide. If an entire zone is covered by a wildcard, a malicious RRs can provide. If an entire zone is covered by a wildcard, a
server can return an RR produced by matching that wildcard and can malicious server can return an RR produced by matching the resulting
thus hide all the real data and delegations with more specific names wildcard NXD and can thus hide all the real data and delegations with
in the zone. more specific names in the zone.
INTERNET-DRAFT DNS Protocol Security Extensions
6. How to Resolve Securely 6. How to Resolve Securely
Retrieving or resolving authentic data from the DNS involves starting Retrieving or resolving authentic data from the DNS involves starting
with one or more trusted public keys and, in general, progressing with one or more trusted public keys and, in general, progressing
securely from them through the DNS zone structure to the zone of securely from them through the DNS zone structure to the zone of
interest. Such trusted public keys would normally be configured in a interest. Such trusted public keys would normally be configured in a
manner similar to that described in section 6.1. However, as a manner similar to that described in section 6.1. However, as a
practical matter, a security aware resolver would still gain some practical matter, a security aware resolver would still gain some
confidence in the results it returns even if it was not configured confidence in the results it returns even if it was not configured
with any keys but trusted what it got from a local well known server with any keys but trusted what it got from a local well known server
as a starting point. as a starting point.
6.1 Boot File Format 6.1 Boot File Format
The recommended format for a boot file line to configure starting The recommended format for a boot file line to configure starting
keys is as follows: keys is as follows:
zonekey f.q.d.n algorithm [exponent modulus] pubkey name object flags algorithm [exponent modulus]
for a zone public key or
hostkey f.q.d.n algorithm [exponent modulus]
for a host public key. f.q.d.n is the domain name of the zone or for a public key. "object" is the domain name of the thing the key
host. Algorithm is the algorithm in use where one is the MD5/RSA is associated with and "name" is the owner name if the line is
algorithm and 254 indicates a private algorithm. The material after translated into a KEY RR). Flags indicates the type of key and is
the algorithm is algorithm dependent and, for private algorithms, the same as the flag byte in the KEY RR. In particular, if the "no
starts with the algorithm's identifying OID. For the RSA algorithm, key" bit is on in flags, then all fields after flags may be omitted.
it is the public key exponent as a decimal number between 3 and Algorithm is the algorithm in use where one is the MD5/RSA algorithm
16777215, and the modulus in hex. and 254 indicates a private algorithm. The material after the
algorithm is algorithm dependent and, for private algorithms, starts
with the algorithm's identifying OID. For the RSA algorithm, it is
the public key exponent as a decimal number between 3 and 16777215,
and the modulus in base 64 (see Appendix).
While it might seem logical for everyone to start with the key for While it might seem logical for everyone to start with the key for
the root zone, this has problems. The logistics of updating every the root zone, this has problems. The logistics of updating every
DNS resolver in the world when the root key changes would be DNS resolver in the world when the root key changes would be
excessive. It may be some time before there even is a root key. excessive. It may be some time before there even is a root key.
Furthermore, many organizations will explicitly wish their "interior" Furthermore, many organizations will explicitly wish their "interior"
DNS implementations to completely trust only their own zone. These DNS implementations to completely trust only their own zone. These
interior resolvers can then go through the organization's zone server interior resolvers can then go through the organization's zone server
to access data outsize the organization's domain. to access data outsize the organization's domain.
If desired, the IP address for the f.q.d.n's with configured keys can
generally also be configured via an /etc/hosts or similar local file.
INTERNET-DRAFT DNS Protocol Security Extensions
6.2 Chaining Through Zones 6.2 Chaining Through Zones
Starting with one trusted zone key, it is possible to retrieve signed Starting with one trusted zone key, it is possible to retrieve signed
keys for subzones which have a key. Every secure zone (except root) keys for subzones which have a key. Every secure zone (except root)
should also include the RSA record for its super-zone signed by the should also include the KEY RR for its super-zone signed by the
secure zone. This makes it possible to climb the tree of zones if secure zone and with the owner name of the secure zone and object
one starts below root. A secure sub-zone is generally indicated by a name of the super-zone. This makes it possible to climb the tree of
KEY RR appearing with the NS RRs for the sub-zone. These make it zones if one starts below root. A secure sub-zone is indicated by a
possible to descend within the tree of zones. KEY RR appearing with the NS RRs for the sub-zone and with the same
owner and object names. These make it possible to descend within the
tree of zones.
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 starting point to any secure zone it can reach. In traversed from a starting point to any secure zone it can reach. In
general, the lower such a distance number is, the greater the general, the lower such a distance number is, the greater the
confidence in the data. Data configured via a boot file should be confidence in the data. Data configured via a boot file should be
given a distance number of zero. Should a query encounter different given a distance number of zero. Should a query encounter different
data with different distance values, that with a larger value should data with different distance values, that with a larger value should
be ignored. be ignored.
A security conscious resolver should completely refuse to step from a A security conscious resolver should completely refuse to step from a
skipping to change at page 26, line 44 skipping to change at page 26, line 37
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 non-secure zone via information from such non-secure zones. Since the non-secure 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 512 or more as this exceeds the via such zones could be set to 512 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 Nevertheless, continuing to apply secure checks within "secure" zones
reached via non-secure zones will, as a practical matter, provide reached via non-secure zones will, as a practical matter, provide
some increase in security. some increase in security.
The syntax of KEY RRs, with an arbitrary object name, provides for
cross-certification. Although the syntax permits the owner name of a
cross-certification KEY RR to be any name, by convention and to avoid
an undue concentration of such KEY RRs under any particular name,
their owner name should be the zone name prefixed with the
destination object name (truncated an integral number of labels from
the front if necessary due to DNS name restrictions). Thus a key for
isoc.org would appear in the mit.edu zone with the owner name
isoc.org.mit.edu and object name isoc.org.
The existence of cross certifications adds further policy questions. The existence of cross certifications adds further policy questions.
Assume we have a zone B.A and a zone Y.X. Many possibilities exist Assume we have a zone B.A and a zone Y.X. Many possibilities exist
for a secure resolver configured with the B.A key to get to Y.X. If for a secure resolver configured with the B.A key to get to Y.X. If
all the zones along the way are secure, it could climb to root and all the zones along the way are secure, it could climb to root and
then descend the other side, a total of four hops (B.A -> A -> . -> X then descend the other side, a total of four hops (B.A -> A -> . -> X
-> Y.X). If the B.A administrator had installed a cross certified -> Y.X). If the B.A administrator had installed a cross certified
key for Y.X in the B.A zone, using that would be a shorter and key for Y.X in the B.A zone, using that would be a shorter and
presumably more secure way to find Y.X's key which would be immune to presumably more secure way to find Y.X's key which would be immune to
the non-security or even compromise of the servers for A or root or the non-security or even compromise of the servers for A or root or
X. But what if some less trusted subzone of B.A, say C.B.A installed X. But what if some less trusted subzone of B.A, say flakey.B.A
a cross certified key for Y.X? If there is a conflict, should this installed a cross certified key for Y.X? If there is a conflict,
be preferred to a hierarhically derived key obtained by climbing to should this be preferred to a hierarhically derived key obtained by
root and descending? Such questions are a matter of local resolver climbing to root and descending? Such questions are entirely a
matter of local resolver policy.
INTERNET-DRAFT DNS Protocol Security Extensions
policy.
6.3 Secure Time 6.3 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, RFC1305). If such protocols are used, Network Time Protocol (NTP, RFC1305). If such protocols are used,
they should be used securely so that time can not be spoofed. they should 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 and KEY RRs which were valid but no longer might then believe old SIG and KEY RRs which were valid but no longer
are. are.
INTERNET-DRAFT DNS Protocol Security Extensions
7. Operational Considerations 7. Operational Considerations
This section discusses a variety of considerations in secure This section discusses a variety of considerations in secure
operation of DNS using these proposed protocol extensions. operation of DNS using these proposed protocol extensions.
7.1 Key Size Considerations 7.1 Key Size Considerations
There are a number of factors that effect public key size choice for There are a number of factors that effect public key size choice for
use in the DNS security extension. Unfortunately, these factors use in the DNS security extension. Unfortunately, these factors
usually do not all point in the same direction. Choice of a key size usually do not all point in the same direction. Choice of a key size
should be made by the zone administrator depending on their local should generally be made by the zone administrator depending on their
conditions. local conditions.
For most schemes, larger keys are more secure but slower. For most schemes, larger keys are more secure but slower.
Verification (the most common operation) for the MD5/RSA algorithm Verification (the most common operation) for the MD5/RSA algorithm
will vary roughly with the square of the modulus length, signing will will vary roughly with the square of the modulus length, signing will
vary with the cube of the modulus length, and key generation (the vary with the cube of the modulus length, and key generation (the
least common operation) will vary with the fourth power of the least common operation) will vary with the fourth power of the
modulus length. The current best algorithms for factoring a modulus modulus length. The current best algorithms for factoring a modulus
and breaking RSA security vary roughly with the square of the modulus and breaking RSA security vary roughly with the square of the modulus
itself. Thus going from a 640 bit modulus to a 1280 bit modulus only itself. Thus going from a 640 bit modulus to a 1280 bit modulus only
increases the verification time by a factor of 4 but vastly increases increases the verification time by a factor of 4 but vastly increases
the work factor of breaking the key. [RSA FAQ] the work factor of breaking the key. [RSA FAQ]
However, larger keys increase size of the KEY RR and usually the SIG However, larger keys increase size of the KEY and SIG RRs. This
RR. This increases the change of UDP packet flow and the possible increases the chance of UDP packet overflow and the possible
necessity for using higher overhead TCP. necessity for using higher overhead TCP.
The recommended minimum RSA algorithm modulus size, 640 bits, is The recommended minimum RSA algorithm modulus size, 640 bits, is
believed by the authors to be secure at this time and for some years believed by the authors to be secure at this time and for some years
but high level nodes in the DNS tree may wish to set a higher but high level zones in the DNS tree may wish to set a higher
minimum, perhaps 1000 bits, for security reasons. (Since the United minimum, perhaps 1000 bits, for security reasons. (Since the United
States National Security Agency generally permits export of States National Security Agency generally permits export of
encryption systems using an RSA modulus of up to 512 bits, use of encryption systems using an RSA modulus of up to 512 bits, use of
that small a modulus, i.e. n, must be considered weak.) that small a modulus, i.e. n, must be considered weak.)
For a key used only to secure data and not to secure other keys, 640
bits should be entirely adequate.
7.2 Key Storage 7.2 Key Storage
It is strongly recommended that zone private keys and the zone file It is strongly recommended that zone private keys and the zone file
master copy be kept and used in off-line non-network connected master copy be kept and used in off-line non-network connected
physically secure machines only. Periodically an application can be physically secure machines only. Periodically an application can be
run to re-sign the RRs in a zone by adding NXD and SIG RRs. Then the run to re-sign the RRs in a zone by adding NXD and SIG RRs. Then the
augmented file can be transferred, perhaps by sneaker-net, to the augmented file can be transferred, perhaps by sneaker-net, to the
networked zone primary server machine. networked zone primary server machine.
The idea is to have a one way information flow to the network to The idea is to have a one way information flow to the network to
INTERNET-DRAFT DNS Protocol Security Extensions
avoid the possibility of tampering from the network. Keeping the avoid the possibility of tampering from the network. Keeping the
zone master file on-line on the network and simply cycling it through zone master file on-line on the network and simply cycling it through
an off-line signer does not do this. The on-line version could still an off-line signer does not do this. The on-line version could still
be tampered with if the host it resides on is compromised. The be tampered with if the host it resides on is compromised. The
master copy of the zone file should be off net and should not be master copy of the zone file should be off net and should not be
updated based on an unsecured network mediated communication. updated based on an unsecured network mediated communication.
Non-zone private keys, such as host keys, may have to be kept on line Non-zone private keys, such as host or user keys, may have to be kept
to be used for real-time purposes such a IP secure session set-up. on line to be used for real-time purposes such a IP secure session
set-up or secure mail.
7.3 Key Generation 7.3 Key Generation
Careful key generation is a sometimes over looked but absolutely Careful key generation is a sometimes over looked but absolutely
essential element in any cryptographically secure system. The essential element in any cryptographically secure system. The
strongest algorithms used with the longest keys are still of no use strongest algorithms used with the longest keys are still of no use
if an adversary can guess enough to lower the size of the likely key if an adversary can guess enough to lower the size of the likely key
space so that it can be exhaustively searched. Suggestions will be space so that it can be exhaustively searched. Suggestions will be
found in draft-ietf-security-randomness-*.txt. found in draft-ietf-security-randomness-*.txt.
skipping to change at page 29, line 44 skipping to change at page 29, line 45
No zone key should have a lifetime significantly over five years. No zone key should have a lifetime significantly over five years.
The recommended maximum lifetime for zone keys that are kept off-line The recommended maximum lifetime for zone keys that are kept off-line
and carefully guarded is 13 months with the intent that they be and carefully guarded is 13 months with the intent that they be
replaced every year. The recommended maximum lifetime for end entity replaced every year. The recommended maximum lifetime for end entity
keys that are used for IP-security or the like and are kept on line keys that are used for IP-security or the like and are kept on line
is 36 days with the intent that they be replaced monthly or more is 36 days with the intent that they be replaced monthly or more
often. In some cases, an entity key lifetime of a little over a day often. In some cases, an entity key lifetime of a little over a day
may be reasonable. may be reasonable.
7.5 Revocation Key lifetimes significantly over a year increase the risk that, when
the time comes up change the key, no one at the site will remember
[This is new and should probably be moved to someplace above...] how to do it.
Data in the DNS is authenticated via keyed digital signatures. Thus
to revoke data, we need to alter the time period of the key's
effectiveness to not include the date signed of the data to be
remoked. Note that the case of a compromised key, where we wish to
INTERNET-DRAFT DNS Protocol Security Extensions
make its period of effectiveness null, we generally need only think
of the KEY RR as data and make the period of effectiveness of the
superzone's key not include the time of the previous superzone
signing of the key.
Normally, a KEY retrieved from the DNS appears to be effective from 7.5 Signature Lifetime
the beginning of time until the expiration of the SIG that
authenticated it. (If this were not so, a secure zone would have to
be resigned every time its superzone is resigned.) When data is
being revoked, a zone can be resigned with a later date signed but a
mechanism is need to make the earlier SIG of the now revoked data not
longer valid.
A dawn for the effectiveness of a node's KEY RR is provided, when Signature expiration times must be set far enought in the future that
desired, by having the key appear self-signed. This declares the it is quite certain that new signatures can be generated before the
time signed of the self signature as the time of effectiveness of the old ones expire. However, setting expiration too far into the future
key(s). Note this is entirely under the control of a zone and could, if bad data or signatures were ever generated, mean a long
asynchronous with its superzone's signings. time to flush such badness.
This technique covers non-zone entities as well. For an owner to It is recommended that signature lifetime be a small multiple of the
have a dawn to the effectiveness of its delegated key (which is TTL but not less than a reasonable re-signing interval.
signed by the zone key), it need only self-sign its key and the date
signed is the dawn.
7.6 Root 7.6 Root
The root zone includes its own key self-signed. It should be noted that in DNS the root is a zone unto itself. Thus
the root zone key should only be see signing itself or signing RRs
It should also be noted that in DNS the root is a zone unto itself. with names one level below root, such as .aq, .edu, or .arpa.
Thus the root zone key should only be see signing itself or signing
RRs with names one level below root, such as .aq, .edu, or .arpa.
Implementations MAY reject as bogus any purported root signature of Implementations MAY reject as bogus any purported root signature of
records with a name more than one level below root. records with a name more than one level below root.
INTERNET-DRAFT DNS Protocol Security Extensions
8. Conformance 8. Conformance
Several levels of server and resolver conformance are defined. Several levels of server and resolver conformance are defined.
8.1 Server Conformance 8.1 Server Conformance
Three levels of server conformance are defined as follows: Three levels of server conformance are defined as follows:
Zilch server compliance is the ability to store and retrieve Basic server compliance is the ability to store and retrieve
(including zone transfer) SIG, KEY, and NXD RRs. It is believed that (including zone transfer) SIG, KEY, and NXD RRs. Secondaries for a
most current servers meet this level of compliance. secure zone must be at least basicly compliant.
Minimal server compliance adds the following to zilch Medium server compliance adds the following to basic compliance:
compliance: (1) ability to read SIG, KEY, and NXD RRs in zone files (1) ability to read SIG, KEY, and NXD RRs in zone files and (2)
and (2) ability, given a zone file and private key, to add ability, given a zone file and private key, to add appropriate SIG
appropriate SIG and NXD RRs, possibly via a separate application. and NXD RRs, possibly via a separate application. Primary servers
Primary servers for secure zones must be at least minimally for secure zones must be at least minimally compliant.
compliant.
Full server compliance is ability to automatically include SIG, Full server compliance is ability to automatically include SIG,
KEY, and NXD RRs in responses as appropriate, as well as meeting KEY, and NXD RRs in responses as appropriate, as well as meeting
minimal compliance. medium compliance.
8.2 Resolver Conformance 8.2 Resolver Conformance
Two levels of resolver compliance are defined: Two levels of resolver compliance are defined:
A Zilch compliance resolver can handle SIG, KEY, and NXD RRs A basic compliance resolver can handle SIG, KEY, and NXD RRs
when they are explicitly requested. It is believed that current when they are explicitly requested.
resolvers are Zilch compliant.
A fully compliant resolver understands KEY, SIG, and NXD RRs, A fully compliant resolver understands KEY, SIG, and NXD RRs,
maintains appropriate information in its local caches and database to maintains appropriate information in its local caches and database to
indicate which RRs have been authenticated and to what extent they indicate which RRs have been authenticated and to what extent they
have been authenticated, and performs additional queries as necessary have been authenticated, and performs additional queries as necessary
to obtain KEY, SIG, or NXD RRs from non-security aware servers. to obtain KEY, SIG, or NXD RRs from non-security aware servers.
INTERNET-DRAFT DNS Protocol Security Extensions
9. Security Considerations 9. Security Considerations
This document concerns technical details of extensions to the Domain This document concerns technical details of extensions to the Domain
Name System (DNS) protocol to provide data integrity and data origin Name System (DNS) protocol to provide data integrity and data origin
authentication, public key distribution, and optional transaction authentication, public key distribution, and optional transaction
security. security.
If should be noted that, at most, these extensions guarantee the If should be noted that, at most, these extensions guarantee the
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
skipping to change at page 33, line 5 skipping to change at page 33, line 5
[RFC1034] - Domain Names - Concepts and Facilities, P. Mockapetris, [RFC1034] - Domain Names - Concepts and Facilities, P. Mockapetris,
November 1987 November 1987
[RFC1035] - Domain Names - Implementation and Specifications [RFC1035] - Domain Names - Implementation and Specifications
[RFC1321] - The MD5 Message-Digest Algorithm, R. Rivest, April 16 [RFC1321] - The MD5 Message-Digest Algorithm, R. Rivest, April 16
1992. 1992.
[RSA FAQ] - RSADSI Frequently Asked Questions periodic posting. [RSA FAQ] - RSADSI Frequently Asked Questions periodic posting.
INTERNET-DRAFT DNS Protocol Security Extensions
Authors Addresses Authors Addresses
Donald E. Eastlake 3rd Donald E. Eastlake, 3rd
Digital Equipment Corporation Digital Equipment Corporation
550 King Street, LKG2-1/BB3 550 King Street, LKG2-1/BB3
Littleton, MA 01460 Littleton, MA 01460
Telephone: +1 508 486 6577(w) +1 508 287 4877(h) Telephone: +1 508 486 6577(w) +1 508 287 4877(h)
EMail: dee@lkg.dec.com EMail: dee@lkg.dec.com
Charles W. Kaufman Charles W. Kaufman
Iris Associates Iris Associates
1 Technology Park Drive
Westford, MA 01886
Telephone: +1 508-392-5276 Telephone: +1 508-392-5276
EMail: charlie_kaufman@iris.com EMail: charlie_kaufman@iris.com
Expiration and File Name Expiration and File Name
This draft expires 19 May 1995. This draft expires 1 July 1995.
Its file name is draft-ietf-dnssec-secext-02.txt. Its file name is draft-ietf-dnssec-secext-03.txt.
Appendix: Base 64 Encoding
The following encoding technique is taken from RFC 1521 by Borenstein
and Freed. It is reproduced here in a slightly edited form for
convenience.
A 65-character subset of US-ASCII is used, enabling 6 bits to be
represented per printable character. (The extra 65th character, "=",
is used to signify a special processing function.)
The encoding process represents 24-bit groups of input bits as output
strings of 4 encoded characters. Proceeding from left to right, a
24-bit input group is formed by concatenating 3 8-bit input groups.
These 24 bits are then treated as 4 concatenated 6-bit groups, each
of which is translated into a single digit in the base64 alphabet.
Each 6-bit group is used as an index into an array of 64 printable
characters. The character referenced by the index is placed in the
output string.
Table 1: The Base64 Alphabet
Value Encoding Value Encoding Value Encoding Value Encoding
0 A 17 R 34 i 51 z
1 B 18 S 35 j 52 0
2 C 19 T 36 k 53 1
3 D 20 U 37 l 54 2
4 E 21 V 38 m 55 3
5 F 22 W 39 n 56 4
6 G 23 X 40 o 57 5
7 H 24 Y 41 p 58 6
8 I 25 Z 42 q 59 7
9 J 26 a 43 r 60 8
10 K 27 b 44 s 61 9
11 L 28 c 45 t 62 +
12 M 29 d 46 u 63 /
13 N 30 e 47 v
14 O 31 f 48 w (pad) =
15 P 32 g 49 x
16 Q 33 h 50 y
Special processing is performed if fewer than 24 bits are available
at the end of the data being encoded. A full encoding quantum is
always completed at the end of a quantity. When fewer than 24 input
bits are available in an input group, zero bits are added (on the
right) to form an integral number of 6-bit groups. Padding at the
end of the data is performed using the '=' character. Since all
base64 input is an integral number of octets, only the following
cases can arise: (1) the final quantum of encoding input is an
integral multiple of 24 bits; here, the final unit of encoded output
will be an integral multiple of 4 characters with no "=" padding, (2)
the final quantum of encoding input is exactly 8 bits; here, the
final unit of encoded output will be two characters followed by two
"=" padding characters, or (3) the final quantum of encoding input is
exactly 16 bits; here, the final unit of encoded output will be three
characters followed by one "=" padding character.
 End of changes. 133 change blocks. 
470 lines changed or deleted 447 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/