DNSSEC: Authenticating DNS Responses
Learn how DNSSEC uses digital signatures to protect DNS from spoofing and cache poisoning attacks.
DNSSEC: Authenticating DNS Responses is a free Cryptology Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
DNS Cache Poisoning: The Kaminsky Attack
In 2008, researcher Dan Kaminsky disclosed a critical attack against DNS resolvers. The attack exploited the small 16-bit transaction ID field in DNS responses. By flooding a resolver with forged responses containing random transaction IDs, an attacker could statistically succeed in matching the legitimate transaction ID before the real response arrived. A poisoned cache redirects all users of that resolver to attacker-controlled servers for weeks until the cache expires.
What DNSSEC Adds to DNS
DNSSEC (DNS Security Extensions) adds cryptographic authentication to DNS responses. Every DNS record set in a DNSSEC-signed zone is accompanied by a digital signature. Validating resolvers check these signatures before accepting records. A forged or modified response will have an invalid signature and be rejected. DNSSEC protects against cache poisoning and response forgery but does not encrypt DNS queries.
Zone Signing Key and Key Signing Key
DNSSEC uses a two-key hierarchy per zone. The Zone Signing Key (ZSK) is used for day-to-day signing of individual DNS record sets. The Key Signing Key (KSK) signs only the DNSKEY record set, which contains both the ZSK and KSK public keys. The ZSK can be rotated frequently (monthly) while the KSK changes less often (annually), because the KSK hash must be registered in the parent zone and rotation is operationally complex.
RRSIG: Resource Record Signatures
Every signed DNS record set (called an RRset) has a corresponding RRSIG record that contains the cryptographic signature over that RRset. When a resolver requests a DNS record, the response includes both the record and its RRSIG. The resolver verifies the RRSIG using the zone's public key. The signature covers the record content, type, class, and expiry time, preventing both modification and replay of old valid signatures.
DS Records: Linking Parent and Child Zones
The chain of trust in DNSSEC is built through Delegation Signer (DS) records. When a zone delegates to a child zone, the parent zone publishes a DS record containing a hash of the child zone's KSK. A resolver that trusts the parent can verify the child's KSK hash matches the DS record, establishing trust in the child zone's signatures. This chain extends from the DNS root zone down through TLDs to individual domain zones.
DNSKEY Record: Publishing the Zone's Public Key
Every DNSSEC-signed zone publishes its public signing keys in DNSKEY records. There are typically two DNSKEY records: one for the ZSK and one for the KSK. The KSK's public key hash is registered as a DS record in the parent zone, anchoring the zone's trust to its parent. The root zone's KSK hash is hardcoded into validating resolvers as the ultimate trust anchor, called the Root Zone Trust Anchor.
The Chain of Trust from Root to Leaf
DNSSEC validation starts at the root zone, whose KSK trust anchor is hardcoded in resolvers. The root zone's DNSKEY is used to verify its RRSIG, which authenticates the DS records for TLDs like .com. The .com zone's DNSKEY verifies its RRSIG on DS records for individual domains. This chain of cryptographic verification extends from the root to the queried domain, ensuring every link is authenticated.
DNSSEC Validation in Resolvers
When a DNSSEC-validating resolver receives a response, it performs the full chain of trust verification. It retrieves DNSKEY records, verifies RRSIG signatures, traces DS records up to the root anchor, and checks signature expiry times. If validation fails, the resolver returns a SERVFAIL error rather than the potentially forged records. Most major public resolvers including Cloudflare's 1.1.1.1 and Google's 8.8.8.8 perform DNSSEC validation.
DNSSEC Deployment Challenges
DNSSEC deployment has been slow despite its security benefits. Key rollover requires coordination between zone operators and parent registries. A mistake during KSK rollover can make the entire zone unreachable. The 2019 ICANN root KSK rollover required years of preparation. Zone size increases significantly with signatures. Operators must implement automated key rotation and monitoring. These operational complexities have led many smaller domain operators to avoid DNSSEC.
DNSSEC Does Not Encrypt DNS Traffic
A common misconception is that DNSSEC provides privacy for DNS queries. It does not. DNSSEC only authenticates responses; queries and responses still travel as plaintext UDP packets on port 53. Anyone monitoring the network can still see every domain name queried. DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH) provide query privacy by encrypting the DNS traffic. DNSSEC and DoH/DoT are complementary: one provides authenticity, the other provides confidentiality.
DNSSEC in the Real World
As of 2024, approximately 90 percent of the DNS root zone and major TLDs are signed with DNSSEC. However, only about 20 to 30 percent of individual domain names are signed. Browser and application adoption of DNSSEC validation is uneven. The security benefit of DNSSEC is greatest when combined with DANE (DNS-Based Authentication of Named Entities), which uses DNSSEC to publish TLS certificate fingerprints and allows clients to verify certificates without relying solely on CAs.
DNSSEC Trust Chain
How does a DNSSEC-validating resolver establish trust in a domain's DNS records starting from scratch?
DNSSEC: Key Takeaways
DNSSEC adds cryptographic signatures to DNS responses to prevent cache poisoning and response forgery. ZSKs sign record sets; KSKs sign DNSKEY records; DS records chain trust between parent and child zones. Validation starts from the hardcoded Root Zone Trust Anchor. DNSSEC does not encrypt DNS traffic; DoH and DoT provide privacy while DNSSEC provides authenticity. Operational complexity including key rollover has slowed widespread adoption.
Frequently asked questions
Is the “DNSSEC: Authenticating DNS Responses” lesson free?
Yes — the full text of “DNSSEC: Authenticating DNS Responses” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.
What will I learn in “DNSSEC: Authenticating DNS Responses”?
Learn how DNSSEC uses digital signatures to protect DNS from spoofing and cache poisoning attacks. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cryptology Academy?
No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “DNSSEC: Authenticating DNS Responses” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cryptology Academy lesson?
Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- What Makes a Secure Protocol
- SSH: Securing Remote Access
- SFTP and SCP: Secure File Transfer
- DNSSEC: Authenticating DNS Responses