DNSSEC

Cryptographic Authentication for DNS Queries and Responses

Introduction: The Trust Gap in DNS

The Domain Name System (DNS) is one of the most critical and foundational protocols of the internet, acting as a global, distributed phonebook that translates human-friendly domain names into machine-readable IP addresses. Despite its central role, the original DNS protocol was designed in the 1980s with an inherent assumption of trust. When your computer asks a DNS resolver for the IP address of www.example.com, the standard DNS protocol provides no mechanism to verify that the answer received is authentic and has not been tampered with.

This lack of authentication creates a significant security vulnerability. Malicious actors can exploit this trust gap through various attacks, the most common being or DNS spoofing. In such an attack, an attacker intercepts a DNS query and sends back a forged response, pointing the user's browser to a malicious IP address instead of the legitimate one. The user, believing they are on their banking or email website, might then unknowingly submit their sensitive credentials to the attacker.

To close this critical security hole and bring cryptographic trust to the DNS, the Internet Engineering Task Force (IETF) developed a set of extensions known as , or Domain Name System Security Extensions.

What is DNSSEC? Bringing Authenticity and Integrity to DNS

DNSSEC is not a replacement for DNS. It is a set of extensions that works on top of the existing DNS infrastructure to add a layer of security. Its primary goal is not confidentiality; DNSSEC does not encrypt DNS queries or responses. Instead, it focuses on two critical aspects of security:

  1. Data Origin Authentication: DNSSEC allows a DNS resolver to cryptographically verify that the response it received actually came from the legitimate, authoritative name server for that domain. It confirms the source of the data is authentic.
  2. Data Integrity: DNSSEC ensures that the DNS data (the records) have not been modified in transit between the authoritative server and the resolver. If a single bit of the response is altered, the verification will fail.

By providing these guarantees, DNSSEC protects users from being misdirected to malicious sites. If a resolver has DNSSEC validation enabled, and it receives a response that fails the cryptographic check, it will discard the response and return an error to the client, preventing the user from connecting to a potentially fraudulent server.

How DNSSEC Works: The Power of Digital Signatures

DNSSEC's magic lies in the application of public-key cryptography and digital signatures to DNS records. To enable DNSSEC for a domain (a process called "signing a zone"), the domain owner generates a pair of cryptographic keys:

  • A private key, which is kept secret on the authoritative name server.
  • A corresponding public key, which is published publicly in the DNS for anyone to access.

This key pair is used to create and verify digital signatures for the domain's DNS records. The process involves introducing several new DNS record types.

The New DNSSEC Record Types

To implement digital signatures, DNSSEC adds new resource record types to the DNS.

RRSIG (Resource Record Signature)
For every record set in a zone (e.g., all A records for a hostname), the authoritative server uses its private key to create a digital signature. This signature is then published as an RRSIG record. When a resolver requests a record (like an A record), the server returns both the A record itself and the corresponding RRSIG record.
DNSKEY (DNS Public Key)
To verify the RRSIG signature, the resolver needs the domain's public key. This public key is published in a DNSKEY record. The resolver fetches the DNSKEY record and uses the public key within it to verify the signature on the RRSIG record. A successful verification proves that the record has not been altered and originates from the owner of the private key.
DS (Delegation Signer)
This solves a crucial trust problem. How do we know that the public key in the DNSKEY record is itself authentic? We establish a chain of trust, similar to TLS certificates. A DS record is a hash (a cryptographic fingerprint) of a domain's public key (specifically, its Key Signing Key). This DS record is not placed in the domain's own zone file but in the zone file of its parent domain. For example, the DS record for 'example.com' would be stored in the '.com' TLD servers. This creates a secure link: the '.com' servers vouch for the authenticity of 'example.com''s public key.
NSEC/NSEC3 (Next Secure)
DNSSEC must not only prove that existing data is authentic but also provide "authenticated denial of existence." It must be able to prove that a domain name does not exist. The NSEC record links all the records in a zone in a sorted order, creating a complete chain. If you ask for a non-existent domain like 'nonexistent.example.com', the server can return an NSEC record that proves there are no records between two existing ones. A later version, NSEC3, provides the same functionality but uses hashes of the record names to prevent "zone walking", a technique where an attacker could easily list all records in a zone by following the NSEC chain.

The Chain of Trust in Action: Step-by-Step Validation

Let's trace how a DNSSEC-validating resolver verifies a response for 'www.example.com'.

  1. Starting with a Known Trust Anchor: The validating resolver starts with a pre-configured public key that it inherently trusts: the public key of the DNS root zone ("."). This is its trust anchor.
  2. Querying the Root: The resolver asks a root server for the name servers of '.com'. The root server responds with the NS records and an RRSIG record (a signature for those NS records). The resolver uses its trusted root key to verify this signature. It now trusts the '.com' servers.
  3. Querying the TLD: The resolver asks a '.com' server for the name servers of 'example.com'. Along with the NS records, it asks for the DS record for 'example.com'. The '.com' server returns the DS record and an RRSIG record signing it. The resolver fetches the public key (DNSKEY) of the '.com' zone and uses it to verify the signature on the DS record. It now trusts that the DS record is authentic.
  4. Querying the Authoritative Server: The resolver now queries the 'example.com' authoritative server for the A record of 'www.example.com'. The server returns the A record and its corresponding RRSIG signature.
  5. Validating the Final Response:
    • The resolver asks the 'example.com' server for its public key (the DNSKEY record).
    • It creates a hash of this received public key and compares it to the trusted DS record it got from the '.com' servers. If they match, the resolver now trusts the public key of 'example.com'.
    • Finally, it uses this trusted public key of 'example.com' to verify the RRSIG signature that came with the A record. If this signature is valid, the resolver can be certain that the A record is authentic and has not been tampered with.

This step-by-step process, moving down the DNS hierarchy from the trusted root, creates an unbreakable chain of trust that validates the final answer.

The Role of DNSSEC Today

DNSSEC is a critical technology for securing the core infrastructure of the internet. Its adoption is a three-part process:

  • Zone Signing: Domain owners must sign their zones by generating keys and creating the necessary DNSSEC records (RRSIG, DNSKEY, DS).
  • Resolver Validation: DNS resolvers (like those at ISPs or public DNS services like Google's 8.8.8.88.8.8.8) must be configured to perform DNSSEC validation. This is a crucial step, as signing a zone has no effect if no one is checking the signatures.
  • Application Awareness: Ultimately, client applications (like browsers) need to be aware of the validation result provided by the resolver.

Today, the DNS root zone, all TLDs, and many major domains are signed. Major public DNS resolvers perform validation by default. While DNSSEC provides a vital foundation, other technologies are also emerging to secure DNS, such as DoH (DNS over HTTPS) and DoT (DNS over TLS), which encrypt the queries themselves, providing privacy in addition to the authenticity and integrity provided by DNSSEC.

    DNSSEC | Teleinf Edu