[Docs] [txt|pdf] [Tracker] [WG] [Email] [Nits] [IPR]

Versions: 00 01 02 03 04 05 06 07 RFC 2535

DNS Security Working Group                        Donald E. Eastlake 3rd
INTERNET-DRAFT                                                 CyberCash
UPDATES RFC 1034, 1035
Expires: January 1998                                          July 1997

                 Domain Name System Security Extensions
                 ------ ---- ------ -------- ----------

Status of This Document

   This draft, file name draft-ietf-dnssec-secext2-00.txt, is intended
   to become a Proposed Standard RFC obsoleting Proposed Standard RFC
   2065.  Distribution of this document is unlimited. Comments should be
   sent to the DNS Security Working Group mailing list <dns-
   security@tis.com> or to the author.

   This document is an Internet-Draft.  Internet-Drafts are working
   documents of the Internet Engineering Task Force (IETF), its areas,
   and its working groups.  Note that other groups may also distribute
   working documents as Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six
   months.  Internet-Drafts may be updated, replaced, or obsoleted by
   other documents at any time.  It is not appropriate to use Internet-
   Drafts as reference material or to cite them other than as a
   ``working draft'' or ``work in progress.''

   To learn the current status of any Internet-Draft, please check the
   1id-abstracts.txt listing contained in the Internet-Drafts Shadow
   Directories on ds.internic.net (East USA), ftp.isi.edu (West USA),
   nic.nordu.net (North Europe), ftp.nis.garr.it (South Europe),
   munnari.oz.au (Pacific Rim), or ftp.is.co.za (Africa).

Donald E. Eastlake 3rd                                          [Page 1]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997


   Extensions to the Domain Name System (DNS) are described that provide
   data integrity and authentication to security aware resolvers or
   applications through the use of cryptographic digital signatures.
   These digital signatures are included in secured zones as resource
   records.  Security can still be provided even through non-security
   aware DNS servers in many cases.

   The extensions also provide for the storage of authenticated public
   keys in the DNS.  This storage of keys can support general public key
   distribution services as well as DNS security.  The stored keys
   enable security aware resolvers to learn the authenticating key of
   zones in addition to those for which they are initially configured.
   Keys associated with DNS names can be retrieved to support other
   protocols.  Provision is made for a variety of key types and

   In addition, the security extensions provide for the optional
   authentication of DNS protocol transactions and requests.

   This document incorporates feedback from implementors and potential
   users to the existing Proposed Standard in RFC 2065.


   The significant contributions of the following persons (in alphabetic
   order) to DNS security are gratefully acknowledged:

        Jim Galvin
        John Gilmore
        Olafur Gudmundsson
        Charlie Kaufman
        Edward Lewis
        Jeffrey I. Schiller

Donald E. Eastlake 3rd                                          [Page 2]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

Table of Contents

      Status of This Document....................................1


      Table of Contents..........................................3

      1. Overview of Contents....................................5

      2.  Overview of the DNS Extensions.........................6
      2.1 Services Not Provided..................................6
      2.2 Key Distribution.......................................6
      2.3 Data Origin Authentication and Integrity...............7
      2.3.1 The SIG Resource Record..............................7
      2.3.2 Authenticating Name and Type Non-existence...........8
      2.3.3 Special Considerations With Time-to-Live.............8
      2.3.4 Special Considerations at Delegation Points..........9
      2.3.5 Special Considerations with CNAME....................9
      2.3.6 Signers Other Than The Zone.........................10
      2.4 DNS Transaction and Request Authentication............10

      3. The KEY Resource Record................................11
      3.1 KEY RDATA format......................................11
      3.1.1 Object Types, DNS Names, and Keys...................12
      3.1.2 The KEY RR Flag Field...............................12
      3.1.3 Preference Field....................................14
      3.1.4 Key Identifier Field................................14
      3.1.5 The Protocol Octet..................................14
      3.2 The KEY Algorithm Number Specification................15
      3.2.1 The MD5/RSA Algorithm...............................15
      3.3 Interaction of Flags, Algorithm, and Protocol Bytes...16
      3.4 Determination of Zone Secure/Unsecured Status.........17
      3.5 KEY RRs in the Construction of Responses..............18

      4. The SIG Resource Record................................19
      4.1 SIG RDATA Format......................................19
      4.1.1 ....................................................19
      4.1.2 Algorithm Number Field..............................20
      4.1.3 Labels Field........................................20
      4.1.4 Original TTL Field..................................20
      4.1.5 Signature Expiration and Time Signed Fields.........21
      4.1.6 Key Identifier Field................................21
      4.1.7 Signer's Name Field.................................21
      4.1.8 Signature Field.....................................22 Signature Data....................................22 MD5/RSA Algorithm Signature Calculation...........22 Transaction and Request SIGs......................23
      4.2 SIG RRs in the Construction of Responses..............24

Donald E. Eastlake 3rd                                          [Page 3]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

      4.3 Processing Responses and SIG RRs......................25
      4.4 Signature Lifetime, Expiration, TTLs, and Validity....26
      4.5 The Root Zone as Signer and Zone Skipping.............26

      5. Non-existent Names and Types...........................27
      5.1 The NXT Resource Record...............................27
      5.2 NXT RDATA Format......................................28
      5.3 Example...............................................28
      5.4 Special Considerations at Delegation Points...........29
      5.5 Zone Transfers........................................29
      5.5.1 Full Zone Transfers.................................30
      5.5.2 Incremental Zone Transfers..........................30

      6. How to Resolve Securely and The AD and CD Bits.........32
      6.1 The AD and CD Header Bits.............................32
      6.2 Staticly Configured Keys..............................33
      6.3 Chaining Through Zones................................34
      6.4 Secure Time...........................................35

      7. ASCII Representation of Security RRs...................36
      7.1 Presentation of KEY RRs...............................36
      7.2 Presentation of SIG RRs...............................37
      7.3 Presentation of NXT RRs...............................38

      8. Canonical Form and Order of Resource Records...........39
      8.1 Canonical RR Form.....................................39
      8.2 Canonical DNS Name Order..............................39
      8.3 Canonical RR Ordering Within An RRset.................39

      9. Conformance............................................40
      9.1 Server Conformance....................................40
      9.2 Resolver Conformance..................................40

      10. Security Considerations...............................41


      Author's Addresses........................................44
      Expiration and File Name..................................44

      Appendix A: Base 64 Encoding..............................45

      Appendix B: Changes from RFC 2065.........................47

Donald E. Eastlake 3rd                                          [Page 4]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

1. Overview of Contents

   This document standardizes extensions of the Domain Name System (DNS)
   protocol to support DNS security and public key distribution.  It
   assumes that the reader is familiar with the Domain Name System,
   particularly as described in RFCs 1033, 1034, and 1035.  An earlier
   version of these extensions appears in RFC 2065.  This replacement
   incorporates implementation experience and requests from  potential

   Section 2 provides an overview of the extensions and the key
   distribution, data origin authentication, and transaction and request
   security they provide.

   Section 3 discusses the KEY resource record, its structure, and use
   in DNS responses.  These resource records represent the public keys
   of entities named in the DNS and are used for key distribution.

   Section 4 discusses the SIG digital signature resource record, its
   structure, and use in DNS responses.  These resource records are used
   to authenticate other resource records in the DNS and optionally to
   authenticate DNS transactions and requests.

   Section 5 discusses the NXT resource record (RR) and its use in DNS
   responses.  The NXT RR permits authenticated denial in the DNS of the
   existence of a name or of a particular type for an existing name.

   Section 6 discusses how a resolver can be configured with a starting
   key or keys and proceed to securely resolve DNS requests.
   Interactions between resolvers and servers are discussed for
   combinations of security aware and security non-aware.  Two
   additional DNS header bits are defined for signaling between
   resolvers and servers.

   Section 7 describes the ASCII representation of the security resource
   records for use in master files and elsewhere.

   Section 8 defines the canonical form and order of RRs for DNS
   security puposes.

   Section 9 defines levels of conformance for resolvers and servers.

   Section 10 provides a few paragraphs on overall security

   Appendix A gives details of base 64 encoding which is used in the
   file representation of some RR's defined in this document.

   Appendix B summarizes changes between this draft and RFC 2065.

Donald E. Eastlake 3rd                                          [Page 5]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

2.  Overview of the DNS Extensions

   The Domain Name System (DNS) protocol security extensions provide
   three distinct services: key distribution as described in Section 2.2
   below, data origin authentication as described in Section 2.3 below,
   and transaction and request authentication, described in Section 2.4

   Special considerations related to "time to live", CNAMEs, and
   delegation points are also discussed in Section 2.3.

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

   No effort has been made to provide for any confidentiality for
   queries or responses.  (This service may be available via IPSEC [RFC
   1825] or TLS [draft-ietf-tls-*].)

   Protection is not provided against denial of service.

2.2 Key Distribution

   A resource record format is defined to associate keys with DNS names.
   This permits the DNS to be used as a public key distribution
   mechanism in support of the DNS data origin authentication and other
   security services.

   The syntax of a KEY resource record (RR) is described in Section 3.
   It includes an algorithm identifier, the actual public key
   parameter(s), and a variety of flags including those indicating the
   type of entity the key is associated with and/or asserting that there
   is no key associated with that entity.

   Under conditions described in Section 3.5, security aware DNS servers
   will automatically attempt to return KEY resources as additional
   information, along with those resource records actually requested, to
   minimize the number of queries needed.

Donald E. Eastlake 3rd                                          [Page 6]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

2.3 Data Origin Authentication and Integrity

   Authentication is provided by associating with resource record sets
   (RRsets) the DNS cryptographically generated digital signatures.
   Commonly, there will be a single private key that signs for an entire
   zone. If a security aware resolver reliably learns the public key of
   the zone, it can verify, for signed data read from that zone, that it
   was properly authorized and is current.  The most secure
   implementation is for the zone private key to be kept off-line and
   used to re-sign all of the records in the zone periodically.

   This data origin authentication key belongs to the zone and not to
   the servers that store copies of the data.  That means compromise of
   a server or even all servers for a zone will not necessarily affect
   the degree of assurance that a resolver has that it can determine
   whether data is genuine.

   A resolver can learn the public key of a zone either by reading it
   from the DNS or by having it staticly configured.  To reliably learn
   the public key by reading it from the DNS, the key itself must be
   signed with a key the resolver trusts.  The resolver must be
   configured with at least the public key of one zone as a starting
   point.  From there, it can securely read the public keys of other
   zones, if the intervening zones in the DNS tree are secure and their
   signed keys accessible.

   Adding data origin authentication and integrity requires no change to
   the "on-the-wire" DNS protocol beyond the addition of the signature
   resource type and the key resource type needed for key distribution.
   (Data non-existence authentication also requires the NXT RR as
   described in 2.3.2.)  This service can be supported by existing
   resolver and caching server implementations so long as they can
   support the additional resource types (see Section 9). The one
   exception is that CNAME referrals from a secure zone can not be
   authenticated if they are from non-security aware servers (see
   Section 2.3.5).

   If signatures are separately retrieved and verified when retrieving
   the information they authenticate, there will be more trips to the
   server and performance will suffer.  Security aware servers mitigate
   that degradation by always attempting to send the signature(s)

2.3.1 The SIG Resource Record

   The syntax of a SIG resource record (signature) is described in
   Section 4.  It cryptographically binds the RR set being signed to the
   signer and a validity interval.

Donald E. Eastlake 3rd                                          [Page 7]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   Every name in a secured zone will have associated with it at least
   one SIG resource record for each resource type under that name except
   for glue address RRs and delgation point NS RRs.  A security aware
   server will attempt to return, with RRs retrieved, the corresponding
   SIGs.  If a server is not security aware, the resolver must retrieve
   all the SIG records for a name and select the one or ones that sign
   the resource record set(s) that resolver is interested in.

2.3.2 Authenticating Name and Type Non-existence

   The above security mechanism provides only a way to sign existing RR
   sets in a zone.  "Data origin" authentication is not obviously
   provided for the non-existence of a domain name in a zone or the
   non-existence of a type for an existing name.  This gap is filled by
   the NXT RR which authenticatably asserts a range of non-existent
   names in a zone and the non-existence of types for the existing name
   just before that range.

   Section 5 below covers the NXT RR.

2.3.3 Special Considerations With Time-to-Live

   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
   signature is verified.  This conflicts with our desire to have the
   time-to-live (TTL) field of resource records tick down while they are

   This could be avoided by leaving the time-to-live out of the digital
   signature, but that would allow unscrupulous servers to set
   arbitrarily long TTL values undetected.  Instead, we include the
   "original" TTL in the signature and communicate that data along with
   the current TTL. Unscrupulous servers under this scheme can
   manipulate the TTL but a security aware resolver will bound the TTL
   value it uses at the original signed value.  Separately, signatures
   include a time signed and an expiration time.  A resolver that knows
   the absolute time can 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, since the TTL is
   primarily a database consistency mechanism and non-security aware
   servers that depend on TTL must still be supported.

Donald E. Eastlake 3rd                                          [Page 8]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

2.3.4 Special Considerations at Delegation Points

   DNS security would like to view each zone as a unit of data
   completely under the control of the zone owner with each entry
   (RRset) signed by a special private key held by the zone.  But the
   DNS protocol views the leaf nodes in a zone, which are also the apex
   nodes of a subzone (i.e., delegation points), as "really" belonging
   to the subzone.  These nodes occur in two master files and might have
   RRs signed by both the upper and lower zone's keys.  A retrieval
   could get a mixture of these RRs and SIGs, especially since one
   server could be serving both the zone above and below a delegation

   There MUST be a zone KEY RR, signed by its superzone, for every
   subzone if the superzone is secure.  In the case of an unsecured
   subzone which can not or will not be modified to add any security
   RRs, a KEY declaring the subzone to be unsecured MUST appear in and
   be signed by the superzone, if the superzone is secure.  For all but
   one other RR type the data from the subzone is more authoritative so
   only the KEY RR in the superzone should be signed and the NS and any
   glue address RRs should only be signed in the subzone. The SOA and
   any other RRs that have the zone name as owner should appear only in
   the subzone and thus are signed only there. The NXT RR type is the
   exceptional case that will always appear differently and
   authoritatively in both the superzone and subzone, if both are
   secure, as described in Section 5.

2.3.5 Special Considerations with CNAME

   There is a problem when security related RRs with the same owner name
   as a CNAME RR are retrieved from a non-security-aware server.  In
   particular, an initial retrieval for the CNAME or any other type may
   not retrieve any associated signature, KEY, or NXT RR. For retrieved
   types other than CNAME, it will retrieve that type at the target name
   of the CNAME (or chain of CNAMEs) and will also return the CNAME.  In
   particular, a specific retrieval for type SIG will not get the SIG,
   if any, at the original CNAME domain name but rather a SIG at the
   target name.

   Security aware servers MUST be used to securely CNAME in DNS.
   Security aware servers must (1) allow KEY, SIG, and NXT RRs along
   with CNAME RRs, (2) suppress CNAME processing on retrieval of these
   types as well as on retrieval of the type CNAME, and (3)
   automatically return SIG RRs authenticating the CNAME or CNAMEs
   encountered in resolving a query.  This is a change from the previous
   DNS standard [RFCs 1034/1035] which prohibited any other RR type at a
   node where a CNAME RR was present.

Donald E. Eastlake 3rd                                          [Page 9]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

2.3.6 Signers Other Than The Zone

   There are two cases where a SIG resource record is signed by other
   than the zone private key.

   One is for support of dynamic update [RFC 2136], or future requests
   which require authentication, where an entity is permitted to
   authenticate/update its records [RFC 2137].  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 and request authentication as
   described in Section 2.4 immediately below.

2.4 DNS Transaction and Request Authentication

   The data origin authentication service described above protects
   retrieved resource records but provides no protection for DNS
   requests or for message headers.

   If header bits are falsely set by a bad server, there is little that
   can be done.  However, it is possible to add transaction
   authentication.  Such authentication means that a resolver can be
   sure it is at least getting messages from the server it thinks it
   queried and that the response is from the query it sent (i.e., that
   these messages have not been diddled in transit).  This is
   accomplished by optionally adding a special SIG resource record at
   the end of the reply which digitally signs the concatenation of the
   server's response and the resolver's query.

   Requests can also be authenticated by including a special SIG RR at
   the end of the request.  Authenticating requests serves no function
   in older DNS servers and requests with a non-empty additional
   information section are ignored by many older and current DNS
   servers.  However, this syntax for signing requests is defined in
   connection with authenticating secure dynamic update requests [RFC
   2137] or future requests requiring authentication.

   The private keys used in transaction and request security belong to
   the host composing the request or reply, not to the zone involved.
   The corresponding public key is normally stored in and retrieved from
   the DNS for verification.

   Because requests and replies are highly variable, message
   authentication SIGs can not be pre-calculated.  Thus it will be
   necessary to keep the private key on-line, for example in software or
   in a directly connected piece of hardware.

Donald E. Eastlake 3rd                                         [Page 10]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

3. The KEY Resource Record

   The KEY resource record (RR) is used to store a key that is
   associated with a Domain Name System (DNS) 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, a host or other end entity, or a user.  A KEY
   RR is, like any other RR, authenticated by a SIG RR. Security aware
   DNS implementations MUST be designed to handle at least two
   simultaneously valid keys of the same type associated with a name.

   The type number for the KEY RR is TBD [was 25 in RFC 2065 but may
   need to change due to changes in KEY RR].

3.1 KEY RDATA format

   The RDATA for a KEY RR consists of flags, preference, key identifier,
   a protocol octet, the algorithm number, and the public key itself.
   The 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
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   |                            flags                              |
   |           preference          |         key identifier        |
   |    protocol   |   algorithm   |                               /
   +---------------+---------------+      public key data          /
   /                     (optional depending on flags/algorithm)   /
   /                                                               /

   The KEY RR is not intended for storage of certificates and a separate
   certificate RR is being considered, to be defined in a separate

   The meaning of the KEY RR owner name, flags, preference, key
   identifier, and protocol octet are described in Sections 3.1.1
   through 3.1.5 below.  The flags and algorithm must be examined before
   any data following the algorithm octet as they control the existence
   and format of any following data.  The algorithm and public key
   fields are described in Section 3.2.  The format of the public key is
   algorithm dependent.

   KEY RRs do not expire but their authenticating SIG RR does as
   described in Section 4 below.

Donald E. Eastlake 3rd                                         [Page 11]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

3.1.1 Object Types, DNS Names, and Keys

   The public key in a KEY RR belongs to the object named in the owner

   This DNS name may refer to up to three different categories of
   things.  For example, foo.host.example could be (1) a zone, (2) a
   host or other end entity , or (3) the mapping into a DNS name of the
   user or account foo@host.example.  Thus, there are flags, as
   described below, in the KEY RR to indicate with which of these roles
   the owner name and public key are associated.  Note that an
   appropriate zone KEY RR MUST occur at the apex node of a secure zone.

   Although the same name can be used for up to all three of these
   categories, in which case there would normally be three KEY RRs at
   that name with different flags, such overloading of a name is
   discouraged.  It is also 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 corresponding private key
   be kept on line and thereby become more vulnerable than if it were
   kept off line.

   In addition to the name type bits, there are additional flag bits,
   all described below.

3.1.2 The KEY RR Flag Field

   In the "flags" field:

     Bit 0 and 1 are the key "type" field.  Bit 0 a one indicates that
   use of the key is prohibited for authentication.  Bit 1 a one
   indicates that use of the key is prohibited for confidentiality. If
   this field is zero, then use of the key for authentication and/or
   confidentiality is permitted. Note that DNS security makes use of
   keys for authentication only. Confidentiality use flagging is
   provided for use of keys in other protocols.  Implementations not
   intended to support key distribution for confidentiality MAY require
   that the confidentiality use prohibited bit be on for keys they
   serve.  If both bits of this field are one, the "no key" value, there
   is no key information and the RR stops after the algorithm octet.  By
   the use of this "no key" value, a signed KEY RR can authenticatably
   assert that, for example, a zone is not secured.  See section 3.4

     Bits 2-4 are reserved and must be zero.

     Bit 5 on indicates that this is a key associated with a "user" or

Donald E. Eastlake 3rd                                         [Page 12]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   "account" at an end entity, usually a host.  The coding of the owner
   name is that used for the responsible individual mailbox in the SOA
   and RP RRs: The owner name is the user name as the name of a node
   under the entity name.  For example, "j_random_user" on
   host.subdomain.example could have a public key associated through a
   KEY RR with name j_random_user.host.subdomain.example and the user
   bit a one.  It could be used in a security protocol where
   authentication of a user was desired.  This key might be useful in IP
   or other security for a user level service such a telnet, ftp,
   rlogin, etc.

     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
   host but could, in some parts of the DNS tree, be some other type of
   entity such as a telephone number [RFC 1530] or numeric IP address.
   This is the public key used in connection with DNS request and
   transaction authentication services if the owner name designates a
   DNS resolver or server host.  It could also be used in an IP-security
   protocol where authentication at the host, rather than user, level
   was desired, such as routing, NTP, etc.

     Bit 7 is the "zone" bit and indicates that this is a zone key for
   the zone whose name is the KEY RR owner name.  This is the public key
   used for the primary DNS security feature of data origin

     Bit 8 is reserved to be the IPSEC [RFC 1825] bit and indicates that
   this key is valid for use in conjunction with that security standard.
   This key could be used in connection with secured communication on
   behalf of an end entity or user whose name is the owner name of the
   KEY RR if the entity or user bits are on.  The presence of a KEY
   resource with the IPSEC and entity bits on and the key type field
   (bits 0 and 1) set to indicate a key is present is an assertion that
   the host speaks IPSEC.

     Bit 9 is reserved to be the "email" bit and indicate that this key
   is valid for use in conjunction with MIME security multiparts.  This
   key could be used in connection with secured communication on behalf
   of an end entity or user whose name is the owner name of the KEY RR
   if the entity or user bits are on.

     Bit 10 is reserved to be the TLS bit [draft-ietf-tls-*.txt] and
   indicates that this key is valid for use in conjunction with that
   security standard.  This key could be used in connection with secured
   communication on behalf of an end entity or user whose name is the
   owner name of the KEY RR if the entity or user bits are on.  The
   presence of a KEY resource with the TLS and entity bits on and the
   key type field (bits 0 and 1) set to indicate a key is present is an
   assertion that the host speaks TLS.

Donald E. Eastlake 3rd                                         [Page 13]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

     Bit 11 is reserved and must be zero.

     Bits 12-15 are the "signatory" field.  If non-zero, they indicate
   that the key can validly sign RRs or updates of the same name.  If
   the owner name is a wildcard, then RRs or updates with any name which
   is in the wildcard's scope can, in some cases, be signed.  Fifteen
   different non-zero values are possible for this field and any
   differences in their meaning are reserved for definition in
   connection with DNS dynamic update [RFC 2137] or other new DNS
   commands.  Zone keys always have authority to sign any RRs in the
   zone regardless of the value of this field.  The signatory field,
   like all other aspects of the KEY RR, is only effective if the KEY RR
   is appropriately signed by a SIG RR.

   Bits 16-31 are reserved and must be zero.

3.1.3 Preference Field

   The "preference" field is an unsigned sixteen bit integer with octets
   in network order that is used to indicate the relative preference of
   different KEY RRs used for the same purpose. A smaller value is
   preferred to a larger value.  (It is not generally significant for
   DNS origin authentication use, as zones SHOULD be signed by all the
   applicable zone keys, but is intended for use in keys retrieved for
   other protocols.)

3.1.4 Key Identifier Field

   The "key identifier" field is assigned to the key and matches the key
   identifier field in SIG RRs (1) whose signer name is the KEY RR owner
   name and (2) that were signed by the private key corresponding to the
   public key in the KEY RR.

3.1.5 The Protocol Octet

   It is anticipated that some keys stored in DNS will be used in
   conjunction with Internet protocols other than DNS (keys with zone
   bit or signatory field non-zero) and IPSEC/email/TLS (keys with
   IPSEC, email and/or TLS bit set).  The protocol octet is provided to
   indicate that a key is valid for such use and, for end entity keys or
   the host part of user keys, that the secure version of that protocol
   is implemented on that entity or host.

   Values between 1 and 223 decimal inclusive are available for

Donald E. Eastlake 3rd                                         [Page 14]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   assignment by IANA for such protocols.  The 31 values between 224 and
   254 inclusive will not be assigned to a specific protocol and are
   available for experimental use under private bilateral agreement.
   Value 0 indicates, for a particular key, that it is not valid for any
   particular additional protocol beyond those indicated in the flag
   field. And value 255 indicates that the key is valid for all assigned
   protocols (those in the 1 to 223 range).

   It is intended that new uses of DNS stored keys would initially be
   implemented, and limited operational experience gained, using the
   experimental range of the protocol octet.  If demand for widespread
   deployment for the indefinite future warrants, a value in the
   assigned range would then be designated for the protocol.  Finally,
   (1) should the protocol become so widespread in conjunction with
   other protocols and with which it shares key values that duplicate
   RRs are a serious burden and (2) should the protocol provide
   substantial facilities not available in any protocol for which a
   flags field bit has been allocated, then one of the remaining flag
   field bits may be allocated to the protocol. When such a bit has been
   allocated, a key can be simultaneously indicated as valid for that
   protocol and the entity or host can be simultaneously flagged as
   implementing the secure version of that protocol, along with other
   protocols for which flag field bits have been assigned.

3.2 The KEY Algorithm Number Specification

   This octet is the key algorithm parallel to the same field for the
   SIG resource.  The MD5/RSA algorithm described in this document is
   number 1. Numbers 2 through 253 are available for assignment should
   sufficient reason arise.  However, the designation of a new algorithm
   could have a major impact on interoperability and requires an IETF
   standards action.  Number 254 is reserved for private use and will
   never be assigned a specific algorithm.  For number 254, the public
   key area for the KEY RR and the signature are in the SIG RR will
   actually begin with a length byte followed by an Object Identifier
   (ISO OID) of that length.  The OID indicates the private algorithm in
   use and the remainder of the area is whatever is required by that
   algorithm. Values 0 and 255 are reserved.

3.2.1 The MD5/RSA Algorithm

   If the type field does not have the "no key" value and the algorithm
   field is 1, indicating the MD5/RSA algorithm, the public key field is
   structured as follows:

Donald E. Eastlake 3rd                                         [Page 15]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

                        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
   |         pub exp length       |      public key exponent       /
   |                                                               /
   +-                           modulus                            /
   |                                                               /

   To promote interoperability, the exponent and modulus are each
   currently limited to 4096 bits in length.  The public key exponent is
   a variable length unsigned integer.  Its length in octets is
   represented as a two octet unsigned integer.  The public key modulus
   field is a multiprecision unsigned integer.  The length of the
   modulus can be determined from the RDLENGTH and the preceding RDATA
   fields including the exponent.  Leading zero octets are permitted in
   the exponent and modulus.

3.3 Interaction of Flags, Algorithm, and Protocol Bytes

   Various combinations of the no-key type value, algorithm byte,
   protocol byte, and any protocol indicating flags (such as the
   reserved IPSEC flag) are possible.  (Note that the zone flag bit
   being on or the signatory field being non-zero is effectively a DNS
   protocol flag on.)  The meaning of these combinations is indicated

   NK = no key type value
   AL = algorithm byte
   PR = protocols indicated by protocol byte or protocol flags

   x represents any valid non-zero value(s).

    AL  PR   NK  Meaning
     0   0   0   Illegal, claims key but has bad algorithm field.
     0   0   1   Specifies total lack of security for owner.
     0   x   0   Illegal, claims key but has bad algorithm field.
     0   x   1   Specified protocols unsecured, others may be secure.
     x   0   0   Useless.  Gives key but no protocols to use it.
     x   0   1   Useless.  Denies key but for no protocols.
     x   x   0   Specifies key for protocols and asserts that
                  those protocols are implemented with security.
     x   x   1   Algorithm not understood for protocol.

   (remember, in reference to the above table, that a protocol byte of
   255 means all protocols with protocol byte values assigned)

Donald E. Eastlake 3rd                                         [Page 16]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

3.4 Determination of Zone Secure/Unsecured Status

   A zone KEY RR with the "no-key" type field value (both bits 0 and 1
   on) indicates that the zone named is unsecured while a zone KEY RR
   with a key present indicates that the zone named is secure.  It is
   possible for conflicting zone KEY RRs to be present.

   Zone KEY RRs, like all RRs, are only trusted if they are
   authenticated by a SIG RR whose signer field is a signer for which
   the resolver has a public key they trust.  Untrusted zone KEY RRs can
   be ignored in determining the security status of the zone.  There can
   be multiple sets of trusted zone KEY RRs for a zone with each set
   having a different signer.

   Zones can be (1) secure, indicating that any retrieved RR must be
   authenticated by a SIG RR or it will be discarded as bogus, (2)
   unsecured, indicating that SIG RRs are not expected or required for
   RRs retrieved from the zone, or (3) experimentally secure, which
   indicates that SIG RRs might or might not be present but must be
   checked if found.  The status of a zone is determined as follows:

   1. If, for a zone, every zone KEY RR signed by a signer trusted by
      the resolver says there is no key for that zone, it is unsecured.

   2. If, for every trusted zone KEY RR signer for a zone, there is at
      least one no-key KEY RR and for at least one trusted zone KEY RR
      signer there are one or more key specifying KEY RR(s), then that
      zone is only experimentally secure.  Both authenticated and non-
      authenticated RRs for it should be accepted by the resolver.

   3. If any trusted zone KEY RR signer for the zone has only key
      specifying KEY RR(s) for the zone, then it is secure and only
      authenticated RRs from it will be accepted.


   (1)  A resolver only trusts signatures by the superzone within the
   DNS hierarcy so it will look only at the KEY RRs that are signed by
   the superzone.  If it finds only no-key KEY RRs, it will assume the
   zone is not secure.  If it finds only key specifying KEY RRs, it will
   assume the zone is secure and reject any unsigned responses.  If it
   finds both, it will assume the zone is experimentally secure

   (2)  A resolver trusts the superzone of zone Z (to which it got
   securely from its local zone) and a third party, cert-auth.xx.  When
   considering data from zone Z, it may be signed by the superzone of Z,
   by cert-auth.xx, by both, or by neither.  The following table
   indicates whether zone Z will be considered secure, experimentally
   secure, or unsecured, depending on the signed zone KEY RRs for Z;

Donald E. Eastlake 3rd                                         [Page 17]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

                         c e r t - a u t h . x x

              |   None    |  NoKeys   |  Mixed   |   Keys   |
    S       --+-----------+-----------+----------+----------+
    u  None   | illegal   | unsecured | experim. | secure   |
    p         +-----------+-----------+----------+----------+
    e  NoKeys | unsecured | unsecured | experim. | secure   |
    r         +-----------+-----------+----------+----------+
    Z  Mixed  | experim.  | experim.  | experim. | secure   |
    o         +-----------+-----------+----------+----------+
    n  Keys   | secure    | secure    | secure   | secure   |
    e         +-----------+-----------+----------+----------+

3.5 KEY RRs in the Construction of Responses

   An explicit request for KEY RRs does not cause any special additional
   information processing except, of course, for the corresponding SIG
   RR from a security aware server.

   Security aware DNS servers MUST include KEY RRs as additional
   information in responses, where a KEY is available, in the following

   (1) On the retrieval of NS RRs, the zone key KEY RR(s) for the zone
   served by these name servers MUST be included as additional
   information if space is available.  There will always be at least one
   such KEY RR in a secure zone, even if it has the no-key type value to
   indicate that the subzone is unsecured.  If not all additional
   information will fit, the KEY RR(s) have higher priority than type A
   or AAAA glue RRs.  If such a KEY RR does not fit on a retrieval, the
   retrieval must be considered truncated.

   (2) On retrieval of type A or AAAA RRs, the end entity KEY RR(s) MUST
   be included if space is available.  On inclusion of A or AAAA RRs as
   additional information, KEY RRs with the same name will also be
   included but with lower priority than the A or AAAA RRs.

Donald E. Eastlake 3rd                                         [Page 18]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

4. The SIG Resource Record

   The SIG or "signature" resource record (RR) is the fundamental way
   that data is authenticated in the secure Domain Name System (DNS). As
   such it is the heart of the security provided.

   The SIG RR unforgably authenticates an RRset of a particular type,
   class, and name and binds it to a time interval and the signer's
   domain name.  This is done using cryptographic techniques and the
   signer's private key.  The signer is frequently the owner of the zone
   from which the RR originated.  The SIG RR is only intended to be
   meaningful to DNS security.

   The type number for the SIG RR type is 24.

4.1 SIG RDATA Format

   The RDATA portion of a SIG RR is as shown below.  The integrity of
   the RDATA information is 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
       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    |
      |                         original TTL                          |
      |                      signature expiration                     |
      |                         time signed                           |
      |         key identifier        |                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+         signer's name         +
      |                                                               /
      /                                                               /
      /                            signature                          /
      /                                                               /


   The "type covered" is the type of the other RRs covered by this SIG.

Donald E. Eastlake 3rd                                         [Page 19]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

4.1.2 Algorithm Number Field

   This octet is as described in section 3.2.

4.1.3 Labels Field

   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
   root and not counting any initial "*" for a wildcard.  If a secured
   retrieval is the result of wild card substitution, it is necessary
   for the resolver to use the original form of the name in verifying
   the digital signature.  This field makes it easy to determine the
   original form.

   If, on retrieval, the RR appears to have a longer name than indicated
   by "labels", the resolver can tell it is the result of wildcard
   substitution.  If the RR owner name appears to be shorter than the
   labels count, the SIG RR must be considered corrupt and ignored.  The
   maximum number of labels allowed in the current DNS is 127 but the
   entire octet is reserved and would be required should DNS names ever
   be expanded to 255 labels.  The following table gives 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. |

4.1.4 Original TTL Field

   The "original TTL" field is included in the RDATA portion to avoid
   (1) authentication problems that caching servers would otherwise
   cause by decrementing the real TTL field and (2) security problems
   that unscrupulous servers could otherwise cause by manipulating the
   real TTL field.  This original TTL is protected by the signature
   while the current TTL field is not.

   NOTE:  The "original TTL" must be restored into the covered RRs when
   the signature is verified.  This implies that all RRs for a
   particular type, name, and class must have the same TTL to start

Donald E. Eastlake 3rd                                         [Page 20]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

4.1.5 Signature Expiration and Time Signed Fields

   The SIG is valid until the "signature expiration" time which is an
   unsigned number of seconds since the start of 1 January 1970, GMT,
   ignoring leap seconds.  (See also Section 4.4.)  Ring arithmetic is
   used as for DNS SOA serial numbers [RFC 1982] which means that the
   expiration date can never be much more than 130 years in the future.

   The "time signed" field is an unsigned number of seconds since the
   start of 1 January 1970, GMT, ignoring leap seconds.  SIG RRs SHOULD
   NOT have a date signed more than a few days in the future.  To
   prevent misordering of network requests to update a zone dynamically,
   monotonically increasing "time signed" dates may be necessary.

   SOA serial numbers for secure zones MUST not only be advanced when
   their data is updated but also when new SIG RRs are inserted (ie, the
   zone or any part of it is re-signed).

   A SIG RR may have an expiration date numerically less than the time
   signed if time is near the 32 bit wrap around point and/or the
   signature is long lived.

4.1.6 Key Identifier Field

   The "key identifier" is a two octet quantity that is used to
   efficiently select between multiple keys which may be applicable and
   thus check that a public key about to be used for the computationally
   expensive effort to check the signature is possibly valid.  It is
   assigned by the entity creating the KEY RRs, appears in the
   corresponding KEY RR, and MUST be unique among valid KEY RRs of the
   same name and algorithm.

4.1.7 Signer's Name Field

   The "signer's name" field is the domain name of the signer generating
   the SIG RR.  This is the owner of the public KEY RR that can be used
   to verify the signature.  It is frequently the zone which contained
   the RRset being authenticated.  The signer's name may be compressed
   with standard DNS name compression when being transmitted over the

Donald E. Eastlake 3rd                                         [Page 21]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

4.1.8 Signature Field

   The structure of the "signature" field is described below. Signature Data

   The actual signature portion of the SIG RR binds the other RDATA
   fields to all of the "type covered" RRs with that owner name and
   class.  This covered RRset is thereby authenticated.  To accomplish
   this, a data sequence is constructed as follows:

              data = RDATA | RR(s)...

   where "|" is concatenation, RDATA is wire format of all the RDATA
   fields in the SIG RR itself including the canonical form of the
   signers name before and not including the signature, and RR(s) are
   all the RR(s) of the type covered with the same owner name and class
   as the SIG RR in canonical form and order as defined in section 8.
   How this data sequence is processed into the signature is algorithm

   SIGs SHOULD NOT be included in a zone for any "meta-type" such as
   ANY, AXFR, etc. MD5/RSA Algorithm Signature Calculation

   For the MD5/RSA algorithm, the signature is as follows

         hash = MD5 ( data )

         signature = ( 01 | FF* | 00 | prefix | hash ) ** e (mod n)

   where MD5 is the message digest algorithm documented in RFC 1321, "|"
   is concatenation, "e" is the private key exponent of the signer, and
   "n" is the modulus of the signer's public key.  01, FF, and 00 are
   fixed octets of the corresponding hexadecimal value. "prefix" is the
   ASN.1 BER MD5 algorithm designator prefix specified in PKCS1, that
     hex 3020300c06082a864886f70d020505000410 [NETSEC].

   This prefix is included to make it easier to use RSAREF (or similar
   packages such as EuroRef).  The FF octet MUST be repeated the maximum
   number of times such that the value of the quantity being
   exponentiated is one octet shorter than the value of n.

   (The above specifications are identical to the corresponding part of

Donald E. Eastlake 3rd                                         [Page 22]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   Public Key Cryptographic Standard #1 [PKCS1].)

   The size of n, including most and least significant bits (which will
   be 1) MUST be not less than 512 bits and not more than 4096 bits.  n
   and e SHOULD be chosen such that the public exponent is small.

   Leading zero bytes are permitted in the MD5/RSA algorithm signature.

   A public exponent of 3 minimizes the effort needed to decode a
   signature.  Use of 3 as the public exponent may be weak for
   confidentiality uses since, if the same data can be collected
   encrypted under three different keys with an exponent of 3 then,
   using the Chinese Remainder Theorem [NETSEC], the original plain text
   can be easily recovered.  This weakness is not significant for DNS
   security because we seek only authentication, not confidentiality. Transaction and Request SIGs

   A response message from a security aware server may optionally
   contain a special SIG as the last item in the additional information
   section to authenticate the transaction.

   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 of
   the entire preceding DNS reply message, including DNS header but not
   the IP header and before the reply RR counts have been adjusted for
   the inclusion of any transaction SIG, concatenated with the entire
   DNS query message that produced this response, including the query's
   DNS header and any request SIGs but not its IP header.  That is

     data = full response (less transaction SIG) | full query

   Verification of the transaction SIG (which is signed by the server
   host key, not the zone key) by the requesting resolver shows that the
   query and response were not tampered with in transit, that the
   response corresponds to the intended query, and that the response
   comes from the queried server.

   A DNS request may be optionally signed by including one or more SIGs
   at the end of the query. Such SIGs are identified by having a "type
   covered" field of zero. They sign the preceding DNS request message
   including DNS header but not including the IP header or any request
   SIGs at the end and before the request RR counts have been adjusted
   for the inclusions of any request SIG.

   WARNING: Request SIGs are unnecessary for currently defined queries
   and will cause almost all existing DNS servers to completely ignore a
   query.  However, such SIGs are needed to authenticate some DNS secure

Donald E. Eastlake 3rd                                         [Page 23]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   dynamic update requests [RFC 2137] and may in the future been needed
   for other requests.

   Except where needed to authenticate an update or similar privileged
   request, servers are not required to check request SIGs.

4.2 SIG RRs in the Construction of Responses

   Security aware DNS servers MUST, for every authenticated RR the query
   will return, attempt to send the available SIG RRs which authenticate
   the requested RR.  The following rules apply to the inclusion of SIG
   RRs in responses:

     1. when an RRset is placed in a response, its SIG RR has a higher
        priority for inclusion than other additional RRs that may need
        to be included.  If space does not permit its inclusion, the
        response MUST be considered truncated except as provided in 2

     2. when a SIG RR is present in the zone for an additional
        information section RR, the response MUST NOT be considered
        truncated merely because space does not permit the inclusion of
        its SIG RR.

     3. SIGs to authenticate non-authoritative data (glue records and NS
        RRs for subzones) are unnecessary and MUST NOT be sent.  (Note
        that KEYs given for a subzone in that subzone's superzone is
        controlling so the superzone's signature on the KEY MUST be
        included (unless the KEY was additional information and the SIG
        did not fit).)

     4. If a SIG covers any RR that would be in the answer section of
        the response, its automatic inclusion MUST be in the answer
        section.  If it 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.  This is a change in the existing standard [RFCs
        10334/1035] which contemplates only NS and SOA RRs in the
        authority section.

     5. Optionally, DNS transactions may be authenticated by a SIG RR at
        the end of the response in the additional information section
        (Section  Such SIG RRs are signed by the DNS server
        originating the response.  Although the signer field MUST be the
        name of the originating server host, the owner name, class, TTL,
        and original TTL, are meaningless.  The class and TTL fields
        SHOULD be zero.  To conserve space, the owner name SHOULD be

Donald E. Eastlake 3rd                                         [Page 24]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

        root (a single zero octet).  If transaction authentication is
        desired, that SIG RR must be considered the highest priority for

4.3 Processing Responses and SIG RRs

   The following rules apply to the processing of SIG RRs included in a

     1. a security aware resolver that receives a response from what it
        believes to be a security aware server via a secure
        communication with the AD bit (see Section 6.1) set, MAY choose
        to accept the RRs as received without verifying the zone SIG

     2. in other cases, a security aware resolver SHOULD verify the SIG
        RRs for the RRs of interest.  This may involve initiating
        additional queries for SIG or KEY RRs, especially in the case of
        getting a response from an server that does not implement
        security.  (As explained in 2.3.5 above, it will not be possible
        to secure CNAMEs being served up by non-secure resolvers.)

        NOTE: Implementers might expect the above SHOULD to be a MUST.
        However, local policy or the calling application may not require
        the security services.

     3. If SIG RRs are received in response to a user query explicitly
        specifying the SIG type, no special processing is required.

   If the message does not pass integrity checks or the SIG does not
   check against the signed RRs, the SIG RR is invalid and should be
   ignored.  If all of the SIG RR(s) purporting to authenticate an RRset
   are invalid, then the RRset is not authenticated.

   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
   transaction signature of the response and the query that produced the
   response.  It MAY be optionally checked and the message rejected if
   the checks fail.  But even if the checks succeed, such a transaction
   authentication SIG does NOT authenticate any RRs in the message.
   Only a proper SIG RR signed by the zone or a key tracing its
   authority to the zone or to static resolver configuration can
   authenticate RRs.  If a resolver does not implement transaction
   and/or request SIGs, it MUST ignore them without error.

   If all checks indicate that the SIG RR is valid then RRs verified by
   it should be considered authenticated.

Donald E. Eastlake 3rd                                         [Page 25]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

4.4 Signature Lifetime, Expiration, TTLs, and Validity

   Security aware servers must not consider SIG RRs to authenticate
   anything after their expiration time and not consider any RR to be
   authenticated after all its signatures have expired.  Within that
   constraint, servers should continue to follow DNS TTL aging.  Thus
   authoritative servers should continue to follow the zone refresh and
   expire parameters and a non-authoritative server should count down
   the TTL and discard RRs when the TTL is zero.  In addition, when RRs
   are transmitted in a query response, the TTL should be trimmed so
   that current time plus the TTL does not extend beyond the signature
   expiration time.  Thus, in general, the TTL on a transmitted RR would


   When signatures are generated, signature expiration times must be set
   far enough in the future that it is quite certain that new signatures
   can be generated before the old ones expire.  However, setting
   expiration too far into the future could, if bad data or signatures
   were ever generated, mean a long time to flush such badness.

   It is recommended that signature lifetime be a small multiple of the
   TTL (ie, 4 to 16 times the TTL) but not less than a reasonable
   maximum re-signing interval and not less than the zone expiry time.

4.5 The Root Zone as Signer and Zone Skipping

   It should be noted that in DNS the root is a zone unto itself.  Thus
   the root zone key should only be seen signing itself or signing RRs
   with names one level below root, such as .aq, .edu, or .arpa.
   Implementations SHOULD reject as bogus any purported root signature
   of records with a name more than one level below root.  The root zone
   contains the root KEY RR signed by a SIG RR under the root key

   The signing authority of a zone key ends with the delegation points
   within that zone.  Implementations SHOULD reject purported signatures
   on data below the apex of a subzone (or even lower level data) by the
   superzone's key.

Donald E. Eastlake 3rd                                         [Page 26]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

5. Non-existent Names and Types

   The SIG RR mechanism described in Section 4 above provides strong
   authentication of RRs that exist in a zone.  But is it not clear
   above how to authenticatably deny the existence of a name in a zone
   or a type for an existent name.

   The nonexistence of a name in a zone is indicated by the NXT ("next")
   RR for a name interval containing the nonexistent name. A NXT RR and
   its SIG are returned in the authority section, along with the error,
   if the server is security aware.  The same is true for a non-existent
   type under an existing name.  This is a change in the existing
   standard [RFCs 1034/1035] which contemplates only NS and SOA RRs in
   the authority section. NXT RRs will also be returned if an explicit
   query is made for the NXT type.

   The existence of a complete set of NXT records in a zone means that
   any query for any name and any type to a security aware server
   serving the zone will result in an reply containing at least one
   signed RR unless it is a query for delegation point NS or glue A or
   AAAA RRs.

5.1 The NXT Resource Record

   The NXT resource record is used to securely indicate that RRs with an
   owner name in a certain name interval do not exist in a zone and to
   indicate what RR types are present for an existing name.

   The owner name of the NXT RR is an existing name in the zone.  It's
   RDATA is a "next" name and a type bit map. The presence of the NXT RR
   means that no name between its owner name and the name in its RDATA
   area exists and that no other types exist under its owner name.  This
   implies a canonical ordering of all domain names in a zone as
   described in Section 8.

   There is a potential problem with the last NXT in a zone as it wants
   to have an owner name which is the last existing name in canonical
   order, 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 treating the name space as circular and putting the zone
   name in the RDATA of the last NXT in a zone.

   The NXT RRs for a zone SHOULD be automatically calculated and added
   to the zone when SIGs are added.  The NXT RR's TTL SHOULD NOT exceed
   the zone minimum TTL.

   The type number for the NXT RR is 30.

Donald E. Eastlake 3rd                                         [Page 27]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

5.2 NXT RDATA Format

   The RDATA for an NXT RR consists simply of a domain name followed by
   a bit map, as shown below.

                              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
         |                  next domain name                             /
         |                    type bit map                               /

   The NXT RR type bit map is one bit per RR type present for the owner
   name similar to the WKS RR socket bit map.  The first bit represents
   RR type zero (an illegal type which should not be present.) A one bit
   indicates that at least one RR of that type is present for the owner
   name.  A zero indicates that no such RR is present.  All bits not
   specified because they are beyond the end of the bit map are assumed
   to be zero.  Note that bit 30, for NXT, will always be on so the
   minimum bit map length is actually four octets.  The NXT bit map
   should be printed as a list of RR type mnemonics or decimal numbers
   similar to the WKS RR.

   The domain name may be compressed with standard DNS name compression
   when being transmitted over the network.  The size of the bit map can
   be inferred from the RDLENGTH and the length of the next domain name.

5.3 Example

   Assume zone foo.nil has entries for


   Then a query to a security aware server for huge.foo.nil would
   produce an error reply with an RCODE of NXDOMAIN and the authority
   section data including something like the following:

Donald E. Eastlake 3rd                                         [Page 28]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

      big.foo.nil. NXT medium.foo.nil. A MX SIG NXT
      big.foo.nil. SIG NXT 1 3 ( ;type-cov=NXT, alg=1, labels=3
                       19960102030405 ;signature expiration
                       19951211100908 ;time signed
                       21435          ;key identifier
                       foo.nil.       ;signer
       1tVfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= ;signature (640 bits)

   Note that this response implies that big.foo.nil is an existing name
   in the zone and thus has other RR types associated with it than NXT.
   However, only the NXT (and its SIG) RR appear in the response to this
   query for huge.foo.nil, which is a non-existent name.

5.4 Special Considerations at Delegation Points

   A name (other than root) which is the head of a zone also appears as
   the leaf in a superzone.  If both are secure, there will always be
   two different NXT RRs with the same name.  They can be distinguished
   by their signers and next domain name fields.  Security aware servers
   should return the correct NXT automatically when required to
   authenticate the non-existence of a name and both NXTs, if available,
   on explicit query for type NXT.

   Non-security aware servers will never automatically return an NXT and some old
   implementations may only return the NXT from the subzone on explicit

5.5 Zone Transfers

   The sections below descrie how full and incremental zone transfers are secured.

   SIG RRs secure
   all authoritative RRs transferred for both full and incremental [RFC 1995]
   zone transfers.  NXT RRs are an essential elements in secure zone transfers
   and assure that every authoritative name and type will be present;
   however, if there
   are multiple SIGs with the same name and type covered a subset of the
   SIGs could
   be sent as long as at least one is present and, in the case of
   unsigned delegation point NS or glue A or AAAA RRs a subset of these
   RRs could be sent as long as at least one of each type is included.

   When an incremental or full zone transfer request is received with
   the same or newer version number than that of

Donald E. Eastlake 3rd                                         [Page 29]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   the server's copy of the zone is received, it is replied to with just
   the SOA RR of
   the server's current version and the SIG(s) verifying that SOA RR.

5.5.1 Full Zone Transfers

   Even if all SIGs in a transfer verify, this does not
   indicate that the entire zone has been transfered.  However the NXT name chain
   can be used to verify that RRs for all authoritative
   names have been transfered and the
   NXT type bit map can be used to verify that at least one of
   all RR types for those names
   have been transfered.
   In combination, the above checks provide security checking for all
   signed RRs in a full zone
   transfer of a secure zone.

   To provide server authentication that a complete transfer has occured,
   transaction authentication SHOULD be used on all full zone transfers.  This
   provides strong protection for the entire zone in transit.

5.5.2 Incremental Zone Transfers

   Individual RRs in an incremental (IXFR) transfer [RFC 1995]
   can be verified in the same way as for a full zone transfer and
   the integrity of the NXT name chain and correctness of the NXT type bits
   for the zone after the incremental RR deletes and adds can check each
   disjoint area of the zone updated.
   But the completeness of an incremental transfer can not because usually
   neither the deleted RR section nor the added RR section
   has a compete NXT chain.  As a result, a server which securely supports
   IXFR must handle IXFR SIG RRs for each incremental transfer set
   that it maintains.

   The IXFR SIG is calculated over the incremental zone update collection of
   RRs in the order in which it is tranmitted: old SOA, then deleted RRs, then
   new SOA and added RRs.  It is recommended that, within each section, RRs
   be ordered as specified in Section 8.  If condensation of adjacent
   incremental update sets is done by the zone owner,
   the original IXFR SIG for each set included
   in the condensation must be discarded
   and a new on IXFR SIG calculated to cover the resulting condensed set.

   The IXFR SIG really belongs to the zone as a whole, not to the zone
   name.  Although it should be correct for the zone name, the labels
   field of an IXFR SIG is otherwise meaningless.  The IXFR SIG is only

Donald E. Eastlake 3rd                                         [Page 30]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   sent as part of an incremental zone transfer.  After validation of the IXFR
   SIG, the transfered RRs MAY be considered valid without verification of the
   internal SIGs.

Donald E. Eastlake 3rd                                         [Page 31]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

6. How to Resolve Securely and The AD and CD Bits

   Retrieving or resolving secure data from the Domain Name System
   (DNS) involves starting with one or more trusted public keys for one
   or more zones. With trusted keys, a resolver willing to perform
   cryptography can progress securely through the secure DNS zone
   structure to the zone of interest as described in Section 6.3. Such
   trusted public keys would normally be configured in a manner similar
   to that described in Section 6.2.  However, as a practical matter, a
   security aware resolver would still gain some 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 as a starting

   Data stored at a security aware server needs to be internally
   categorized as Authenticated, Pending, or Insecure. There is also a
   fourth transient state of Bad which indicates that all SIG checks
   have explicitly failed on the data. Such Bad data is not retained at
   a security aware server. Authenticated means that the data has a
   valid SIG under a KEY traceable via a chain of zero or more SIG and
   KEY RRs to a KEY staticly configured at the resolver.
   Pending data has no authenticated SIGs and at least one additional
   SIG the resolver is still trying to authenticate.  Insecure data is
   data which it is known can never be either Authenticated or found Bad
   because it is in or has been reached via a unsecured zone. Behavior
   in terms of control of and flagging based on such data labels is
   described in Section 6.1.

   The proper validation of signatures requires a reasonably secure
   shared opinion of the absolute time between resolvers and servers as
   described in Section 6.4.

6.1 The AD and CD Header Bits

   Two previously unused bits are allocated out of the DNS
   query/response format header. The AD (authentic data) bit indicates
   in a response that the data included has been verified by the server
   providing it.  The CD (checking disabled) bit indicates in a query
   that non-verified data is acceptable to the resolver sending the

   These bits are allocated from the must-be-zero Z field as follows:

Donald E. Eastlake 3rd                                         [Page 32]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

                                             1  1  1  1  1  1
               0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
             |                      ID                       |
             |QR|   Opcode  |AA|TC|RD|RA| Z|AD|CD|   RCODE   |
             |                    QDCOUNT                    |
             |                    ANCOUNT                    |
             |                    NSCOUNT                    |
             |                    ARCOUNT                    |

   These bits are zero in old servers and resolvers.  Thus the responses
   of old servers are not flagged as authenticated to security aware
   resolvers and queries from non-security aware resolvers do not assert
   the checking disabled bit and thus will be answered by security aware
   servers only with valid data. Aware resolvers MUST NOT trust the AD
   bit unless they trust the server they are talking to and either have
   a secure path to it or use DNS transaction security.

   Any security aware resolver willing to do cryptography SHOULD assert
   the CD bit on all queries to reduce DNS latency time by allowing
   security aware servers to answer before they have resolved the
   validity of data.

   Security aware servers NEVER return Bad data.  For non-security aware
   resolvers or security aware resolvers requesting service by having
   the CD bit clear, security aware servers MUST return only
   Authenticated or Insecure data with the AD bit set in the response.
   Security aware resolvers will know if data is Insecure versus
   Authentic by the absence of SIG RRs.  Security aware servers MAY
   return Pending data to security aware resolvers requesting the
   service by clearing the AD bit in the response.  The AD bit MUST NOT
   be set on a response unless all of the RRs in the response are either
   Authenticated or Insecure.

6.2 Staticly Configured Keys

   The public key to authenticate a zone MUST be defined in local
   configuration files before that zone is loaded at the primary server.

   While it might seem logical for everyone to start with a key for the
   root zone and staticly configure this in every resolver, this has
   problems.  The logistics of updating every DNS resolver in the world

Donald E. Eastlake 3rd                                         [Page 33]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   when the root key changes would be excessive.  It may be some time
   before there even is a root key.  Furthermore, many organizations
   will explicitly wish their "interior" DNS implementations to
   completely trust only their own zone.  Such interior resolvers can
   then go through the organization's zone servers to access data
   outsize the organization's domain and should only be configured with
   the key for the organization's DNS apex.

   Host resolvers that are not part of a larger organization will likely
   be configures with a key for the domain of their local ISP whose
   recursive secure DNS caching server they use.

6.3 Chaining Through Zones

   Starting with one or more trusted keys for any zone, it should be
   possible to retrieve signed keys for its subzones which have a key
   and, if the zone is not root, for its superzone. Every authoritative
   secure zone server MUST also include the KEY RR for a super-zone
   signed by the secure zone via static configuration. This makes it
   possible to climb the tree of zones if one starts below root.  A
   secure sub-zone is indicated by a KEY RR with non-null key
   information appearing with the NS RRs for the sub-zone.  These make
   it possible to descend within the tree of 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
   general, the lower such a distance number is, the greater the
   confidence in the data.  Data configured via a boot file directive
   should be given a distance number of zero.  If a query encounters
   different data for the same query with different distance values,
   that with a larger value should be ignored unless some other local
   policy covers the case and requires a different trust model.

   A security conscious resolver should completely refuse to step from a
   secure zone into a unsecured zone unless the unsecured zone is
   certified to be non-secure by the presence of an authenticated KEY RR
   for the unsecured zone with the no-key type value.  Otherwise the
   resolver is getting bogus or spoofed data.

   If legitimate unsecured zones are encountered in traversing the DNS
   tree, then no zone can be trusted as secure that can be reached only
   via information from such non-secure zones. Since the unsecured zone
   data could have been spoofed, the "secure" zone reach via it could be
   counterfeit.  The "distance" to data in such zones or zones reached
   via such zones could be set to 256 or more as this exceeds the
   largest possible distance through secure zones in the DNS.
   Nevertheless, continuing to apply secure checks within "secure" zones
   reached via unsecured zones is a good practice and will, as a

Donald E. Eastlake 3rd                                         [Page 34]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   practical matter, provide some small increase in security.

6.4 Secure Time

   Coordinated interpretation of the time fields in SIG RRs requires
   that reasonably consistent time be available to the hosts
   implementing the DNS security extensions.

   A variety of time synchronization protocols exist including the
   Network Time Protocol (NTP, RFC 1305).  If such protocols are used,
   they MUST be used securely so that time can not be spoofed.
   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

Donald E. Eastlake 3rd                                         [Page 35]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

7. ASCII Representation of Security RRs

   This section discusses the format for master file and other ASCII
   presentation of the three DNS security resource records.

   The algorithm field in KEY and SIG RRs can be represented as either
   an unsigned integer or symbolicly.  The following initial symbols are
   defined as indicated:

     001    RSAMD5
     253    NULL (obsolete, see RFC 2065)
     254    PRIVATE

   The key identifier field in KEY and SIG PRs is represented as an
   unsigned integer.

7.1 Presentation of KEY RRs

   KEY RRs may appear as single logical lines in a zone data master file
   [RFC 1033].

   The flag field is represented as an unsigned integer or a sequence of
   mnemonics as follows:

     BIT  Mnemonic  Explanation
    0   NOAUTH    authentication use prohibited
    1   NOCONF    confidentiality use prohibited
    5   USERK     user key
    6   ENTITYK   end entity key
    7   ZONEK     zone key
    8   IPSECK    IPSEC key
    9   MAILK     email key
   10   TLSK      TLS key
   12-15          signatory field, values 0 to 15
            can be represented by SIG0, SIG1, ... SIG15

   The preference field appear as unsigned integers.

   The protocol octet can be represented as either an unsigned integer
   or symbolicly.  The following initial symbols are defined:

     000    NONE
     255    ALL

   Note that if the type field has the "no key" value, nothing appears
   after the algorithm octet.

   The remaining public key portion is represented in base 64 (see

Donald E. Eastlake 3rd                                         [Page 36]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   Appendix A) and may be divided up into any number of white space
   separated substrings, down to single base 64 digits, which are
   concatenated to obtain the full signature.  These substrings can span
   lines using the standard parenthesis.

   Note that the public key may have internal sub-fields but these do
   not appear in the master file representation.  For example, with
   algorithm 1 there is a public exponent size, then a public exponent,
   and then a modulus.  With algorithm 254, there will be an OID size,
   an OID, and algorithm dependent information. But in both cases only a
   single logical base 64 string will appear in the master file.

7.2 Presentation of SIG RRs

   A SIG RR may be represented as a single logical line in a zone data
   file [RFC 1033] but there are some special considerations as
   described below.  (It does not make sense to include a transaction or
   request authenticating SIG RR in a file as they are a transient
   authentication that covers data including an ephemeral transaction
   number and so must be calculated in real time.)

   There is no particular problem with the signer, covered type, and
   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
   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 original TTL field appears as an unsigned integer.

   If the original TTL, which applies to the type signed, is the same as
   the TTL of the SIG RR itself, it may be omitted.  The date field
   which follows it is larger than the maximum possible TTL so there is
   no ambiguity.

   The "labels" field appears as an unsigned integer.

   The key identifier appears as unsigned decimal numbers.

   However, the signature itself can be very long.  It is the last data
   field and is represented in base 64 (see Appendix A) and may be
   divided up into any number of white space separated substrings, down
   to single base 64 digits, which are concatenated to obtain the full
   signature.  These substrings can be split between lines using the
   standard parenthesis.

Donald E. Eastlake 3rd                                         [Page 37]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

7.3 Presentation of NXT RRs

   NXT RRs do not appear in original unsigned zone master files since
   they should be derived from the zone as it is being siged.  If a
   signed file with NXTs added is printed, they appear as the next
   domain name followed by the RR type present bits in the same format
   as the WKS RR.

Donald E. Eastlake 3rd                                         [Page 38]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

8. Canonical Form and Order of Resource Records

   This section describes the canonical form of resource records (RRs),
   their default name order, and their intra-RRset order, for purposes
   of domain name system (DNS) security.  A canonical name order is
   necessary to construct the NXT name chain.  A canonical form and
   ordering within an RRset is necessary in construsting SIG RRs.  There
   is no requirement in DNS security for a canonical ordering of types
   within a name so none is defined.

8.1 Canonical RR Form

   For purposes of DNS security, the canonical form for an RR is the
   wire format of the RR with domain names (1) fully expanded (no name
   compression via pointers), (2) all domain name letters set to lower
   case, and (3) the original TTL substituted for the current TTL.

8.2 Canonical DNS Name Order

   For purposes of DNS security, the canonical ordering of owner names
   is to sort labels as unsigned left justified octet strings where the
   absence of a octet sorts before a zero value octet and upper case
   letters are treated as lower case letters.  Names are then sorted by
   sorting on the highest level label and then, within those names with
   the same highest level label by the next lower label, etc. down to
   leaf node labels.  Within a zone, the zone name itself always exists
   and all other names are the zone name with some prefix of lower level
   labels.  Thus the zone name itself always sorts first.


8.3 Canonical RR Ordering Within An RRset

   Within any particular owner name and type, RRs are sorted by RDATA as
   a left justified unsigned octet sequence where the absence of an
   octet sorts before the zero octet.

Donald E. Eastlake 3rd                                         [Page 39]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

9. Conformance

   Levels of server and resolver conformance are defined below.

9.1 Server Conformance

   Two levels of server conformance for DNS security are defined as

   BASIC:  Basic server compliance is the ability to store and retrieve
   (including zone transfer) SIG, KEY, and NXT RRs.  Any secondary,
   caching, or other server for a secure zone MUST have at least basic
   compliance and even then some things, such as secure CNAMEs, will not
   work without full compliance.

   FULL:  Full server compliance adds the following to basic compliance:
   (1) ability to read SIG, KEY, and NXT RRs in zone files and (2)
   ability, given a zone file and private key, to add appropriate SIG
   and NXT RRs, possibly via a separate application, (3) proper
   automatic inclusion of SIG, KEY, and NXT RRs in responses, (4)
   suppression of CNAME following on retrieval of the security type RRs,
   (5) recognize the CD query header bit and set the AD query header
   bit, as appropriate, and (6) proper handling of the two NXT RRs at
   delegation points.  Primary servers for secure zones MUST be fully
   compliant and for complete secure operation, all secondary, caching,
   and other servers handling the zone SHOULD be fully compliant as

9.2 Resolver Conformance

   Two levels of resolver compliance (including the resolver portion of
   a server) are defined for DNS Security:

   BASIC: A basic compliance resolver can handle SIG, KEY, and NXT RRs
   when they are explicitly requested.

   FULL: A fully compliant resolver (1) understands KEY, SIG, and NXT
   RRs including verification of SIGs, (2) maintains appropriate
   information in its local caches and database to indicate which RRs
   have been authenticated and to what extent they have been
   authenticated, (3) performs additional queries as necessary to
   attempt to obtain KEY, SIG, or NXT RRs from non-security aware
   servers, (4) normally sets the CD query header bit on its queries.

Donald E. Eastlake 3rd                                         [Page 40]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

10. Security Considerations

   This document describes extensions to the Domain Name System (DNS)
   protocol to provide data integrity and origin authentication, public
   key distribution, and optional transaction and request security.

   It should be noted that, at most, these extensions guarantee the
   validity of resource records, including KEY resource records,
   retrieved from the DNS.  They do not magically solve other security
   problems.  For example, using secure DNS you can have high confidence
   in the IP address you retrieve for a host name; however, this does
   not stop someone for substituting an unauthorized host at that
   address or capturing packets sent to that address and falsely
   responding with packets apparently from that address.  Any reasonably
   complete security system will require the protection of many
   additional facets of the Internet.

Donald E. Eastlake 3rd                                         [Page 41]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997


   [NETSEC] - Network Security: PRIVATE Communications in a PUBLIC
   World, Charlie Kaufman, Radia Perlman, & Mike Speciner, Prentice Hall
   Series in Computer Networking and Distributed Communications, 1995.

   [PKCS1] - PKCS #1: RSA Encryption Standard, RSA Data Security, Inc.,
   3 June 1991, Version 1.4.

   [RFC 1032] - M. Stahl, "Domain Administrators Guide", November 1987.

   [RFC 1033] - M. Lottor, "Domain Administrators Operations Guide",
   November 1987.

   [RFC 1034] - P. Mockapetris, "Domain Names - Concepts and
   Facilities", STD 13, November 1987.

   [RFC 1035] - P. Mockapetris, "Domain Names - Implementation and
   Specifications", STD 13, November 1987.

   [RFC 1305] - Mills, D., "Network Time Protocol (v3)", March 1992.

   [RFC 1321] - R. Rivest, "The MD5 Message-Digest Algorithm", April

   [RFC 1530] - Malamud, C., and M. Rose, "Principles of Operation for
   the TPC.INT Subdomain: General Principles and Policy", October 1993.

   [RFC 1750] - D. Eastlake, S. Crocker, and J. Schiller, "Randomness
   Requirements for Security", December 1994.

   [RFC 1825] - Atkinson, R., "Security Architecture for the Internet
   Protocol", August 1995.

   [RFC 1982] - R. Elz, R. Bush, "Serial Number Arithmetic", 09/03/1996.

   [RFC 1995] - Ohta, M., "Incremental Zone Transfer in DNS", August

   [RFC 2065] - D. Eastlake, C. Kaufman, "Domain Name System Security
   Extensions", 01/03/1997.

   [RFC 2136] - P. Vixie, S. Thomson, Y. Rekhter, J. Bound, "Dynamic
   Updates in the Domain Name System (DNS UPDATE)", 04/21/1997.

   [RFC 2137] - D. Eastlake, "Secure Domain Name System Dynamic Update",

   [RSA FAQ] - RSADSI Frequently Asked Questions periodic posting.

Donald E. Eastlake 3rd                                         [Page 42]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997


Donald E. Eastlake 3rd                                         [Page 43]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

Author's Addresses

   Donald E. Eastlake 3rd
   CyberCash, Inc.
   318 Acton Street
   Carlisle, MA 01741 USA

   Telephone:   +1 508-287-4877
                +1 508-371-7148(fax)
                +1 703-620-4200(main office, Reston, Virginia, USA)
   EMail:       dee@cybercash.com

Expiration and File Name

   This draft expires January 1998.

   Its file name is draft-ietf-dnssec-secext2-00.txt.

Donald E. Eastlake 3rd                                         [Page 44]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

Appendix A: Base 64 Encoding

   The following encoding technique is taken from RFC 1521 by N.
   Borenstein and N. Freed.  It is reproduced here in an edited form for

   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 base 64 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 Base 64 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 base
   64 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

Donald E. Eastlake 3rd                                         [Page 45]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

   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.

Donald E. Eastlake 3rd                                         [Page 46]

INTERNET-DRAFT      DNS Protocol Security Extensions           July 1997

Appendix B: Changes from RFC 2065

   This section sumarizes the most important changes that have been made
   since RFC 2065.

   1. Most of Section 7 of RFC 2065 called "Operational Considerations",
      has been split off into a separate document.

   2. The KEY RR has been changed by (2a) expanding the flags field to
      32 bits, (2b) eliminating the "experimental" flag as unnecessary,
      (2c) defining a number of additional flags, (2d) adding the
      preference and key identifier fields, and (2e) for the RSA MD5
      algorithm, fixing the exponent size at two octets and increasing
      the maximum required key modulus size implementation to 4096 bits.
      Section 3.4 describing the meaning of various combintions of "no-
      key" and key present KEY RRs has been added.

   3. The SIG RR has been changed by (3a) claifying that signature
      expiration and date signed used serial number ring arithmetic, and
      (3b) changing the definition of the key footprint/identifier.  In
      addition, the SIG AXFR has been eliminated.

   4. The key footprint has been changed from algorithm specific to user
      determined and renamed the "key identifier", due to implementors
      requests for assured "footprint" uniqueness.  It now occurs in
      both the SIG and KEY RRs.

   5. Both the KEY and SIG RR definitions have been simplified by
      eliminating the "null" algorithm 253 as defined in RFC 2065.  That
      algorithm had been included because at the time it was thought it
      might be useful in DNS dynamic update.  It was in fact not so used
      and it is dropped to simplify DNS security.

   6. The NXT RRs in a zone have been extended to cover all names,
      including wildcards as literal names without expansion.

   7. Information on the canonical form and ordering of RRs has been
      moved into a separate section, number 8.

   8. A subsection covering incremental and full zone transfer has been

Donald E. Eastlake 3rd                                         [Page 47]

Html markup produced by rfcmarkup 1.129d, available from https://tools.ietf.org/tools/rfcmarkup/