Explaining DNSSEC chain of trust
The DNSSEC chain of trust starts with a trust anchor at the root zone, whose DNSKEY RRset is signed and trusted. The root zone holds DS records for delegated zones (e.g., TLDs), which contain hashes of the child zone's KSK DNSKEY. The parent zone signs its DS records with its own DNSKEYs, establishing a signed link to the child. Validators verify each RRSIG by checking its signature over RRsets using the matching DNSKEY, distinguishing KSKs (used to sign DNSKEY RRsets) from ZSKs (used for other records). DS records link the child’s KSK to the parent via digest fields, and the absence or mismatch of DS breaks the chain. RRSIG records cover entire RRsets with metadata like validity times and key tags, enabling cryptographic verification step-by-step down the delegation chain. The validator trusts the parent's DNSKEY signatures, ensures the DS digest matches the child’s KSK, then verifies the child’s RRsets via RRSIGs—maintaining a secure, stepwise chain of trust from root to leaf zones.
DNSSEC adds signatures and keys to the DNS data so that a resolver can prove that the RRsets it got really came from the owner of the zone and haven’t been tampered with on the way.
A few core points to keep in mind:
- Signatures are made over RR‑sets, not individual resource records. There is a corresponding
RRSIG for each signed RRset.
- Public keys live in
DNSKEY records at the apex of a signed zone. There can be more than one key, with different intended uses.
- The trust relationship between zones is expressed with a
DS record at the parent. The only globally configured “trust anchor” is the root’s key; everything below is bootstrapped from there.
The validation process for a single answer looks like this:
- The resolver asks for
www.example.com. IN A and gets back an A RRset and an RRSIG that covers A. The RRSIG contains the algorithm, key tag and signer’s name, along with inception/expiry times.
- It fetches the
DNSKEY RRset from example.com. and verifies the RRSIG over that RRset. The key in the DNSKEY set whose key tag/algorithm match the RRSIG is used to verify the signature over the A RRset. If the signature is cryptographically valid and within its validity period, the RRset is considered authentic.
- To know whether to trust
example.com.’s DNSKEY at all, the resolver walks up to the parent. The parent zone (com.) has a DS record for example.com.; the DS is just a hash of the child’s key. The DS RRset in com. is itself signed by com.’s keys, and so on up to the root.
Keys are commonly split into two roles:
- A zone‑signing key (ZSK) is used to sign the “ordinary” data RRsets in the zone. ZSKs are rolled more frequently.
- A key‑signing key (KSK) is used to sign just the
DNSKEY RRset. The digest of the KSK is what is published as a DS in the parent. Because of that external dependency, KSKs are changed less often.
When you sign a zone in this two‑key model, you get two RRSIGs over the DNSKEY RRset, one made by the KSK and one by the ZSK. The parent only ever sees the KSK indirectly: you compute a digest of the KSK using the advertised algorithm, submit that to the parent, and the parent publishes it as a DS record and signs it as part of its zone.
A validating resolver starts with the root’s DNSKEY as a trust anchor, validates the root’s RRSIGs, then validates the DS for .com in the root, then .com’s DNSKEY, and so on down to example.com.. If at any step the DS doesn’t match the child’s DNSKEY, or an RRSIG doesn’t verify, the chain of trust is broken and the data is treated as bogus. If there is no DS at a delegation point, validation stops and the child is treated as insecure rather than bogus.