draft-ietf-dnsext-nsec3-04.txt

来自「非常好的dns解析软件」· 文本 代码 · 共 1,567 行 · 第 1/5 页

TXT
1,567 行
字号
   value field in the zone SOA RR.   The type bitmap of every NSEC3 resource record in a signed zone MUST   indicate the presence of both the NSEC3 RR type itself and its   corresponding RRSIG RR type.   The following steps describe the proper construction of NSEC3   records.  [Comment.2]   1.  For each unique original ownername in the zone, add an NSEC3       RRset.  If Opt-In is being used, ownernames of unsigned       delegations may be excluded, but must be considered for empty-       non-terminals.  The ownername of the NSEC3 RR is the hashed       equivalent of the original owner name, prepended to the zone       name.  The Next Hashed Ownername field is left blank for the       moment.  If Opt-In is being used, set the Opt-In bit to one.   2.  For each RRset at the original owner name, set the corresponding       bit in the type bit map.   3.  If the difference in number of labels between the apex and the       original ownername is greater then 1, additional NSEC3s need to       be added for every empty non-terminal between the apex and the       original ownername.  This process may generate NSEC3 RRs with       duplicate hashed ownernames.   4.  Sort the set of NSEC3 RRs into hash order.  Hash order is the       ascending numerical order of the non-encoded hash values.   5.  Combine NSEC3 RRs with identical hashed ownernames by replacing       with a single NSEC3 RR with the type map consisting of the union       of the types represented by the set of NSEC3 RRs.   6.  In each NSEC3 RR, insert the Next Hashed Ownername by using the       value of the next NSEC3 RR in hash order.  The Next Hashed       Ownername of the last NSEC3 in the zone contains the value of the       hashed ownername of the first NSEC3 in the hash order.7.  Responding to NSEC3 Queries   Since NSEC3 ownernames are not represented in the NSEC3 chain like   other zone ownernames, direct queries for NSEC3 ownernames present a   special case.Laurie, et al.           Expires August 5, 2006                [Page 12]Internet-Draft                    nsec3                    February 2006   The special case arises when the following are all true:   o  The QNAME equals an existing NSEC3 ownername, and   o  There are no other record types that exist at QNAME, and   o  The QTYPE does not equal NSEC3.   These conditions describe a particular case: the answer should be a   NOERROR/NODATA response, but there is no NSEC3 RRset for H(QNAME) to   include in the authority section.   However, the NSEC3 RRset with ownername equal to QNAME is able to   prove its own existence.  Thus, when answering this query, the   authoritative server MUST include the NSEC3 RRset whose ownername   equals QNAME.  This RRset proves that QNAME is an existing name with   types NSEC3 and RRSIG.  The authoritative server MUST also include   the NSEC3 RRset that covers the hash of QNAME.  This RRset proves   that no other types exist.   When validating a NOERROR/NODATA response, validators MUST check for   a NSEC3 RRset with ownername equals to QNAME, and MUST accept that   (validated) NSEC3 RRset as proof that QNAME exists.  The validator   MUST also check for an NSEC3 RRset that covers the hash of QNAME as   proof that QTYPE doesn't exist.   Other cases where the QNAME equals an existing NSEC3 ownername may be   answered normally.8.  Special Considerations   The following paragraphs clarify specific behaviour explain special   considerations for implementations.8.1.  Proving Nonexistence   If a wildcard resource record appears in a zone, its asterisk label   is treated as a literal symbol and is treated in the same way as any   other ownername for purposes of generating NSEC3 RRs.  RFC 4035 [5]   describes the impact of wildcards on authenticated denial of   existence.   In order to prove there exist no RRs for a domain, as well as no   source of synthesis, an RR must be shown for the closest encloser,   and non-existence must be shown for all closer labels and for the   wildcard at the closest encloser.   This can be done as follows.  If the QNAME in the query is   omega.alfa.beta.example, and the closest encloser is beta.example   (the nearest ancestor to omega.alfa.beta.example), then the server   should return an NSEC3 that demonstrates the nonexistence ofLaurie, et al.           Expires August 5, 2006                [Page 13]Internet-Draft                    nsec3                    February 2006   alfa.beta.example, an NSEC3 that demonstrates the nonexistence of   *.beta.example, and an NSEC3 that demonstrates the existence of   beta.example.  This takes between one and three NSEC3 records, since   a single record can, by chance, prove more than one of these facts.   When a verifier checks this response, then the existence of   beta.example together with the non-existence of alfa.beta.example   proves that the closest encloser is indeed beta.example.  The non-   existence of *.beta.example shows that there is no wildcard at the   closest encloser, and so no source of synthesis for   omega.alfa.beta.example.  These two facts are sufficient to satisfy   the resolver that the QNAME cannot be resolved.   In practice, since the NSEC3 owner and next names are hashed, if the   server responds with an NSEC3 for beta.example, the resolver will   have to try successively longer names, starting with example, moving   to beta.example, alfa.beta.example, and so on, until one of them   hashes to a value that matches the interval (but not the ownername   nor next owner name) of one of the returned NSEC3s (this name will be   alfa.beta.example).  Once it has done this, it knows the closest   encloser (i.e. beta.example), and can then easily check the other two   required proofs.   Note that it is not possible for one of the shorter names tried by   the resolver to be denied by one of the returned NSEC3s, since, by   definition, all these names exist and so cannot appear within the   range covered by an NSEC3.  Note, however, that the first name that   the resolver tries MUST be the apex of the zone, since names above   the apex could be denied by one of the returned NSEC3s.8.2.  Salting   Augmenting original ownernames with salt before hashing increases the   cost of a dictionary of pre-generated hash-values.  For every bit of   salt, the cost of a precomputed dictionary doubles (because there   must be an entry for each word combined with each possible salt   value).  The NSEC3 RR can use a maximum of 2040 bits (255 octets) of   salt, multiplying the cost by 2^2040.  This means that an attacker   must, in practice, recompute the dictionary each time the salt is   changed.   There MUST be at least one complete set of NSEC3s for the zone using   the same salt value.   The salt SHOULD be changed periodically to prevent precomputation   using a single salt.  It is RECOMMENDED that the salt be changed for   every resigning.Laurie, et al.           Expires August 5, 2006                [Page 14]Internet-Draft                    nsec3                    February 2006   Note that this could cause a resolver to see records with different   salt values for the same zone.  This is harmless, since each record   stands alone (that is, it denies the set of ownernames whose hashes,   using the salt in the NSEC3 record, fall between the two hashes in   the NSEC3 record) - it is only the server that needs a complete set   of NSEC3 records with the same salt in order to be able to answer   every possible query.   There is no prohibition with having NSEC3 with different salts within   the same zone.  However, in order for authoritative servers to be   able to consistently find covering NSEC3 RRs, the authoritative   server MUST choose a single set of parameters (algorithm, salt, and   iterations) to use when selecting NSEC3s.  In the absence of any   other metadata, the server does this by using the parameters from the   zone apex NSEC3, recognizable by the presence of the SOA bit in the   type map.  If there is more than one NSEC3 record that meets this   description, then the server may arbitrarily choose one.  Because of   this, if there is a zone apex NSEC3 RR within a zone, it MUST be part   of a complete NSEC3 set.  Conversely, if there exists an incomplete   set of NSEC3 RRs using the same parameters within a zone, there MUST   NOT be an NSEC3 RR using those parameters with the SOA bit set.8.3.  Iterations   Setting the number of iterations used allows the zone owner to choose   the cost of computing a hash, and so the cost of generating a   dictionary.  Note that this is distinct from the effect of salt,   which prevents the use of a single precomputed dictionary for all   time.   Obviously the number of iterations also affects the zone owner's cost   of signing the zone as well as the verifiers cost of verifying the   zone.  We therefore impose an upper limit on the number of   iterations.  We base this on the number of iterations that   approximately doubles the cost of signing the zone.   A zone owner MUST NOT use a value higher than shown in the table   below for iterations.  A resolver MAY treat a response with a higher   value as bogus.                       +--------------+------------+                       | RSA Key Size | Iterations |                       +--------------+------------+                       | 1024         | 3,000      |                       | 2048         | 20,000     |                       | 4096         | 150,000    |                       +--------------+------------+Laurie, et al.           Expires August 5, 2006                [Page 15]Internet-Draft                    nsec3                    February 2006                       +--------------+------------+                       | DSA Key Size | Iterations |                       +--------------+------------+                       | 1024         | 1,500      |                       | 2048         | 5,000      |                       +--------------+------------+   This table is based on 150,000 SHA-1's per second, 50 RSA signs per   second for 1024 bit keys, 7 signs per second for 2048 bit keys, 1   sign per second for 4096 bit keys, 100 DSA signs per second for 1024   bit keys and 30 signs per second for 2048 bit keys.   Note that since RSA verifications are 10-100 times faster than   signatures (depending on key size), in the case of RSA the legal   values of iterations can substantially increase the cost of   verification.8.4.  Hash Collision   Hash collisions occur when different messages have the same hash   value.  The expected number of domain names needed to give a 1 in 2   chance of a single collision is about 2^(n/2) for a hash of length n   bits (i.e. 2^80 for SHA-1).  Though this probability is extremely   low, the following paragraphs deal with avoiding collisions and   assessing possible damage in the event of an attack using hash   collisions.8.4.1.  Avoiding Hash Collisions during generation   During generation of NSEC3 RRs, hash values are supposedly unique.   In the (academic) case of a collision occurring, an alternative salt   MUST be chosen and all hash values MUST be regenerated.8.4.2.  Second Preimage Requirement Analysis   A cryptographic hash function has a second-preimage resistance   property.  The second-preimage resistance property means that it is   computationally infeasible to find another message with the same hash   value as a given message, i.e. given preimage X, to find a second   preimage X' != X such that hash(X) = hash(X').  The work factor for   finding a second preimage is of the order of 2^160 for SHA-1.  To   mount an attack using an existing NSEC3 RR, an adversary needs to   find a second preimage.   Assuming an adversary is capable of mounting such an extreme attack,   the actual damage is that a response message can be generated which   claims that a certain QNAME (i.e. the second pre-image) does exist,   while in reality QNAME does not exist (a false positive), which willLaurie, et al.           Expires August 5, 2006                [Page 16]Internet-Draft                    nsec3                    February 2006   either cause a security aware resolver to re-query for the non-   existent name, or to fail the initial query.  Note that the adversary   can't mount this attack on an existing name but only on a name that   the adversary can't choose and does not yet exist.8.4.3.  Possible Hash Value Truncation Method   The previous sections outlined the low probability and low impact of   a second-preimage attack.  When impact and probability are low, while   space in a DNS message is costly, truncation is tempting.  Truncation   might be considered to allow for shorter ownernames and rdata for   hashed labels.  In general, if a cryptographic hash is truncated to n   bits, then the expected number of domains required to give a 1 in 2   probability of a single collision is approximately 2^(n/2) and the   work factor to produce a second preimage is 2^n.   An extreme hash value truncation would be truncating to the shortest   possible unique label value.  This would be unwise, since the work   factor to produce second preimages would then approximate the size of   the zone (sketch of proof: if the zone has k entries, then the length   of the names when truncated down to uniqueness should be proportional   to log_2(k).  Since the work factor to produce a second pre-image is   2^n for an n-bit hash, then in this case it is 2^(C log_2(k)) (where   C is some constant), i.e.  C'k - a work factor of k).   Though the mentioned truncation can be maximized to a certain   extreme, the probability of collision increases exponentially for   every truncated bit.  Given the low impact of hash value collisions   and limited space in DNS messages, the balance between truncation   profit and collision damage may be determined by local policy.  Of   course, the size of the corresponding RRSIG RR is not reduced, so   truncation is of limited benefit.   Truncation could be signaled simply by reducing the length of the   first label in the ownername.  Note that there would have to be a   corresponding reduction in the length of the Next Hashed Ownername   field.8.4.4.  Server Response to a Run-time Collision   In the astronomically unlikely event that a server is unable to prove   nonexistence because the hash of the name that does not exist   collides with a name that does exist, the server is obviously broken,

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?