DNSSEC authenticates DNS data by adding cryptographic digital signatures to DNS records, allowing resolvers to verify that a response came from the authoritative source for that zone and was not altered in transit. It does not encrypt DNS traffic; it provides data origin authentication and integrity, and it establishes a chain of trust from the DNS root down to individual domain names.
Background: Why DNS Needs Authentication
The Domain Name System (DNS) was designed in the 1980s without built-in security. A resolver asks a recursive server for a record, and that server may have cached the answer from any source. An attacker who can intercept or forge DNS traffic can return a false answer, a technique known as DNS cache poisoning or spoofing. The classic 2008 Kaminsky attack demonstrated how a single forged response could poison a resolver's cache for an entire zone. DNSSEC was developed to address this class of problem by letting resolvers check a cryptographic signature attached to each answer.
DNSSEC is defined in a set of IETF standards (RFC 4033, 4034, 4035, and later updates). It is deployed at the root zone since 2010 and is supported by many top-level domains and registrars, but adoption at individual domains remains uneven. It is not a replacement for TLS; it protects the integrity of DNS answers, not the confidentiality of the queries themselves.
How DNSSEC Authentication Works: The Core Mechanism
DNSSEC adds four new record types to DNS: RRSIG (signature), DNSKEY (public key), DS (Delegation Signer), and NSEC/NSEC3 (authenticated denial of existence). Each zone signs its resource record sets with a private key. The corresponding public key is published in a DNSKEY record. A resolver validates an answer by checking the RRSIG against the DNSKEY.
- Signing at the authoritative server: The zone owner generates a key pair and uses the private key to sign each RRset (a set of records of the same type and name). The signature is stored in an RRSIG record alongside the data.
- Publishing the public key: The zone publishes its public key in a DNSKEY record. The key itself is signed by another key in the zone (the Key Signing Key, KSK, signs the Zone Signing Key, ZSK), forming a self-signed key set.
- Building the chain of trust: The parent zone publishes a DS record that contains a hash of the child zone's KSK. The parent's DS record is itself signed. This links the child's key to the parent's key.
- Validation at the resolver: A validating resolver starts from a trust anchor (the root zone's KSK, preconfigured). It retrieves the root DNSKEY, verifies the root's self-signature, then follows the DS record for the TLD, verifies the TLD's DNSKEY, and so on down to the queried name. If any signature fails or is missing when expected, the resolver treats the answer as bogus.
For names that do not exist, DNSSEC uses NSEC or NSEC3 records to prove that no such name or type exists, preventing an attacker from forging a negative answer.
The Chain of Trust in Practice
The chain of trust is only as strong as its weakest link. If a zone is signed but its parent does not publish a DS record, the chain is broken and validating resolvers cannot authenticate the zone. This is called an "island of security." Conversely, if a parent publishes a DS record but the child zone is not signed, the resolver will treat the child as insecure rather than bogus, which is a deliberate design choice to allow gradual deployment.
At the root, the trust anchor is the root zone's KSK, which is managed by ICANN and IANA. The root KSK is rolled periodically; the most recent roll completed in 2018. Resolvers must be updated with the new trust anchor before the old one is retired, or validation will fail.
Key Types and Algorithms
DNSSEC uses two kinds of keys in a zone: the Key Signing Key (KSK) and the Zone Signing Key (ZSK). The KSK signs the DNSKEY RRset, and the ZSK signs the other records. This separation allows the ZSK to be rotated more frequently without changing the DS record in the parent. Common signing algorithms include RSA/SHA-256 (algorithm 8) and ECDSA P-256 (algorithm 13). Algorithm 13 is increasingly recommended for its smaller signatures and faster validation.
Key rollovers can be done in several ways: pre-publish (new key published before use), double-signature (both keys sign for a period), or double-DS (both DS records published). Each method has trade-offs in timing and complexity.
Common Problems and Misconceptions
- DNSSEC does not encrypt DNS. Queries and responses are still visible on the network. Encryption is provided by DNS-over-TLS (DoT) or DNS-over-HTTPS (DoH), which are separate from DNSSEC.
- Signing a zone does not automatically make it secure. If the parent does not publish a DS record, the chain is broken. Many domains are signed but not linked to the parent.
- Validation failures can break resolution. If a resolver is validating and a signature expires or is misconfigured, the domain may become unreachable for users of validating resolvers. This is why monitoring and careful key management are essential.
- NSEC vs. NSEC3: NSEC records can leak zone contents by allowing enumeration of names. NSEC3 uses hashed names to mitigate this, but it is more computationally expensive and still subject to some enumeration attacks.
- Not all resolvers validate. Many public resolvers (e.g., Google Public DNS, Cloudflare 1.1.1.1) validate DNSSEC, but some ISP resolvers do not. A domain may appear to work for some users and fail for others.
Frequently Asked Questions
Does DNSSEC encrypt DNS queries?
No. DNSSEC provides authentication and integrity, not confidentiality. To encrypt DNS traffic, use DNS-over-TLS or DNS-over-HTTPS, which can be combined with DNSSEC validation.
What happens if a DNSSEC signature expires?
A validating resolver will treat the answer as bogus and may return a resolution failure (SERVFAIL) to the client. Zone operators must ensure signatures are refreshed before expiration, typically via automated signing.
Can I use DNSSEC with any domain registrar?
Not all registrars support publishing DS records. You need a registrar that allows you to add a DS record for your domain. Many popular registrars do, but support varies.
Is DNSSEC required for all domains?
No. DNSSEC is optional. However, some top-level domains and government mandates require it for certain categories of domains. Adoption is growing but not universal.
What is a trust anchor?
A trust anchor is a preconfigured public key that a validating resolver uses as the starting point for building the chain of trust. For DNSSEC, the root zone's KSK is the default trust anchor.
Does DNSSEC protect against all DNS attacks?
No. DNSSEC protects against data forgery and tampering, but it does not protect against denial-of-service attacks, nor does it hide query patterns. It also does not secure the communication between the stub resolver and the recursive resolver.