DS2 -------->
RRSIGpar(DS) RRSIGpar(DS) --------> RRSIGpar(DS)
Child:
SOA0 --------> SOA1 SOA1
RRSIG10(SOA0) --------> RRSIG10(SOA1) RRSIG10(SOA1)
-------->
DNSKEY1 --------> DNSKEY2 DNSKEY2
-------->
DNSKEY10 --------> DNSKEY10 DNSKEY10
RRSIG1 (DNSKEY) --------> RRSIG2(DNSKEY) RRSIG2 (DNSKEY)
RRSIG10(DNSKEY) --------> RRSIG10(DNSKEY) RRSIG10(DNSKEY)
--------------------------------------------------------------------
Stages of Deployment for a Pre-Publish Key Signing Key Rollover
When the child zone wants to roll, it notifies the parent during the
"new DS" phase and submits the new key (or the corresponding DS) to
the parent. The parent publishes DS1 and DS2, pointing to DNSKEY1
and DNSKEY2, respectively. During the rollover ("new DNSKEY" phase),
which can take place as soon as the new DS set propagated through the
DNS, the child replaces DNSKEY1 with DNSKEY2. Immediately after that
("DS/DNSKEY removal" phase), it can notify the parent that the old DS
record can be deleted.
The drawbacks of this scheme are that during the "new DS" phase the
parent cannot verify the match between the DS2 RR and DNSKEY2 using
the DNS -- as DNSKEY2 is not yet published. Besides, we introduce a
"security lame" key (see Section 4.4.3). Finally, the child-parent
interaction consists of two steps. The "double signature" method
only needs one interaction.
4.2.4. Automated Key Rollovers
As keys must be renewed periodically, there is some motivation to
automate the rollover process. Consider the following:
o ZSK rollovers are easy to automate as only the child zone is
involved.
o A KSK rollover needs interaction between parent and child. Data
exchange is needed to provide the new keys to the parent;
consequently, this data must be authenticated and integrity must
be guaranteed in order to avoid attacks on the rollover.
4.3. Planning for Emergency Key Rollover
This section deals with preparation for a possible key compromise.
Our advice is to have a documented procedure ready for when a key
compromise is suspected or confirmed.
When the private material of one of your keys is compromised it can
be used for as long as a valid trust chain exists. A trust chain
remains intact for
o as long as a signature over the compromised key in the trust chain
is valid,
o as long as a parental DS RR (and signature) points to the
compromised key,
o as long as the key is anchored in a resolver and is used as a
starting point for validation (this is generally the hardest to
update).
While a trust chain to your compromised key exists, your namespace is
vulnerable to abuse by anyone who has obtained illegitimate
possession of the key. Zone operators have to make a trade-off if
the abuse of the compromised key is worse than having data in caches
that cannot be validated. If the zone operator chooses to break the
trust chain to the compromised key, data in caches signed with this
key cannot be validated. However, if the zone administrator chooses
to take the path of a regular rollover, the malicious key holder can
spoof data so that it appears to be valid.
4.3.1. KSK Compromise
A zone containing a DNSKEY RRSet with a compromised KSK is vulnerable
as long as the compromised KSK is configured as trust anchor or a
parental DS points to it.
A compromised KSK can be used to sign the key set of an attacker’s
zone. That zone could be used to poison the DNS.
Therefore, when the KSK has been compromised, the trust anchor or the
parental DS should be replaced as soon as possible. It is local
policy whether to break the trust chain during the emergency
rollover. The trust chain would be broken when the compromised KSK
is removed from the child’s zone while the parent still has a DS
pointing to the compromised KSK (the assumption is that there is only
one DS at the parent. If there are multiple DSes this does not apply
-- however the chain of trust of this particular key is broken).
Note that an attacker’s zone still uses the compromised KSK and the
presence of a parental DS would cause the data in this zone to appear
as valid. Removing the compromised key would cause the attacker’s
zone to appear as valid and the child’s zone as Bogus. Therefore, we
advise not to remove the KSK before the parent has a DS to a new KSK
in place.
4.3.1.1. Keeping the Chain of Trust Intact
If we follow this advice, the timing of the replacement of the KSK is
somewhat critical. The goal is to remove the compromised KSK as soon
as the new DS RR is available at the parent. And also make sure that
the signature made with a new KSK over the key set with the
compromised KSK in it expires just after the new DS appears at the
parent, thus removing the old cruft in one swoop.
The procedure is as follows:
1. Introduce a new KSK into the key set, keep the compromised KSK in
the key set.
2. Sign the key set, with a short validity period. The validity
period should expire shortly after the DS is expected to appear
in the parent and the old DSes have expired from caches.
3. Upload the DS for this new key to the parent.
4. Follow the procedure of the regular KSK rollover: Wait for the DS
to appear in the authoritative servers and then wait as long as
the TTL of the old DS RRs. If necessary re-sign the DNSKEY RRSet
and modify/extend the expiration time.
5. Remove the compromised DNSKEY RR from the zone and re-sign the
key set using your "normal" validity interval.
An additional danger of a key compromise is that the compromised key
could be used to facilitate a legitimate DNSKEY/DS rollover and/or
nameserver changes at the parent. When that happens, the domain may
be in dispute. An authenticated out-of-band and secure notify
mechanism to contact a parent is needed in this case.
Note that this is only a problem when the DNSKEY and or DS records
are used for authentication at the parent.
4.3.1.2. Breaking the Chain of Trust
There are two methods to break the chain of trust. The first method
causes the child zone to appear ’Bogus’ to validating resolvers. The
other causes the child zone to appear ’insecure’. These are
described below.
In the method that causes the child zone to appear ’Bogus’ to
validating resolvers, the child zone replaces the current KSK with a
new one and re-signs the key set. Next it sends the DS of the new
key to the parent. Only after the parent has placed the new DS in
the zone is the child’s chain of trust repaired.
An alternative method of breaking the chain of trust is by removing
the DS RRs from the parent zone altogether. As a result, the child
zone would become insecure.
4.3.2. ZSK Compromise
Primarily because there is no parental interaction required when a
ZSK is compromised, the situation is less severe than with a KSK
compromise. The zone must still be re-signed with a new ZSK as soon
as possible. As this is a local operation and requires no
communication between the parent and child, this can be achieved
fairly quickly. However, one has to take into account that just as
with a normal rollover the immediate disappearance of the old
compromised key may lead to verification problems. Also note that as
long as the RRSIG over the compromised ZSK is not expired the zone
may be still at risk.
4.3.3. Compromises of Keys Anchored in Resolvers
A key can also be pre-configured in resolvers. For instance, if
DNSSEC is successfully deployed the root key may be pre-configured in
most security aware resolvers.
If trust-anchor keys are compromised, the resolvers using these keys
should be notified of this fact. Zone administrators may consider
setting up a mailing list to communicate the fact that a SEP key is
about to be rolled over. This communication will of course need to
be authenticated, e.g., by using digital signatures.
End-users faced with the task of updating an anchored key should
always validate the new key. New keys should be authenticated out-
of-band, for example, through the use of an announcement website that
is secured using secure sockets (TLS) [21].
4.4. Parental Policies
4.4.1. Initial Key Exchanges and Parental Policies Considerations
The initial key exchange is always subject to the policies set by the
parent. When designing a key exchange policy one should take into
account that the authentication and authorization mechanisms used
during a key exchange should be as strong as the authentication and
authorization mechanisms used for the exchange of delegation
information between parent and child. That is, there is no implicit
need in DNSSEC to make the authentication process stronger than it
was in DNS.
Using the DNS itself as the source for the actual DNSKEY material,
with an out-of-band check on the validity of the DNSKEY, has the
benefit that it reduces the chances of user error. A DNSKEY query
tool can make use of the SEP bit [3] to select the proper key from a
DNSSEC key set, thereby reducing the chance that the wrong DNSKEY is
sent. It can validate the self-signature over a key; thereby
verifying the ownership of the private key material. Fetching the
DNSKEY from the DNS ensures that the chain of trust remains intact
once the parent publishes the DS RR indicating the child is secure.
Note: the out-of-band verification is still needed when the key
material is fetched via the DNS. The parent can never be sure
whether or not the DNSKEY RRs have been spoofed.
4.4.2. Storing Keys or Hashes?
When designing a registry system one should consider which of the
DNSKEYs and/or the corresponding DSes to store. Since a child zone
might wish to have a DS published using a message digest algorithm
not yet understood by the registry, the registry can’t count on being
able to generate the DS record from a raw DNSKEY. Thus, we recommend
that registry systems at least support storing DS records.
It may also be useful to store DNSKEYs, since having them may help
during troubleshooting and, as long as the child’s chosen message
digest is supported, the overhead of generating DS records from them
is minimal. Having an out-of-band mechanism, such as a registry
directory (e.g., Whois), to find out which keys are used to generate
DS Resource Records for specific owners and/or zones may also help
with troubleshooting.
The storage considerations also relate to the design of the customer
interface and the method by which data is transferred between
registrant and registry; Will the child zone administrator be able to
upload DS RRs with unknown hash algorithms or does the interface only
allow DNSKEYs? In the registry-registrar model, one can use the
DNSSEC extensions to the Extensible Provisioning Protocol (EPP) [15],
which allows transfer of DS RRs and optionally DNSKEY RRs.
4.4.3. Security Lameness
Security lameness is defined as what happens when a parent has a DS
RR pointing to a non-existing DNSKEY RR. When this happens, the
child’s zone may be marked "Bogus" by verifying DNS clients.
As part of a comprehensive delegation check, the parent could, at key
exchange time, verify that the child’s key is actually configured in
the DNS. However, if a parent does not understand the hashing
algorithm used by child, the parental checks are limited to only
comparing the key id.
Child zones should be very careful in removing DNSKEY material,
specifically SEP keys, for which a DS RR exists.
Once a zone is "security lame", a fix (e.g., removing a DS RR) will
take time to propagate through the DNS.
4.4.4. DS Signature Validity Period
Since the DS can be replayed as long as it has a valid signature, a
short signature validity period over the DS minimizes the time a
child is vulnerable in the case of a compromise of the child’s
KSK(s). A signature validity period that is too short introduces the
possibility that a zone is marked "Bogus" in case of a configuration
error in the signer. There may not be enough time to fix the
problems before signatures expire. Something as mundane as operator
unavailability during weekends shows the need for DS signature
validity periods longer than 2 days. We recommend an absolute
minimum for a DS signature validity period of a few days.
The maximum signature validity period of the DS record depends on how
long child zones are willing to be vulnerable after a key compromise.
On the other hand, shortening the DS signature validity interval
increases the operational risk for the parent. Therefore, the parent
may have policy to use a signature validity interval that is
considerably longer than the child would hope for.
A compromise between the operational constraints of the parent and
minimizing damage for the child may result in a DS signature validity
period somewhere between a week and months.
In addition to the signature validity period, which sets a lower
bound on the number of times the zone owner will need to sign the
zone data and which sets an upper bound to the time a child is
vulnerable after key compromise, there is the TTL value on the DS
RRs. Shortening the TTL means that the authoritative servers will
see more queries. But on the other hand, a short TTL lowers the
persistence of DS RRSets in caches thereby increasing the speed with
which updated DS RRSets propagate through the DNS.
5. Security Considerations
DNSSEC adds data integrity to the DNS. This document tries to assess
the operational considerations to maintain a stable and secure DNSSEC
service. Not taking into account the ’data propagation’ properties
in the DNS will cause validation failures and may make secured zones
unavailable to security-aware resolvers.
6. Acknowledgments
Most of the ideas in this document were the result of collective
efforts during workshops, discussions, and tryouts.
At the risk of forgetting individuals who were the original
contributors of the ideas, we would like to acknowledge people who
were actively involved in the compilation of this document. In
random order: Rip Loomis, Olafur Gudmundsson, Wesley Griffin, Michael
Richardson, Scott Rose, Rick van Rein, Tim McGinnis, Gilles Guette
Olivier Courtay, Sam Weiler, Jelte Jansen, Niall O’Reilly, Holger
Zuleger, Ed Lewis, Hilarie Orman, Marcos Sanz, and Peter Koch.
Some material in this document has been copied from RFC 2541 [12].
Mike StJohns designed the key exchange between parent and child
mentioned in the last paragraph of Section 4.2.2
Section 4.2.4 was supplied by G. Guette and O. Courtay.
Emma Bretherick, Adrian Bedford, and Lindy Foster corrected many of
the spelling and style issues.
Kolkman and Gieben take the blame for introducing all miscakes (sic).
While working on this document, Kolkman was employed by the RIPE NCC
and Gieben was employed by NLnet Labs.
7. References
7.1. Normative References
[1] Mockapetris, P., "Domain names - concepts and facilities", STD
13, RFC 1034, November 1987.
[2] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, November 1987.
[3] Kolkman, O., Schlyter, J., and E. Lewis, "Domain Name System
KEY (DNSKEY) Resource Record (RR) Secure Entry Point (SEP)
Flag", RFC 3757, May 2004.
[4] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose,
"DNS Security Introduction and Requirements", RFC 4033, March
2005.
[5] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose,
"Resource Records for the DNS Security Extensions", RFC 4034,
March 2005.
[6] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose,
"Protocol Modifications for the DNS Security Extensions", RFC
4035, March 2005.
7.2. Informative References
[7] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
[8] Ohta, M., "Incremental Zone Transfer in DNS", RFC 1995, August
1996.
[9] Vixie, P., "A Mechanism for Prompt Notification of Zone Changes
(DNS NOTIFY)", RFC 1996, August 1996.
[10] Wellington, B., "Secure Domain Name System (DNS) Dynamic
Update", RFC 3007, November 2000.
[11] Andrews, M., "Negative Caching of DNS Queries (DNS NCACHE)",
RFC 2308, March 1998.
[12] Eastlake, D., "DNS Security Operational Considerations", RFC
2541, March 1999.
[13] Orman, H. and P. Hoffman, "Determining Strengths For Public
Keys Used For Exchanging Symmetric Keys", BCP 86, RFC 3766,
April 2004.
[14] Eastlake, D., Schiller, J., and S. Crocker, "Randomness
Requirements for Security", BCP 106, RFC 4086, June 2005.
[15] Hollenbeck, S., "Domain Name System (DNS) Security Extensions
Mapping for the Extensible Provisioning Protocol (EPP)", RFC
4310, December 2005.
[16] Lenstra, A. and E. Verheul, "Selecting Cryptographic Key
Sizes", The Journal of Cryptology 14 (255-293), 2001.
[17] Schneier, B., "Applied Cryptography: Protocols, Algorithms, and
Source Code in C", ISBN (hardcover) 0-471-12845-7, ISBN
(paperback) 0-471-59756-2, Published by John Wiley & Sons Inc.,
1996.
[18] Rose, S., "NIST DNSSEC workshop notes", June 2001.
[19] Jansen, J., "Use of RSA/SHA-256 DNSKEY and RRSIG Resource
Records in DNSSEC", Work in Progress, January 2006.
[20] Hardaker, W., "Use of SHA-256 in DNSSEC Delegation Signer (DS)
Resource Records (RRs)", RFC 4509, May 2006.
[21] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., and
T. Wright, "Transport Layer Security (TLS) Extensions", RFC
4366, April 2006.
Appendix A. Terminology
In this document, there is some jargon used that is defined in other
documents. In most cases, we have not copied the text from the
documents defining the terms but have given a more elaborate
explanation of the meaning. Note that these explanations should not
be seen as authoritative.
Anchored key: A DNSKEY configured in resolvers around the globe.
This key is hard to update, hence the term anchored.
Bogus: Also see Section 5 of [4]. An RRSet in DNSSEC is marked
"Bogus" when a signature of an RRSet does not validate against a
DNSKEY.
Key Signing Key or KSK: A Key Signing Key (KSK) is a key that is used
exclusively for signing the apex key set. The fact that a key is
a KSK is only relevant to the signing tool.
Key size: The term ’key size’ can be substituted by ’modulus size’
throughout the document. It is mathematically more correct to use
modulus size, but as this is a document directed at operators we
feel more at ease with the term key size.
Private and public keys: DNSSEC secures the DNS through the use of
public key cryptography. Public key cryptography is based on the
existence of two (mathematically related) keys, a public key and a
private key. The public keys are published in the DNS by use of
the DNSKEY Resource Record (DNSKEY RR). Private keys should
remain private.
Key rollover: A key rollover (also called key supercession in some
environments) is the act of replacing one key pair with another at
the end of a key effectivity period.
Secure Entry Point (SEP) key: A KSK that has a parental DS record
pointing to it or is configured as a trust anchor. Although not
required by the protocol, we recommend that the SEP flag [3] is
set on these keys.
Self-signature: This only applies to signatures over DNSKEYs; a
signature made with DNSKEY x, over DNSKEY x is called a self-
signature. Note: without further information, self-signatures
convey no trust. They are useful to check the authenticity of the
DNSKEY, i.e., they can be used as a hash.
Singing the zone file: The term used for the event where an
administrator joyfully signs its zone file while producing melodic
sound patterns.
Signer: The system that has access to the private key material and
signs the Resource Record sets in a zone. A signer may be
configured to sign only parts of the zone, e.g., only those RRSets
for which existing signatures are about to expire.
Zone Signing Key (ZSK): A key that is used for signing all data in a
zone. The fact that a key is a ZSK is only relevant to the
signing tool.
Zone administrator: The ’role’ that is responsible for signing a zone
and publishing it on the primary authoritative server.
Appendix B. Zone Signing Key Rollover How-To
Using the pre-published signature scheme and the most conservative
method to assure oneself that data does not live in caches, here
follows the "how-to".
Step 0: The preparation: Create two keys and publish both in your key
set. Mark one of the keys "active" and the other "published".
Use the "active" key for signing your zone data. Store the
private part of the "published" key, preferably off-line. The
protocol does not provide for attributes to mark a key as active
or published. This is something you have to do on your own,
through the use of a notebook or key management tool.
Step 1: Determine expiration: At the beginning of the rollover make a
note of the highest expiration time of signatures in your zone
file created with the current key marked as active. Wait until
the expiration time marked in Step 1 has passed.
Step 2: Then start using the key that was marked "published" to sign
your data (i.e., mark it "active"). Stop using the key that was
marked "active"; mark it "rolled".
Step 3: It is safe to engage in a new rollover (Step 1) after at
least one signature validity period.
Appendix C. Typographic Conventions
The following typographic conventions are used in this document:
Key notation: A key is denoted by DNSKEYx, where x is a number or an
identifier, x could be thought of as the key id.
RRSet notations: RRs are only denoted by the type. All other
information -- owner, class, rdata, and TTL--is left out. Thus:
"example.com 3600 IN A 192.0.2.1" is reduced to "A". RRSets are a
list of RRs. A example of this would be "A1, A2", specifying the
RRSet containing two "A" records. This could again be abbreviated to
just "A".
Signature notation: Signatures are denoted as RRSIGx(RRSet), which
means that RRSet is signed with DNSKEYx.
Zone representation: Using the above notation we have simplified the
representation of a signed zone by leaving out all unnecessary
details such as the names and by representing all data by "SOAx"
SOA representation: SOAs are represented as SOAx, where x is the
serial number.
Using this notation the following signed zone: