What is DNSSEC?
DNSSEC is a set of security extensions to the DNS protocol that provides a way to verify the authenticity of DNS records. This helps prevent malicious activity such as cache poisoning, phishing and other attacks.
The purpose of DNSSEC is to protect internet clients from forged DNS data by verifying the digital signatures embedded in the data.
How it works
DNSSEC creates a dedicated record carrying a digital signature for each resource record. The key feature of a digital signature is its use of public key cryptography to guarantee the authenticity of DNS records. Anyone in the system can verify the signature, but only the holder of the secret key can sign new or modified data.
Public keys are published as DNSKEY resource records alongside the other resource records. The chain of records that identifies the public keys is called the chain of trust. A key's authenticity is verified through its fingerprints (hashes), which are sent to the parent zone as DS records. The fingerprints of the parent zone's public keys are in turn sent to its own parent zones. The chain of trust is built all the way up to the root zone, whose public key and fingerprints are published in ICANN's official documentation.
In practice, this means turning on DNSSEC for your domain happens in two places: signing the zone with whoever hosts its records (the DNS management portal, for example), then publishing the DS record with the company where the domain is registered. The steps are explained in Enabling DNSSEC.
DNSSEC uses two types of keys:
- ZSK (Zone Signing Key) — used to sign the records within the zone;
- KSK (Key Signing Key) — used to sign the keys.
We recommend setting a longer key length and a longer rollover period for the KSK than for the ZSK. The ZSK is used every time the domain zone is changed or updated. A short key makes signing the zone easier, and a short rollover period ensures a high level of security. KSKs are only used to sign keys, so they're used far less than the ZSK. A long key doesn't affect efficiency, and it's also safe to set a long rollover period for a long key. A long rollover period for KSKs means DS records need to be sent to the parent zone less often.
To keep DNSSEC keys from being compromised, the keys are rolled over. Keys are rolled over in stages, so that slave servers and DNS caching servers have enough time to sync with the master DNS server.
KSK rollover algorithm:
The DS record for the new KSK is published in the parent zone. In the DNS management portal, the next KSK is created right after the zone is signed or the old KSK is removed, so you can publish the new key's DS record in advance. To roll over the KSK correctly, publish the new key's DS record in the parent zone one month before the key's rollover date;
The KSK is changed. The active KSK is replaced with a new key. In the DNS management portal, the key is changed two weeks before the rollover date;
The old key's DS records are removed from the parent zone. The DNS management portal creates a new key, and it's up to you to carry out the required operations in the parent zone: delete the old key's DS record and add the new key's DS record.
ZSK rollover algorithm:
A new ZSK is created and published in the domain zone. The DNS management portal does this two weeks before the key change, and the new key isn't used to sign the zone yet;
The ZSK is changed. The newly published ZSK is activated, and the old ZSK is no longer used to sign zones;
The old, inactive ZSK is deleted. This happens two weeks after the ZSK change.
DNSSEC increases the size of DNS responses because of the signatures attached to them. When a response is larger than the network accepts over UDP, the resolver retries the query over TCP. If a network blocks DNS over TCP (port 53) or drops large packets that exceed the MTU (the largest packet size that can pass without fragmentation, usually 1500 bytes), users on that network may not be able to resolve your domain.
How is this guide?