EDNS(0) Padding
What is EDNS(0) Padding?
EDNS(0) Padding, defined in RFC 7830, adds extra bytes to a DNS message so its size alone doesn't reveal which query it carries, closing a side channel encryption leaves open over DoH, DoT or DoQ. AdminKit's DoH-vs-DoT guide covers the encrypted transports padding is meant to be used alongside.
By AdminKit team, Netbase JSC · Updated
The EDNS(0) Padding option, defined in RFC 6891’s extension mechanism and specified in RFC 7830 (document record at the IETF Datatracker), registered as its own option code in IANA’s DNS Parameters registry, adds a block of extra zero-value bytes to a DNS message so its total size no longer reveals which specific query or response it is. Even when a DNS query travels over an encrypted transport like DoH, DoT, or DoQ, an observer who can’t read the encrypted content can often still measure the packet’s length, and many domain names or record types produce a distinctive, recognizable message size — defeating part of the privacy benefit encryption was supposed to provide. Padding closes that side channel by rounding messages up to a small set of fixed sizes, so two different queries that happened to produce different lengths unpadded can end up looking identical on the wire. Unbound, for example, pads queries it sends over TLS upstreams to a multiple of 128 bytes by default, and pads TLS responses to padded queries to a multiple of 468 bytes. On the client side, Google Public DNS’s DoH documentation recommends using EDNS padding options to pad DoH queries to a few common lengths to protect against traffic analysis. RFC 7830 is explicit that padding must only be used over an already-encrypted transport: padding an unencrypted UDP query would instead make it a larger, more effective tool for a DNS amplification attack, the opposite of its intended purpose.
AdminKit groups eDNS(0) Padding under its DNS cluster — browse the AdminKit glossary index for other related terms.
Frequently asked questions
Why must EDNS(0) Padding only be used over an encrypted DNS transport?
Padding an unencrypted UDP query would instead make it a larger, more effective tool for a DNS amplification attack, the opposite of its intended purpose, so RFC 7830 restricts it to already-encrypted transports.
What privacy leak does padding close?
It closes the side channel where an encrypted DNS message's length alone, left unpadded, can reveal which domain name or record type it carries even though the content itself is encrypted.
Which encrypted DNS transports is padding meant to be used with?
DoH, DoT and DoQ -- any transport that already encrypts the query, since padding only hides length, not content.