The following sections describe the background of the parameters for the NSEC3 and NSEC3PARAM RRTYPEs.
The algorithm field is not discussed by this document. Readers are encouraged to read [
RFC 8624] for guidance about DNSSEC algorithm usage.
The NSEC3PARAM flags field currently contains only reserved and unassigned flags. However, individual NSEC3 records contain the "Opt-Out" flag [
RFC 5155] that specifies whether that NSEC3 record provides proof of nonexistence. In general, NSEC3 with the Opt-Out flag enabled should only be used in large, highly dynamic zones with a small percentage of signed delegations. Operationally, this allows for fewer signature creations when new delegations are inserted into a zone. This is typically only necessary for extremely large registration points providing zone updates faster than real-time signing allows or when using memory-constrained hardware. Operators considering the use of NSEC3 are advised to carefully weigh the costs and benefits of choosing NSEC3 over NSEC. Smaller zones, or large but relatively static zones, are encouraged to not use the opt-opt flag and to take advantage of DNSSEC's authenticated denial of existence.
NSEC3 records are created by first hashing the input domain and then repeating that hashing using the same algorithm a number of times based on the iteration parameter in the NSEC3PARAM and NSEC3 records. The first hash with NSEC3 is typically sufficient to discourage zone enumeration performed by "zone walking" an unhashed NSEC chain.
Note that [
RFC 5155] describes the Iterations field as follows
TheIterations field defines the number of additional times the hashfunction has been performed.
This means that an NSEC3 record with an Iterations field of 0 actually requires one hash iteration.
Only determined parties with significant resources are likely to try and uncover hashed values, regardless of the number of additional iterations performed. If an adversary really wants to expend significant CPU resources to mount an offline dictionary attack on a zone's NSEC3 chain, they'll likely be able to find most of the "guessable" names despite any level of additional hashing iterations.
Most names published in the DNS are rarely secret or unpredictable. They are published to be memorable, used and consumed by humans. They are often recorded in many other network logs such as email logs, certificate transparency logs, web page links, intrusion-detection systems, malware scanners, email archives, etc. Many times a simple dictionary of commonly used domain names prefixes (www, mail, imap, login, database, etc.) can be used to quickly reveal a large number of labels within a zone. Because of this, there are increasing performance costs yet diminishing returns associated with applying additional hash iterations beyond the first.
Although
Section 10.3 of
RFC 5155 specifies the upper bounds for the number of hash iterations to use, there is no published guidance for zone owners about good values to select. Recent academic studies have shown that NSEC3 hashing provides only moderate protection [
GPUNSEC3] [
ZONEENUM].
NSEC3 records provide an additional salt value, which can be combined with a Fully Qualified Domain Name (FQDN) to influence the resulting hash, but properties of this extra salt are complicated.
In cryptography, salts generally add a layer of protection against offline, stored dictionary attacks by combining the value to be hashed with a unique "salt" value. This prevents adversaries from building up and remembering a single dictionary of values that can translate a hash output back to the value that it was derived from.
In the case of DNS, the situation is different because the hashed names placed in NSEC3 records are always implicitly "salted" by hashing the FQDN from each zone. Thus, no single pre-computed table works to speed up dictionary attacks against multiple target zones. An attacker is always required to compute a complete dictionary per zone, which is expensive in both storage and CPU time.
To understand the role of the additional NSEC3 salt field, we have to consider how a typical zone walking attack works. Typically, the attack has two phases: online and offline. In the online phase, an attacker "walks the zone" by enumerating (almost) all hashes listed in NSEC3 records and storing them for the offline phase. Then, in the offline cracking phase, the attacker attempts to crack the underlying hash. In this phase, the additional salt value raises the cost of the attack only if the salt value changes during the online phase of the attack. In other words, an additional, constant salt value does not change the cost of the attack.
Changing a zone's salt value requires the construction of a complete new NSEC3 chain. This is true both when re-signing the entire zone at once and when incrementally signing it in the background where the new salt is only activated once every name in the chain has been completed. As a result, re-salting is a very complex operation, with significant CPU time, memory, and bandwidth consumption. This makes very frequent re-salting impractical and renders the additional salt field functionally useless.