home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-ohta-simple-dns-02.txt < prev    next >
Text File  |  1996-11-26  |  44KB  |  1,062 lines

  1. INTERNET DRAFT                                                   M. Ohta
  2. draft-ohta-simple-dns-02.txt               Tokyo Institute of Technology
  3.                                                            November 1996
  4.  
  5.                            Simple Secure DNS
  6.  
  7. Status of this Memo
  8.  
  9.    This document is an Internet-Draft.  Internet-Drafts are working
  10.    documents of the Internet Engineering Task Force (IETF), its areas,
  11.    and its working groups.  Note that other groups may also distribute
  12.    working documents as Internet-Drafts.
  13.  
  14.    Internet-Drafts are draft documents valid for a maximum of six months
  15.    and may be updated, replaced, or obsoleted by other documents at any
  16.    time.  It is inappropriate to use Internet- Drafts as reference
  17.    material or to cite them other than as ``work in progress.''
  18.  
  19.    To learn the current status of any Internet-Draft, please check the
  20.    ``1id-abstracts.txt'' listing contained in the Internet- Drafts
  21.    Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  22.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  23.    ftp.isi.edu (US West Coast).
  24.  
  25. Abstract
  26.  
  27.    An extension to DNS is proposed to make answers from it
  28.    authenticated.
  29.  
  30.    The extension is designed to be minimal, which will be useful as a
  31.    framework to make applications provide required level of
  32.    authentication and/or confidentiality.
  33.  
  34.    The changes to the existing architecture of DNS is also minimized.
  35.  
  36. 1. Introduction
  37.  
  38.    The purpose of the secure DNS protocol extension is to make data from
  39.    DNS authenticated.  In general, security has two aspects,
  40.    authentication to make data unforgable and confidentiality to make
  41.    data secret.  As the fundamental role of DNS is to make its database
  42.    available all around the world, no confidentiality is considered in
  43.    this document. IQUERY, an optional feature of DNS, is inherently
  44.    insecure, and not considered in this document.
  45.  
  46.    This document is written with the assumption that readers thoroughly
  47.    understand the existing DNS described in RFC 1034 and RFC 1035.  On
  48.    the other hand, little knowledge on cryptography is assumed.
  49.  
  50.  
  51.  
  52. M. Ohta                 Expires on May 27, 1995                 [Page 1]
  53.  
  54. INTERNET DRAFT             Simple Secure DNS               November 1996
  55.  
  56.  
  57.    To make DNS secure, two cryptographic mechanisms: digesting and
  58.    signature, are combined.  Digesting is the mechanism to compute a
  59.    short digest of a byte stream.  The mechanism should be complex
  60.    enough so that, given a digest value of some byte stream, it should
  61.    be practically impossible to forge a different byte stream which has
  62.    the same digest value.  The other is the mechanism to give signature
  63.    to a byte stream with some secret information.  The mechanism should
  64.    be complex enough so that, given a signature value of some data and
  65.    the original data itself, it should be practically impossible to
  66.    guess the secret information.  The signature can be verified by
  67.    sharing secret information between related parties or by using
  68.    private/public key technology.
  69.  
  70.    This document does not specify the actual mechanisms to generate
  71.    digests and signatures.
  72.  
  73.    As long as the above two basic authentication mechanisms are
  74.    reliable, secure DNS is designed to be reliable against all forms of
  75.    attacks save the denial of service attacks of the most basic form,
  76.    which is least harmful.  That is, the secure DNS may report a
  77.    temporal failure against some form of denial of service attacks.  But
  78.    all the answers other than the temporal failure is reliable to the
  79.    extent that the basic authentication mechanisms up to the root or
  80.    other locally reliable zones are reliable.  For example, if a
  81.    resolver can communicate with no name servers because of some attack
  82.    such as unplugging of cables, the only thing the resolver can do is
  83.    to report the temporal failure, which is one of the most basic form
  84.    of a denial of service attack.  On the other hand, secure DNS can
  85.    securely report negative answers that a node does not exists or that
  86.    an RR type does not exist for a given node.
  87.  
  88.    Authentication is provided zone wise.  A secure zone is a zone whose
  89.    authentication is provided by the protocol whereas a secure node is a
  90.    node authoritatively belongs to a secure zone.  A secure zone has its
  91.    own secret information to generate signatures for secure nodes in the
  92.    zone.  For the maximum security, both the secret information and the
  93.    signature generation mechanism of a zone should be kept off-line.  In
  94.    this case, even if on-line name servers of the zone is compromised,
  95.    security on the DNS information of the zone is not compromised.  In
  96.    cases where frequent and/or automatic update of a zone is desired, it
  97.    is necessary to make signature generation mechanism of the zone
  98.    accessible on-line.  Still, it is worthwhile to keep the secret
  99.    information and secure time stamping mechanism of the zone off-line.
  100.    To make it easier, the protocol is designed to let signed information
  101.    have the consistent format about time stamping and signature
  102.    generation.  Then, after the security of the signature generation
  103.    mechanism is restored, signatures using the same secret information
  104.    become reliable again.
  105.  
  106.  
  107.  
  108. M. Ohta                 Expires on May 27, 1995                 [Page 2]
  109.  
  110. INTERNET DRAFT             Simple Secure DNS               November 1996
  111.  
  112.  
  113.    Though the secure DNS can be an authenticated source of information
  114.    to establish secure communication between hosts, such as distribution
  115.    of host's public keys, it is out of the scope of this document and a
  116.    separate document should be provided.
  117.  
  118.    A security aware name server is a name server which supports queries
  119.    for the new RR types in this document with required additional
  120.    section processing.  For more protection against some denial service
  121.    type attack, additional authentication mechanism may be supported for
  122.    secure zone transfer.
  123.  
  124.    A security aware recursive resolver is a resolver which can perform
  125.    authenticated retrieval of DNS data in secure zones.  From several
  126.    seed zones, DNS tree is recursively traversed with authentication to
  127.    get the final authenticated answer.  A security aware recursive
  128.    resolver is configured with static information to confirm that data
  129.    from name servers of some seed zones are actually secure.
  130.  
  131.    A security aware stub resolver is a resolver which can perform
  132.    authenticated communication with a recursive resolver.  A stub
  133.    resolver may be configured with static information to authenticate
  134.    communication between recursive resolvers.
  135.  
  136.    The recursive and stub resolvers may be colocated on the same host
  137.    and communicate securely though some operating system mechanism, for
  138.    example, UNIX domain sockets, or they may be located on different
  139.    hosts.  So, how the recursive and stub resolvers securely communicate
  140.    is out of scope of this document. But, it is suggested that a
  141.    security aware stub resolver communicate with a security aware
  142.    recursive resolver colocated with name server through normal DNS
  143.    query through secure IP [SECIP] protocol. In this case, secure IP can
  144.    not use DNS to establish security relationship so that some static
  145.    configuration is necessary.
  146.  
  147.    The protocol in this document is carefully designed so that existing
  148.    name servers can cooperate with security aware resolvers and name
  149.    servers.
  150.  
  151. 2. Changes to the Previous Version and to the Existing Mechanism
  152.  
  153.    A lot of simplification is performed to the previous version of the
  154.    draft: "draft-ohta-simple-dns-00.txt.
  155.  
  156.    First, protocol in this document, now, introduces no important
  157.    changes to the existing DNS architecture. That is:
  158.  
  159.       No new OPCODE, NCQUERY, is added. Some query types for
  160.       authentication matches its own RR type and CNAME. The
  161.  
  162.  
  163.  
  164. M. Ohta                 Expires on May 27, 1995                 [Page 3]
  165.  
  166. INTERNET DRAFT             Simple Secure DNS               November 1996
  167.  
  168.  
  169.       impossibility of the current DNS to have CNAME only zone is left
  170.       untouched.
  171.  
  172.       SD (Security Desired) bit is not added. As the desire needs to be
  173.       expressed only for the secure communication between recursive and
  174.       stub resolvers, it's out of the scope of this document.  If secure
  175.       IP protocol is used for the communication the fact that the secure
  176.       IP protocol is used itself shows that the security is desired.
  177.  
  178.       SA (Security Assured) bit is not added. Instead, if secure
  179.       communication channel to stub resolvers is used, secure recursive
  180.       resolver must assure RRs that the answer section contains
  181.       authenticated data only.
  182.  
  183.       Meaning of MINTTL field of SOA RRs is untouched, though it is
  184.       widely known that using it as negative caching period is
  185.       inappropriate.
  186.  
  187.       Cases of domain names are not canonicalized. They are
  188.       canonicalized only when digest value is computed.
  189.  
  190.    To NSIG RR, <signer> field is added.
  191.  
  192.    Optional resolver operation mode for cross authentication is added.
  193.  
  194. 3. New Data Types
  195.  
  196.    New data types: RRD, NSIG and are added to secure nodes.  ZA, ZSIG
  197.    and ZL are added to secure zones.  Actual RR type names or values for
  198.    the data and their syntax may vary according to specific
  199.    authentication algorithm. Detailed explanation, including the actual
  200.    RR type values for new data types, are not given in this document.
  201.    Square bracketed notation "[RR]" is used to designate a instance of a
  202.    new data type "RR".
  203.  
  204.    In general, data size for authentication is often as large as of 100
  205.    bytes or more.  So, it is a bad idea to share a single RR type value
  206.    between different authentication mechanisms, because querying them
  207.    all will often break 512 byte limit of UDP query.  So, authentication
  208.    algorithms are distinguished by RR type values, not by something like
  209.    an algorithm type field.
  210.  
  211.    Binary format of each RRs are arranged with the byte sex of bigendean
  212.    in the same order as the textual format.
  213.  
  214.    When RR types are used as query type, RRD and NSIG query matches a
  215.    CNAME record too.
  216.  
  217.  
  218.  
  219.  
  220. M. Ohta                 Expires on May 27, 1995                 [Page 4]
  221.  
  222. INTERNET DRAFT             Simple Secure DNS               November 1996
  223.  
  224.  
  225.    RRD (RR Digest)
  226.  
  227.       Digest value of all the data with a certain RR type in a secure
  228.       node.
  229.  
  230.       [RRD] RRs have the following syntax (<class> and <ttl> are omitted
  231.       throughout the document):
  232.  
  233.             <node> [RRD] <type> <ottl> <digest>
  234.  
  235.       where [RRD] is the RR name of RRD, <digest> is the digest of all
  236.       the resource records of type <type> of node <node>.  <ottl> is the
  237.       original TTL value of the records.
  238.  
  239.       <type> is a 16 bit quantity, <ottl> is a 32 bit quantity, <digest>
  240.       is of variable length.
  241.  
  242.       When computing <digest>, records are represented in binary form in
  243.       DNS packet with the following canonicalization:
  244.  
  245.          No domain name compression is performed.
  246.  
  247.          Upper case letters in domain names are converted to the
  248.          corresponding lower case letters.
  249.  
  250.          If there are multiple records of the same <type>, they are
  251.          sorted with dictionary order, comparing the first bytes first
  252.          with unsigned arithmetic.  For example, four strings "AB",
  253.          "AC", "BA" and "ABC" are sorted as ["AB", "ABC", "AC", "BA"].
  254.  
  255.          When verifying the digest of received data in resolvers and
  256.          name servers, TTL field of the records, which should be
  257.          decreased already, should be replaced with the <ottl> (original
  258.          TTL) field of the RRD record.  When caching authenticated data,
  259.          name servers and resolvers should confirm that the TTL in the
  260.          answer packet does not exceed the <ottl> value in RRD data.
  261.  
  262.       A node, in general, has multiple [RRD] records for each RR type
  263.       the node has.  But, it is impossible and unnecessary to cover
  264.       <type>s of RRD, NSIG and ZSIG with digest.  Still, it is necessary
  265.       to have RRD of such <type>s as protection against denial service
  266.       attacks, that is, to authenticate negative response of non
  267.       existing RR types.  An [RRD] record for [NSIG] or [ZSIG] RR has
  268.       the <digest> field of length zero.  To compute <digest> of [RRD]
  269.       RR type itself, the <digest> field of the record itself is first
  270.       considered to have zero length (including length field of the
  271.       record) and later replaced with the actual digest length and
  272.       value.
  273.  
  274.  
  275.  
  276. M. Ohta                 Expires on May 27, 1995                 [Page 5]
  277.  
  278. INTERNET DRAFT             Simple Secure DNS               November 1996
  279.  
  280.  
  281.    NSIG (Node SIGnature)
  282.  
  283.       Signature on RRD computed using secret information of the zone,
  284.       added to secure nodes.
  285.  
  286.       [NSIG] RRs have the following syntax:
  287.  
  288.             <domain> [NSIG] <signer> <timestamp> <expire> <signature>
  289.  
  290.       where [NSIG] is the RR name of NSIG (such as ELGAMAL640, RSA or
  291.       KERBEROS), <signer> is a domain name of a zone who signs [ZA] and
  292.       <timestamp> is the time when the signature is computed.  <expire>
  293.       is the number of seconds the signature will be valid after
  294.       <timestamp>.
  295.  
  296.       <timestamp> and <expire> are 32 bit quantities.  <signature> is of
  297.       variable length.  Throughout the document, time is a 32 bit
  298.       quantity, unless otherwise specified.  Absolute time is counted by
  299.       the number of seconds from 00:00:00 GMT, Jan. 1st. 1970 A.D. and
  300.       wraps around after 2^32 seconds (about 136 years).  As the 32 bit
  301.       time value circulates, zone's secret information should be changed
  302.       at least once per 50 years. Otherwise, stale data signed 136 years
  303.       ago may be distributed with a valid signature.
  304.  
  305.       When computing <signature>; <timestamp>, <expire> and <digest> of
  306.       [RRD] are serialized with the byte order used in DNS packets and
  307.       the resulting byte stream is signed by the zone's signature
  308.       mechanism(s).
  309.  
  310.       No NSIG records are provided for non-authoritative data for a zone
  311.       such as referral information.  Thus, if a name server is
  312.       compromised or its IP address is used by an attacker, it is
  313.       possible to implant false referral information to a resolver.
  314.       Still, as child zones have its own information, ZSIG (Zone
  315.       SIGnature) described later, to authenticate themselves, the
  316.       attacked resolver can detect that the referral information is
  317.       bogus.  The result is no worse than a simple denial of service
  318.       attack by compromising name servers of the parent zone.  That is,
  319.       it is not necessary nor meaningful to try to authenticate referral
  320.       NSes or glue A records for child zones.
  321.  
  322.    ZA (Zone Authenticator)
  323.  
  324.       Data added to a secure zone to specify how to verify NSIGs of
  325.       nodes within the zone.
  326.  
  327.       [ZA] RRs have the following syntax:
  328.  
  329.  
  330.  
  331.  
  332. M. Ohta                 Expires on May 27, 1995                 [Page 6]
  333.  
  334. INTERNET DRAFT             Simple Secure DNS               November 1996
  335.  
  336.  
  337.             <domain> [ZA] <valid from> <authenticator>
  338.  
  339.       where [ZA] is the RR name of ZA, <valid from> is the time from
  340.       when the <authenticator> is used.  <valid from> is 32 bit absolute
  341.       time. <authenticator> is of variable length.  The actual content
  342.       of <authenticator> varies by the authentication algorithm.  It may
  343.       be a public key of the zone or IP addresses of authentication
  344.       centers of the zone which maintains secret information of related
  345.       parties.
  346.  
  347.       <valid from> field is useful to smoothly change zone's secret
  348.       information.  Usually, a zone has only one record of [ZA] type.
  349.       But, a zone may have two such records when zone's secret
  350.       information is being changed.  Otherwise, authentication of RRs
  351.       signed before the change fails with a new <authenticator>.  If
  352.       multiple [ZA]s exist during the transition, <timestamp> field of
  353.       NSIG is compared to the <valid from> fields in [ZA]s to select the
  354.       RR actually used for the signature.  Older RR should disappear
  355.       after all the signature signed with it is assured to have expired.
  356.  
  357.    ZSIG (Zone SIGnature)
  358.  
  359.       Data added to a secure zone to specify how to verify ZA of the
  360.       zone.
  361.  
  362.       ZSIG data contains a signature of digest of the zone's ZA signed
  363.       by other secure zones, typically its parent zone.
  364.  
  365.       [ZSIG] RRs have the following syntax.
  366.  
  367.             <node> [ZSIG] <signer> <[NSIG]> <timestamp> <expire>
  368.                           <signature>
  369.  
  370.       where [ZSIG] is the RR name of ZSIG data, <signer> is a domain
  371.       name of a zone who signs [ZA], <[NSIG]> is the methods used for
  372.       signature (represented in RR type) used by the <signer>.
  373.  
  374.       <timestamp>, <expire> and <signature> are the same as that of
  375.       [NSIG] except that the signature covers the sequence of
  376.       <timestamp> <expire> <digest>, where <digest> is the <digest>
  377.       field of [RRD] of [ZA] of a signed zone.
  378.  
  379.       In general, only a <signer> who is a parent or an ancestor of the
  380.       signed zone or the root zone should be considered to be secure,
  381.       though local administrator may add or remove reliable <signer>s
  382.       according to their local security policy.  If multiple ZSIG RRs of
  383.       different [ZSIG] values exist, the most preferable one is chosen
  384.       by the resolver's local security policy.  For the root zone or
  385.  
  386.  
  387.  
  388. M. Ohta                 Expires on May 27, 1995                 [Page 7]
  389.  
  390. INTERNET DRAFT             Simple Secure DNS               November 1996
  391.  
  392.  
  393.       locally reliable zones, name servers should be statically
  394.       configured with information to authenticate [ZSIG].
  395.  
  396.    ZL (Zone List)
  397.  
  398.       data used to store sorted list of all the nodes in a zone.  The
  399.       information is necessary for protection against denial of service
  400.       attacks, that is, if a node does not appear in certain ZLs, a
  401.       negative response that a queried node does not exist is
  402.       authenticated.  The simplest way to authenticate negative answer
  403.       that some data does not exist is to have an authenticated list of
  404.       all the existing data.  But, unless the number of existing data is
  405.       expected to be small, as in the case with [RRD], listing up is
  406.       inefficient.  Especially, for a very large zone such as "com.",
  407.       the size of the list is impractically large.  So, existing data
  408.       are sorted in a certain order and segmented appropriately into
  409.       multiple ZL records.  To authenticate the non-existence of a node,
  410.       only a ZL RR containing the node (according to the sorting order)
  411.       needs to be returned.  To not to cause UDP size overflow, ZL RRs
  412.       are intended to be returned as a partial RR in the additional
  413.       section of a negative answer with truncation bit set.  To
  414.       authenticate a partial ZL RR, it is necessary to attach
  415.       authentication signatures to individual ZL RRs.  With wildcarding,
  416.       actual authentication is a little more complicated and is
  417.       discussed in section 5.3: "Resolver Algorithm".
  418.  
  419.       ZL will have the following syntax.
  420.  
  421.             <zone> [ZL] <nttl> <first> <last> <n> <domain name #1> ...
  422.                         <domain name #n> <timestamp> <expire>
  423.                         <signature>
  424.  
  425.       where [ZL] is the RR name of ZL data, <nttl> is the number of
  426.       seconds appropriate for negative caching, <n> is the number of
  427.       domains covered by the record.  The record contains all the domain
  428.       names of the zone (including the top level nodes of child zones
  429.       but excluding the zone name itself) after (or including) <first>
  430.       and before <last> sorted with dictionary order.  Cases of
  431.       characters in <first>, <last> <domain name #1>... must be
  432.       canonicalized to lower cases.  <first> and <last> is merely a
  433.       separator and should not be interpreted that such a node exists
  434.       unless explicitly listed as <domain name #1>.  Comparison is
  435.       performed first label by label.  Top level labels are compared
  436.       first and the leaf labels are compared last, which makes domain
  437.       name compression work quite well.  Within labels, comparison are
  438.       by dictionary oder, that is, first bytes are compared first.  For
  439.       example, "a.b.c.", "a.c.b.", "a.c.", "ab.c.", "ac.b." and "c." are
  440.       ordered as "ac.b.", "a.c.b.", "c.", "a.c.", "ab.c." and "a.b.c.".
  441.  
  442.  
  443.  
  444. M. Ohta                 Expires on May 27, 1995                 [Page 8]
  445.  
  446. INTERNET DRAFT             Simple Secure DNS               November 1996
  447.  
  448.  
  449.       Thus, the name of the zone is ordered before all the other names
  450.       in the domain.  For the comparison purpose, when the name of the
  451.       zone itself appears as <last>, it is considered to be ordered
  452.       after all the other names in the domain.  For example,
  453.  
  454.             <zone> [ZL] <nttl> <zone> <zone> 0 <timestamp> <expire>
  455.                         <signature>
  456.  
  457.       represents a zone consisting of only a single node.
  458.  
  459.       <nttl> and <n> are two byte integers.  <first>, <last>, <domain
  460.       name #1>, ..., <domain name #n> have the syntax of domain names.
  461.  
  462.       To make an authenticated response of non existent node resides
  463.       within 512 byte UDP packet, it is recommeded that the length of a
  464.       single [ZL] record be shorter than 400 bytes, after limited domain
  465.       name compression (those information available within the record
  466.       itself only, may be shared for compression).
  467.  
  468.       <timestamp>, <expire> and <signature> are the same as that of
  469.       [NSIG] except that the signature covers the byte stream of the
  470.       sequence of <timestamp> <expire> <nttl> <first> <last> <n> <domain
  471.       name #1> ...  <domain name #n> contained in the [ZL] record
  472.       itself.
  473.  
  474. 4. Name Server Operation
  475.  
  476.    Changes to the operation of name servers is minimal.
  477.  
  478.    A primary name server of a zone has access to signature mechanisms of
  479.    the zone and derives authenticated data from them.
  480.  
  481.    A secondary name server is configured with IP addresses of other name
  482.    servers from which zone information is transferred. Secure zone
  483.    transfer, protected by zone's key, may be used to detect that the
  484.    primary server compromised and continue operation with older but
  485.    secure data.
  486.  
  487.    The section "4.3.2. Algorithm" of RFC 1034 must be replaced with the
  488.    following description:
  489.  
  490.       The actual algorithm used by the secure name server will depend on
  491.       the local OS and data structures used to store RRs.  The following
  492.       algorithm assumes that the RRs are organized in several tree
  493.       structures, one for each zone, and another for the cache:
  494.  
  495.          1. Set or clear the value of recursion available in the
  496.             response depending on whether the name server is willing to
  497.  
  498.  
  499.  
  500. M. Ohta                 Expires on May 27, 1995                 [Page 9]
  501.  
  502. INTERNET DRAFT             Simple Secure DNS               November 1996
  503.  
  504.  
  505.             provide recursive service.  If recursive service is
  506.             available and requested via the RD bit in the query, go to
  507.             step 5, otherwise step 2.
  508.  
  509.          2. Search the available zones for the zone which is the nearest
  510.             ancestor to QNAME.  If such a zone is found, go to step 3,
  511.             otherwise step 4.
  512.  
  513.          3. Start matching down, label by label, in the zone.  The
  514.             matching process can terminate several ways:
  515.  
  516.                a. If the whole of QNAME is matched, we have found the
  517.                   node.
  518.  
  519.                   If the data at the node contains a CNAME, and QTYPE
  520.                   doesn't match CNAME, copy the CNAME RR into the answer
  521.                   section of the response, change QNAME to the canonical
  522.                   name in the CNAME RR, and go back to step 1.
  523.  
  524.                   Otherwise, copy all RRs which match QTYPE into the
  525.                   answer section and go to step 6.
  526.  
  527.                b. If a match would take us out of the authoritative
  528.                   data, we have a referral.  This happens when we
  529.                   encounter a node with NS RRs marking cuts along the
  530.                   bottom of a zone.
  531.  
  532.                   Copy the NS RRs for the subzone into the authority
  533.                   section of the reply.  Put authenticated addresses
  534.                   available from authoritative data or the cache. If
  535.                   they are unavailable, use glue RRs, if they exists.
  536.                   Go to step 4.
  537.  
  538.                c. If at some label, a match is impossible (i.e., the
  539.                   corresponding label does not exist), look to see if a
  540.                   "*" label exists.
  541.  
  542.                   If the "*" label does not exist, check whether the
  543.                   name we are looking for is the original QNAME in the
  544.                   query or a name we have followed due to a CNAME.  If
  545.                   the name is original, set an authoritative name error
  546.                   in the response.  Put at least one RR of ZL data
  547.                   containing the name being looked for in the additional
  548.                   section. If there are a lot of ZL data, truncation is
  549.                   expected. Exit.
  550.  
  551.                   If the "*" label does exist, match RRs at that node
  552.                   against QTYPE.  If any match, copy them into the
  553.  
  554.  
  555.  
  556. M. Ohta                 Expires on May 27, 1995                [Page 10]
  557.  
  558. INTERNET DRAFT             Simple Secure DNS               November 1996
  559.  
  560.  
  561.                   answer section, but set the owner of the RR to be
  562.                   QNAME, and not the node with the "*" label unless the
  563.                   query type is of RRD.  Put at least one RR of ZL data
  564.                   containing the name being looked for in the additional
  565.                   section. If there are a lot of ZL data, truncation is
  566.                   expected.  Go to step 6.
  567.  
  568.          4. Start matching down in the cache.  If QNAME is found in the
  569.             cache, copy all the RRs attached to it that match QTYPE into
  570.             the answer section.  If there was no delegation from
  571.             authoritative data at 3.b, look for the best one from the
  572.             cache, and put it in the authority section.  Go to step 6.
  573.  
  574.          5. Using the local resolver or a copy of its algorithm (see
  575.             resolver section of this document) answer the query.  Store
  576.             the results, including any intermediate CNAMEs, in the
  577.             answer section of the response.
  578.  
  579.          6. Using local data only, attempt to add other RRs which may be
  580.             useful to the additional section of the query.  Exit.
  581.  
  582.    For secure zone transfer, new query types [SXFR] are added.  The
  583.    actual name and value of [SXFR] depends on the authentication
  584.    mechanism used.  It is assumed that each secondary server is
  585.    statically configured with digest of ZA of a zone it serves.  The TCP
  586.    transport of a secure zone transfer meessage has the following
  587.    structure.
  588.  
  589.          +------------------+  ^
  590.          |      length      |  |d
  591.          +------------------+  |i
  592.          |                  |  |g
  593.          |                  |  |e
  594.          |    zone message  |  |s
  595.          |                  |  |t
  596.          |                  |  |e
  597.          +------------------+  vd  ^
  598.          |     timestamp    |      |s
  599.          +------------------+      |i
  600.          |      expire      |      |g
  601.          +------------------+      |n
  602.          |      digest      |      |e
  603.          +------------------+      vd
  604.          |     signature    |
  605.          +------------------+
  606.  
  607.    The secondary server extract [ZA] records which is just transferred,
  608.    verify it with statically configured digest, and authenticate the
  609.  
  610.  
  611.  
  612. M. Ohta                 Expires on May 27, 1995                [Page 11]
  613.  
  614. INTERNET DRAFT             Simple Secure DNS               November 1996
  615.  
  616.  
  617.    signature of the transferred zone.  Unlike AXFER, [SXFR] uses four
  618.    bytes for zone data length to transfer large zones such as "com.".
  619.  
  620. 5. Resolver
  621.  
  622. 5.1 Client-Resolver Interface
  623.  
  624.    Client programs tells security requirements to the resolver.  The
  625.    requirement includes whether they need security or not and which
  626.    digesting or signature mechanism they consider reliable.
  627.  
  628. 5.2. Data Structures
  629.  
  630.    The resolver algorithm in the next subsection assumes that all
  631.    functions have been converted to a general lookup function, and uses
  632.    the following data structures to represent the state of a request in
  633.    progress in the resolver:
  634.  
  635.    SNAME           the domain name we are searching for.
  636.  
  637.    STYPE           the QTYPE of the search request.
  638.  
  639.    SCLASS          the QCLASS of the search request.
  640.  
  641.    SLIST           a structure which describes the name servers and the
  642.                    zone which the resolver is currently trying to query.
  643.                    This structure keeps track of the resolver's current
  644.                    best guess about which name servers hold the desired
  645.                    information; it is updated when arriving information
  646.                    changes the guess.  This structure includes the
  647.                    equivalent of a zone name, the known name servers for
  648.                    the zone, the known addresses for the name servers,
  649.                    [ZA] and [ZSIG] of the zone if the zone is secure,
  650.                    and history information which can be used to suggest
  651.                    which server is likely to be the best one to try
  652.                    next.  The zone name equivalent is a match count of
  653.                    the number of labels from the root down which SNAME
  654.                    has in common with the zone being queried; this is
  655.                    used as a measure of how "close" the resolver is to
  656.                    SNAME.
  657.  
  658.    SBELT           a "safety belt" structure of the same form as SLIST,
  659.                    which is initialized from a configuration file, and
  660.                    lists servers which should be used when the resolver
  661.                    doesn't have any local information to guide name
  662.                    server selection.  The configuration file also
  663.                    contains information of ZA RRs the SBELT servers
  664.                    serves.  The match count will be -1 to indicate that
  665.  
  666.  
  667.  
  668. M. Ohta                 Expires on May 27, 1995                [Page 12]
  669.  
  670. INTERNET DRAFT             Simple Secure DNS               November 1996
  671.  
  672.  
  673.                    no labels are known to match.
  674.  
  675.    CACHE           A structure which stores the results from previous
  676.                    responses.  Since resolvers are responsible for
  677.                    discarding old RRs whose TTL has expired, most
  678.                    implementations convert the interval specified in
  679.                    arriving RRs to some sort of absolute time when the
  680.                    RR is stored in the cache.  Instead of counting the
  681.                    TTLs down individually, the resolver just ignores or
  682.                    discards old RRs when it runs across them in the
  683.                    course of a search, or discards them during periodic
  684.                    sweeps to reclaim the memory consumed by old RRs.
  685.                    TTL for secure data should be shortened not to exceed
  686.                    its authenticated <expire> period.  Data in the cache
  687.                    also contains a bit telling whether the resolver
  688.                    think the data is secure or not.  In the CACHE,
  689.                    authenticated RR has precedence over unauthenticated
  690.                    RR.  During authentication, data should be stored in
  691.                    the cache as unauthenticated. Later, if the data is
  692.                    proven to be secure, the bit is flagged.  If the data
  693.                    is proven to be insecure, the data is flushed.
  694.  
  695.    5.3 Resolver Algorithm
  696.  
  697.    Stub resolvers believes anything recursive resolvers returns through
  698.    secure communication channel.
  699.  
  700.    For recursive resolvers, the four step algorithm in the section
  701.    "5.3.3. Algorithm" of RFC 1034 must be replaced with the following:
  702.  
  703.       The top level algorithm has four steps:
  704.  
  705.          1. See if the answer is in local secure information, and if so
  706.             return it to the client.
  707.  
  708.          2. Find the best servers to ask.
  709.  
  710.          3. Send them queries until one returns a response.
  711.  
  712.          4. Analyze the response, either:
  713.  
  714.                a. if the response answers the question or contains a
  715.                   name error, try to authenticate it, cache the data and
  716.                   other authentication information as well as returning
  717.                   the answer back to the client.
  718.  
  719.                b. if the response contains a better delegation to other
  720.                   servers, try to retrieve and authenticate ZSIG and ZA
  721.  
  722.  
  723.  
  724. M. Ohta                 Expires on May 27, 1995                [Page 13]
  725.  
  726. INTERNET DRAFT             Simple Secure DNS               November 1996
  727.  
  728.  
  729.                   of the delegated zone.  If the delegation information
  730.                   is authenticated, put it to local cache and go to step
  731.                   2.
  732.  
  733.                c. if the response shows a CNAME and that is not the
  734.                   answer itself, try to authenticate the CNAME, cache
  735.                   the CNAME and other authentication information, change
  736.                   the SNAME to the canonical name in the CNAME RR and go
  737.                   to step 1.
  738.  
  739.                d. if the response shows a servers failure, an
  740.                   authentication failure or other bizarre contents,
  741.                   delete the server from the SLIST and go back to step
  742.                   3.
  743.  
  744.       Authentication by resolvers are done as follows:
  745.  
  746.          1. if the answer is in the authoritative data of a secure zone
  747.             of a name server co-located with the resolver, no further
  748.             authentication is necessary.
  749.  
  750.          2. To authenticate RRD of ZA, use ZSIG and authenticated ZA of
  751.             <signer> zone.
  752.  
  753.          3. To authenticate ZA, use RRD of ZA.
  754.  
  755.          4. To authenticate ZL, use authenticated ZA.
  756.  
  757.          5. To authenticate RRD, use NSIG and authenticated ZA.
  758.  
  759.          6. To authenticate other data types, use authenticated RRD. If
  760.             the query for RRD returns wildcard, it should also be
  761.             confirmed that there is no nodes exists to make the wildcard
  762.             matching impossible.  For example, if "a.b.c.d." matches
  763.             "*.c.d." it should be confirmed that nodes "a.b.c.d." nor
  764.             "b.c.d." does not exit but a wild card "*.c.d." exists. ZL
  765.             which exists in the additional section should give the
  766.             required authentication for non-existent nodes.
  767.  
  768.          7. if the response is a name error, that is, a node which
  769.             matches query does not exist, confirm it by authenticating
  770.             ZL data in the additional section of the response.  For
  771.             example, to authenticate that data matching "a.b.c.d." dose
  772.             not exist in a zone "c.d.", it should be confirmed that
  773.             nodes "a.b.c.d." and "*.b.c.d" do not exist but "b.c.d."
  774.             does exist.  Depending on the zone's structure (whether
  775.             "b.c.d." exists or not), the same thing may be confirmed by
  776.             the fact that nodes "a.b.c.d.", "*.b.c.d", "b.c.d" and
  777.  
  778.  
  779.  
  780. M. Ohta                 Expires on May 27, 1995                [Page 14]
  781.  
  782. INTERNET DRAFT             Simple Secure DNS               November 1996
  783.  
  784.  
  785.             "*.c.d" do not exist.
  786.  
  787.          8. if the response is a data not found error, that is, the
  788.             query does not match any RR type of the node, retrieve all
  789.             the authenticated RRD type records of the node and confirm
  790.             that they don't contain RR types which matches the query.
  791.  
  792.    Authentication chains between zones have the following structure:
  793.  
  794.  
  795.                                         digest
  796.             ZA of well known signer zone------>digest value statically
  797.                          |                     configured in name
  798.                          |                     servers
  799.                          |
  800.                      signature
  801.                 ZSIG<---------RRD of ZA of signer zone
  802.                                       |
  803.                                       |
  804.                                       |
  805.                                   signature
  806.                              ZSIG<---------RRD of ZA of signer zone
  807.                                                    |
  808.                                                    |
  809.                                                    |
  810.                                                signature
  811.                                          ZSIG<----------RRD of ZA
  812.  
  813.             Figure 1. Authentication Chains of Zone Data
  814.  
  815.  
  816.    Authentication chains within a zone have the following structure:
  817.  
  818.  
  819.             ZA of the Node's Zone
  820.                      |
  821.                      |
  822.                      |
  823.                  signature
  824.             NSIG<---------RRD of RR type RRD
  825.                               ^
  826.                               |digest
  827.                               |
  828.                       RRD of RR type <type>
  829.                               ^
  830.                               |digest
  831.                               |
  832.                       RR with RR type <type>
  833.  
  834.  
  835.  
  836. M. Ohta                 Expires on May 27, 1995                [Page 15]
  837.  
  838. INTERNET DRAFT             Simple Secure DNS               November 1996
  839.  
  840.  
  841.                       other than RRD nor NSIG
  842.  
  843.             Figure 2. Authentication Chain of Node Data
  844.  
  845. 5.4 Resolver Algorithm for Cross Authentication (Optional)
  846.  
  847.    Usually, recursive resolver traverses DNS tree in top down manner
  848.    from the nearest ancestor (often, the root node) of the sought node
  849.    down toward the leaf direction. The selection corresponds to the step
  850.    2.
  851.  
  852.       2. Find the best server to ask.
  853.  
  854.    of the top level resolver algorithm in section 5.3.
  855.  
  856.    By introducing a new RR type: XSIG, it is possible to find the best
  857.    server in a bottom up manner.
  858.  
  859.    XSIG has the following format:
  860.  
  861.          <zone> XSIG <signee> <[ZA]> <digest>
  862.  
  863.    where, <digest> is the variable length digest of <[ZA]> RR of
  864.    <signee> zone.  The value of XSIG is <to be assigned by IANA>.
  865.  
  866.    Usually, <signee> is an ancestor of <zone>.  Then, if a resolver is
  867.    configured with static authentication information of <zone>, the
  868.    resolver can reliably know the [ZA] information of <signee> zone. If
  869.    <signee> zone also has XSIG, authentication may be chained up to the
  870.    root zone.
  871.  
  872.    During the up sequence of authentication, XSIG may, only once,
  873.    traverse the DNS tree, after which only the down sequence through
  874.    NSIG (as described in step 4.b in section 5.3) is allowed.
  875.  
  876.    The algorithm to find the best server with terminology of the section
  877.    5.2 is as follows:
  878.  
  879.       1. Start from a zone served by SBELT name servers.
  880.  
  881.       2. If the zone has XSIG record with <signee> of the ancestor of
  882.       the SNAME, the search has finished.
  883.  
  884.       3. If the zone has XSIG record with <signee> of the ancestor of
  885.       the zone itself, up the zone hierarchy and recursively continue
  886.       the search at step 2.
  887.  
  888.       4. If none of the conditions are met, try the next zone in the
  889.  
  890.  
  891.  
  892. M. Ohta                 Expires on May 27, 1995                [Page 16]
  893.  
  894. INTERNET DRAFT             Simple Secure DNS               November 1996
  895.  
  896.  
  897.       SBELT. If no zones are remaining, the search has failed.
  898.  
  899.    The use of the cross authentication scheme introduce some
  900.    vulnerability but removes some, discussion on which is quite complex.
  901.    There are also complex performance trade-offs.  For example, even if
  902.    an ancestor zone of SNAME is found in cache, the above steps must
  903.    always be performed to find the nearest ancestor of SNAME, which is
  904.    necessary for the security property of the cross authentication
  905.    scheme.  So, in this document, it's use is completely optional.
  906.  
  907. 6. Secure Time and Secure DNS
  908.  
  909.    DNS is designed to be highly fault tolerant. That is, if a secondary
  910.    server can't communicate with other servers, the secondary server can
  911.    behave as authoritative until SOA <expire> period is reached.  Thus,
  912.    until a resolver securely knows that <expire> period has passed, a
  913.    name server may give old but authenticated answer to a query whose
  914.    node does not exist.
  915.  
  916.    Thus, <expire> period should be minimized. Moreover, clocks of
  917.    signers and resolvers should be accurate enough. It is recommended
  918.    that signers clock should have maximum allowable error of
  919.    <expire>/20.  When resolvers caching information, it should be
  920.    confirmed that cached period is shorter than <ottl> and
  921.    <expire>*19/20 fractions rounded down minus the expected maximum
  922.    error of the resolvers' clocks.
  923.  
  924.    Due to clock skew, a resolver may receive a <timestamp> dated in the
  925.    future. The data should be relied if the error is below <expire>/10
  926.    fractions rounded down plus the expected maximum error of the
  927.    resolver's clocks.
  928.  
  929.    To have an Internet wide upper bound on the life time of stale data,
  930.    <expire> longer than a week should be shortened to a week.
  931.  
  932. 7. Secure DNS and Additional Section Processing
  933.  
  934.    To authenticate DNS reply on a certain node, a lot of information
  935.    about the node is necessary. Such information may be provided in the
  936.    additional section.
  937.  
  938.    On the other hand, though the existing DNS suggests to add various
  939.    information in the additional section, data on nodes which is not
  940.    queried needs, such as additional As for MX, are not so useful if
  941.    they can't be authenticated.
  942.  
  943.    Thus, for secure DNS, it is recommended to add additional information
  944.    with the following preference as long as the addition won't make the
  945.  
  946.  
  947.  
  948. M. Ohta                 Expires on May 27, 1995                [Page 17]
  949.  
  950. INTERNET DRAFT             Simple Secure DNS               November 1996
  951.  
  952.  
  953.    reply longer than 512 bytes.
  954.  
  955.       [ZL] data for protection against denial of service attacks.
  956.  
  957.       glue A records for referral.
  958.  
  959.       additional information on the queried node.
  960.  
  961.       other additional information.
  962.  
  963. 8. Specification of a Secure DNS Architecture
  964.  
  965.    To specify secure DNS, a standard track RFC(s) must be provided which
  966.    specify
  967.  
  968.       a mechanism for digesting
  969.  
  970.       a mechanism for signature
  971.  
  972.       RR type values for [RRD], [NSIG], [ZA], [ZSIG], [ZL], [ZA], [ZSIG]
  973.       and [SXFR]
  974.  
  975.    [RRD], [NSIG], [ZA], [ZSIG], [ZL] and [SXFR] sharing the same value
  976.    of X form a single set of specification.
  977.  
  978.    Even if two specifications share the same digesting or signature
  979.    mechanism, they have different [RRD] or [NSIG] values.
  980.  
  981. 9. References
  982.  
  983.    [RFC1034]
  984.  
  985.    [RFC1035]
  986.  
  987.    [SECIP]
  988.  
  989. Security Considerations
  990.  
  991.    The entire document is devoted on a security issue to make answers
  992.    from DNS authenticated over unreliable transport mechanisms.
  993.  
  994.    No confidentiality is considered.
  995.  
  996. Author's Address
  997.  
  998.       Masataka Ohta
  999.       Computer Center
  1000.       Tokyo Institute of Technology
  1001.  
  1002.  
  1003.  
  1004. M. Ohta                 Expires on May 27, 1995                [Page 18]
  1005.  
  1006. INTERNET DRAFT             Simple Secure DNS               November 1996
  1007.  
  1008.  
  1009.       2-12-1, O-okayama, Meguro-ku
  1010.       Tokyo 152, JAPAN
  1011.  
  1012.       Phone: +81-3-5734-3299
  1013.       Fax: +81-3-5734-3415
  1014.       EMail: mohta@necom830.hpcl.titech.ac.jp
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. M. Ohta                 Expires on May 27, 1995                [Page 19]
  1061.  
  1062.