<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.nl" -->
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' []>
<rfc ipr="trust200902" category="std" xml:lang="en" consensus="yes" updates="8624" docName="draft-fanf-dnsop-sha-ll-not-00">
<?rfc toc="yes"?><?rfc symrefs="yes"?><?rfc sortrefs="yes"?><?rfc compact="yes"?><?rfc subcompact="no"?><?rfc comments="no"?>
<front>
<title abbrev="DNSSEC vs collision attacks">Hardening DNSSEC against collision weaknesses in SHA-1 and other cryptographic hash algorithms</title><author initials="T." surname="Finch" fullname="Tony Finch"><organization>University of Cambridge</organization><address><postal><street></street>
<street>University Information Services</street>
<street>Roger Needham Building</street>
<street>7 JJ Thomson Avenue</street>
<city>Cambridge</city>
<code>CB3 0RB</code>
<country>England</country>
</postal><email>dot@dotat.at</email>
</address></author>
<date year="2020" month="March" day="9"></date>
<area>Operations and Management</area><workgroup>DNS Operations</workgroup><keyword>DNS</keyword>
<keyword>SHA-1</keyword>
<keyword>RRSIG</keyword>

<abstract><t>DNSSEC deployments have often used the SHA-1 cryptographic hash
algorithm to provide authentication of DNS data. This document
explains why SHA-1 is no longer secure for this purpose, and
deprecates its use in DNSSEC signatures. This document updates
RFC 8624.</t>
</abstract>

</front>

<middle>

<section anchor="introduction" title="Introduction">
<t>Since 2005, SHA-1 has been known to be much weaker than it was
designed to be. Over the last 5 years there has been a series of
increasingly powerful demonstrations that SHA-1's weaknesses can be
exploited in practice. In January 2020, Gaëtan Leurent and Thomas
Peyrin announced a chosen-prefix collision for SHA-1 [SHA-mbles]. This
was the first practical break of SHA-1 as used in cryptographic
signatures.</t>
<t>DNSSEC uses cryptographic signatures to authenticate DNS data. Its
signature algorithms <xref target="DNSKEY-IANA"></xref> include RSASHA1 (5) and
RSASHA1-NSEC3-SHA1 (7) which are vulnerable to chosen-prefix
collisions in SHA-1, as described in <xref target="collide"></xref>. This document
deprecates these vulnerable algorithms (<xref target="deprecate"></xref>).</t>
<t>SHA-1 has been deprecated in other situations for several years (see
<xref target="timeline"></xref>). This document's timetable for deprecating SHA-1 in
DNSSEC (<xref target="deprecate"></xref>) is based on those examples, adapted for the
particulars of the DNS. <xref target="seccons"></xref> discusses the trade-offs between
speedy deprecation and security.</t>
<t>A collision attack can be used against DNSSEC in a number of ways,
some of which are explored in <xref target="attack"></xref>. Certain weaknesses in the way
DNSSEC is sometimes deployed can make collision attacks easier to
carry out, or make their consequences more severe. Although the only
sure way to protect against collision attacks is to use a secure
algorithm (<xref target="deprecate"></xref>), <xref target="harden"></xref> and <xref target="attack"></xref> outline some partial
mitigations.</t>
<t>The DNS uses SHA-1 for a number of other less vulnerable purposes, as
outlined in section <xref target="otherr"></xref>.</t>

<section anchor="terminology" title="Terminology">
<t>The key words MUST, MUST NOT, REQUIRED, SHALL,
SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY,
and OPTIONAL in this document are to be interpreted as described in
<xref target="RFC2119"></xref>.</t>
</section>
</section>

<section anchor="deprecate" title="Deprecating SHA-1 in DNSSEC">
<t>The following table lists the implementation recommendations for
DNSKEY algorithms <xref target="DNSKEY-IANA"></xref>. The change from <xref target="RFC8624"></xref>
section 3.1 is to deprecate algorithms 5 and 7.</t>
<texttable>
<ttcol>No.</ttcol>
<ttcol>Mnemonic</ttcol>
<ttcol>DNSSEC Signing</ttcol>
<ttcol>DNSSEC Validation</ttcol>


<c>1</c>
<c>RSAMD5</c>
<c>MUST NOT</c>
<c>MUST NOT</c>

<c>3</c>
<c>DSA</c>
<c>MUST NOT</c>
<c>MUST NOT</c>

<c>5</c>
<c>RSASHA1</c>
<c>MUST NOT</c>
<c>MUST NOT after 2021</c>

<c>6</c>
<c>DSA-NSEC3-SHA1</c>
<c>MUST NOT</c>
<c>MUST NOT</c>

<c>7</c>
<c>RSASHA1-NSEC3-SHA1</c>
<c>MUST NOT</c>
<c>MUST NOT after 2021</c>

<c>8</c>
<c>RSASHA256</c>
<c>MUST</c>
<c>MUST</c>

<c>10</c>
<c>RSASHA512</c>
<c>NOT RECOMMENDED</c>
<c>MUST</c>

<c>12</c>
<c>ECC-GOST</c>
<c>MUST NOT</c>
<c>MAY</c>

<c>13</c>
<c>ECDSAP256SHA256</c>
<c>MUST</c>
<c>MUST</c>

<c>14</c>
<c>ECDSAP384SHA384</c>
<c>MAY</c>
<c>RECOMMENDED</c>

<c>15</c>
<c>ED25519</c>
<c>RECOMMENDED</c>
<c>RECOMMENDED</c>

<c>16</c>
<c>ED448</c>
<c>MAY</c>
<c>RECOMMENDED</c>

</texttable><t>The following subsections have recommended timelines for deprecating
algorithms 5 and 7 in specific situations.</t>

<section anchor="dnssec-signing-software" title="DNSSEC signing software">
<t>DNSSEC key management and zone signing software MUST remove support
for algorithms 5 and 7 in their next feature release.</t>
</section>

<section anchor="dns-hosting-services" title="DNS hosting services">
<t>Authoritative DNS hosting services that include DNSSEC signing as part
of the service SHOULD NOT generate a new key with algorithms 5 or 7
for a zone that does not already have a key with the same algorithm.
They MUST NOT do so after the end of 2020.</t>
<t>Zones signed with algorithms 5 or 7 SHOULD be rolled over to a
mandatory algorithm (13 or 8) as soon as possible. The rollovers
MUST be complete before the end of 2021.</t>
</section>

<section anchor="dnssec-validating-software" title="DNSSEC validating software">
<t>Validating resolvers SHOULD have a build-time or run-time option to
disable selected DNSKEY algorithms, that is, to treat them as unknown
or insecure.</t>
<t>Algorithms 5 and 7 MUST be disabled in 2022 at the latest. If SHA-1
becomes significantly weaker before then, Algorithms 5 and 7 MUST be
disabled in a security patch release.</t>
</section>

<section anchor="dns-resolver-services" title="DNS resolver services">
<t>Validating resolvers MUST treat algorithms 5 and 7 as unknown or
insecure after the start of 2022, or earlier if SHA-1 becomes
significantly weaker before then.</t>
</section>
</section>

<section anchor="collide" title="Collision attacks against DNSSEC">
<t>This section explains how collisions in cryptographic functions
(such as SHA-1) can be used to break DNSSEC data authentication.
<xref target="attack"></xref> has some more specific examples of how this break can be
used to mount attacks.</t>

<section anchor="chosen-prefix-collisions" title="Chosen-prefix collisions">
<t>With hash functions like SHA-1, a chosen-prefix collision attack
uses two messages that have a structure like this:</t>

<figure><artwork>            +----------+-----------+--------+
message-1:  | prefix-1 | collide-1 | suffix |
            +----------+-----------+--------+

            +----------+-----------+--------+
message-2:  | prefix-2 | collide-2 | suffix |
            +----------+-----------+--------+
</artwork></figure>

<t>The two prefixes are entirely under the attacker's control.</t>
<t>The collision blocks are calculated to make the hashes collide. They
look like binary junk and cannot be made to conform to any
particular syntax. The collision blocks are 588 bytes long in the
best attack on SHA-1 at the time of writing <xref target="SHA-mbles"></xref>.</t>
<t>The messages may need a suffix so that they are syntactically valid,
but this must be the same in both messages.</t>
</section>

<section anchor="collision-attacks-and-signatures" title="Collision attacks and signatures">
<t>A signature algorithm like RSASHA1 takes a cryptographic hash of the
message (using SHA-1 in this case) and uses an asymmetric algorithm
(RSA in this case) to turn the hash into a signature.</t>
<t>If the hash function is vulnerable, like SHA-1, then an attacker can:</t>
<t>
<list style="symbols">
<t>construct two prefixes, one innocuous and one malicious;</t>
<t>calculate collision blocks so the two messages have the same hash;</t>
<t>submit the innocuous message to be signed by some authority;</t>
<t>copy the signature from the innocious message to the malicious
message;</t>
<t>use the signed malicious message to perform attacks that would
not be possible without it.</t>
</list>
</t>
<t>The copied signature works on both the innocuous and malicious
messages because their hashes match.</t>
<t>It is usually less easy than this, because in most protocols part of
the innocuous message is chosen by the signer, so the attacker needs
to predict how the signer will work.</t>
</section>

<section anchor="breaking-dnssec" title="Breaking DNSSEC">
<t>To use a collision attack against DNSSEC, the innoccuous and
malicious messages are DNS RRsets.</t>
<t>DNSSEC provides strong authentication for DNS data. Within the DNS,
it prevents spoofing attacks and cache poisoning attacks. For
applications that use the DNS, DNSSEC can provide strong
authentication for application identifiers, such as a host name and
associated public key or challenge/response. Breaking DNSSEC means
subverting this authentication.</t>
<t>If an attacker has even very limited access to update a DNS zone
that uses SHA-1 (algorithm 5 or 7), the attacker can use a collision
attack to gain control over other names in the same zone.</t>
<t>Our attacker is able to update the DNS for certain innoccuous
records. The zone owner signs the updated innoccuous records and
publishes the new records and RRSIG in the zone. The attacker can
then make a DNS query for the updated records, and copy the
signature field from the innoccuous RRSIG into the signature field
of the attacker's malicious RRSIG. The attacker can use the signed
malicious RRset as part of a DNS spoofing or cache poisoning attack.
<xref target="attack"></xref> has some examples.</t>
</section>

<section anchor="collision-attacks-and-rrsig-records" title="Collision attacks and RRSIG records">
<t>When the attacker calculates the collision blocks, there is a bit
more to the innoccuous and malicious messages than just the RRsets.
They need to be in the format used for constructing RRSIG records
specified in <xref target="RFC4034"></xref> section 3.1.8.1 and sketched in the diagram
below:</t>

<figure><artwork>+------------------------------------+
| RRSIG RDATA                        |
+------------------------------------+
| NAME TYPE CLASS TTL RDLENGTH RDATA |
+------------------------------------+
| ... more records ...               |
+------------------------------------+
| NAME TYPE CLASS TTL RDLENGTH (     |
|                 collision blocks ) |
+------------------------------------+
</artwork></figure>

<t>The RRSIG RDATA is controlled by the signer, and must be predicted
by the attacker. <xref target="harden"></xref> discusses how easy it is to predict the
RRSIG RDATA fields.</t>
<t>The DNS records are under the attacker's control, with some
limitations:</t>
<t>
<list style="symbols">
<t>In the innoccuous records, the NAME and TYPE identify an RRset
that the attacker can update.</t>
<t>In the malicious records, the NAME must be in a zone signed by
the same key as the innoccuous records.</t>
<t>The innoccuous and malicious TYPEs do not need to be the same,
but they must both have RDATA fields that can accommodate the
collision blocks.</t>
<t>The attacker needs to ensure the records containg the collision
blocks come last when the RRsets are sorted into canonical
order.</t>
<t>The innoccuous and malicious records do not have to be aligned
with each other, but they need to have the same total length.</t>
</list>
</t>
</section>
</section>

<section anchor="harden" title="Hardening RRSIG records">
<t>To perform a collision attack against DNSSEC, the attacker needs to
know the RRSIG RDATA fields that the zone owner will use when
signing the attacker's innoccuous records.</t>
<t>The RRSIG RDATA fields are specified in <xref target="RFC4034"></xref> section 3.1.
They are:</t>
<t>
<list style="symbols">
<t>Type covered: same as the TYPE of the innoccuous RRset.</t>
<t>Algorithm: same as the algorithm of the zone's DNSKEY records,
which for a vulnerable zone will be 5 or 7.</t>
<t>Labels: derived from the NAME of the innoccuous RRset.</t>
<t>Original TTL: same as the TTL of the innoccuous RRset.</t>
<t>Signature expiration: a time set by the signer.</t>
<t>Signature inception: a time set by the signer.</t>
<t>Key tag: obtained from one of the zone's DNSKEY records.</t>
<t>Signer's name: the name of the zone's DNSKEY records.</t>
</list>
</t>
<t>We can see that all of these fields are known to the attacker, apart
from the inception and expiration times.</t>

<section anchor="predicting-inception-and-expiration-times" title="Predicting inception and expiration times">
<t>There are a number of common ways for DNSSEC signers to set
signature inception and expiration times:</t>
<t>
<list style="symbols">
<t>The times are known offsets from the moment a DNS update is
processed.</t>
<t>The update time is rounded to a multiple of (for example) 24
hours and the signature times are known offsets from that.</t>
<t>The zone is signed on a known schedule and the times are derived
from that schedule.</t>
</list>
</t>
<t>So in many cases an attacker can predict all the RRSIG RDATA fields
with little difficulty.</t>
</section>

<section anchor="unpredictable-x-509-certificates" title="Unpredictable X.509 certificates">
<t>(A brief diversion to provide some rationale for the next
sub-section.)</t>
<t>In 2008 a chosen-prefix collision attack against MD5 was used to
obtain an illegitimate CA certificate signed by a commercial CA
<xref target="ROGUE-CA"></xref>. A key part of this attack was to predict the serial
number and validity period assigned by the commercial CA to the
innocuous certificate so that its MD5 hash would collide with the
malicious rogue CA certificate.</t>
<t>Following this attack, certificate authorities started using random
serial numbers instead of sequential numbers. In 2016 the CA/Browser
forum baseline requirements were amended to increase the amount of
randomness required from 20 bits to 64 bits <xref target="CABforum2016"></xref>. This
extra hardening was in addition to deprecating SHA-1 <xref target="CABforum2014"></xref>.</t>
</section>

<section anchor="less-predictable-rrsig-records" title="Less predictable RRSIG records">
<t>In addition to upgrading to a secure algorithm (<xref target="deprecate"></xref>),
DNSSEC signers can provide extra protection against possible
collision attacks by adding entropy to make RRSIG inception and
expiration times less predictable.</t>
<t>The inception time SHOULD include at least 12 bits of output from a
CSPRNG. (2^12 seconds is slightly more than an hour.) For example,
set the inception time to the signing time minus an hour minus the
entropy.</t>
<t>The expiration time SHOULD include output from a CSPRNG equivalent
to about 25% of the nominal validity period. For instance, 19 bits
(6 days) if the validity period is 1 month, or 17 bits (1.5 days) if
the validity period is 1 week. For example, set the expiration time
to the signing time plus 75% of the validity period plus the
entropy.</t>
<t>A signer SHOULD change its signature validity times frequently, for
example, different times for each RRset, or different times each
second. This is so that an attacker cannot observe the signer's
current validity period and perform a collision attack before the
period changes.</t>
</section>
</section>

<section anchor="attack" title="Collision attacks and other DNS record types">
<t>This section discusses how a SHA-1 collision attack can be used with
various DNS record types. For an RRtype to be suitable it needs to
have a large RDATA with basically no internal structure, to
accommodate the collision blocks, which are 588 bytes long in the
best attack on SHA-1 at the time of writing <xref target="SHA-mbles"></xref>.</t>
<t>There are a number of weaknesses that make a collision attack easier
to carry out, or which make the consequences of an attack more
severe. This section describes some mitigations for these
weaknesses, but note that these mitigations do not prevent collision
attacks. The main defence is to upgrade zones to a secure algorithm
(<xref target="deprecate"></xref>) and in many cases that will be easier than the
additional mitigations outlined below.</t>

<section anchor="txt-records" title="TXT records">
<t>TXT records are an attractive vehicle for a collision attack.</t>
<t>Access to update TXT records might be granted to support things like
ACME dns-01 challenges <xref target="RFC8555"></xref>, so they can be useful as an
attacker's innoccuous records.</t>
<t>As the target of an attacker's malicious records, TXT records have
several interesting functions that might be useful to an attacker,
including ACME <xref target="RFC8555"></xref>, DKIM <xref target="RFC6376"></xref>, SPF <xref target="RFC7208"></xref>,
authorization to provision cloud services, etc.</t>

<section anchor="syntax-of-txt-records" title="Syntax of TXT records">
<t>A TXT record's RDATA contains a sequence of strings, each of which
is a length octet followed by up to 255 octets of data. A single
string is too small to accommodate SHA-1 collision blocks.</t>
<t>An attacker can cope with this difficulty by not worrying about how
the string lengths end up inside a collision block. At the end of
the block there will be some unpredictable length of string that
needs to be filled; the attacker can append 255 zero bytes, which
will fill the remainder of the unknown string. The excess zero bytes
will parse as a sequence of zero-length strings. Although the
unfilled string lengths may be different in the inoccuous and
malicious records, they are both fixed by an identical suffix of 255
zeroes.</t>
</section>

<section anchor="mitigating-txt-record-attacks" title="Mitigating TXT record attacks">
<t>Some attacks might be prevented by imposing stricter requirements on
TXT records, since most practical uses do not put un-encoded binary
data in TXT records.</t>
<t>An authoritative server MAY reject TXT records in DNS UPDATEs and
zone files if the strings contain ASCII control characters or
invalid UTF-8. This strict checking SHOULD be configurable so that
zone owners can use unrestricted binary in TXT records if they wish.</t>
</section>
</section>

<section anchor="caa-records" title="CAA records">
<t>An attacker might want to spoof certificate authority authorization
records <xref target="RFC8659"></xref> in order to obtain an illegitimate X.509
certificate.</t>
<t>A CAA record contains tag and value strings. The length of the value
is unrestricted, which makes it easy to accommodate collision blocks.</t>
<t>To mitigate collision attacks on CAA records, the specifications for
CAA record syntax and how CAA records are processed by certificate
authorities could be tightened up to reject a CAA RRset unless it is
all printable ASCII.</t>
</section>

<section anchor="sshfp-records" title="SSHFP records">
<t>An SSHFP record contains a fingerprint of a server public key
<xref target="RFC4255"></xref>. They are attractive as the target of a spoofing attack.</t>
<t>Access to update SSHFP records might be granted so that servers can
register themselves in the DNS, so SSHFP records can be useful as an
attacker's innoccuous records.</t>
<t>The length of an SSHFP record is implied by its fingerprint type
field, but they can be used in collision attacks if the length is
not strictly checked, or if unknown fingerprint types are allowed.</t>
<t>Authoritative DNS servers MAY reject SSHFP records with unknown
fingerprint types or mismatched lengths in DNS UPDATEs and zone
files. SSH clients MAY reject an entire SSHFP RRset if any record
has a fingerprint longer than 64 bytes. (Assuming that fingerprints
longer than 512 bits do not make sense.)</t>
</section>

<section anchor="dnskey-records" title="DNSKEY records">
<t>There are a couple of DNSSEC key management models that can make the
consequences of a collision attack worse.</t>

<section anchor="shared-keys" title="Shared keys">
<t>Normally each zone has its own DNSSEC keys, so a collision attack only
works when the attacker's inoccuous and malicious records are in the
same zone.</t>
<t>Some DNSSEC deployments share the same keys across multiple zones.
This allows an attacker to target names in any zone that uses the same
key. For example, if this is a multi-tenant hosting environment, the
attacker could sign up with their own domain and use that to perform
collision attacks against other customers on the same platform.</t>
<t>DNS hosting services and DNSSEC signing software SHOULD NOT allow keys
to be shared between multiple zones.</t>
</section>

<section anchor="combined-signing-keys" title="Combined signing keys">
<t>The traditional DNSSEC setup has two keys for a zone: a key-signing
key (KSK) that is only used to sign the zone's DNSKEY RRset; and a
zone-signing key (ZSK) which signs the other records in the zone.</t>
<t>There is a simpler setup in which a zone has only one key: a combined
signing key (CSK) which signs all the records in the zone.</t>
<t>The DNSKEY RRset is a huge target in a zone that is vulnerable to
collision attacks: if the attacker can get their own public key into a
signed DNSKEY RRset then one successful collision attack can be used
to spoof any record in the zone.</t>
<t>In a zone with split ZSK/KSK, the DNSKEY RRset is only trusted if it
is signed by the KSK, but collision attacks can only obtain a RRset
signed by the ZSK.</t>
<t>In a zone with a CSK the attacker can obtain a malicious trusted
DNSKEY RRset using a collision attack.</t>
<t>DNS hosting services and DNSSEC signing software SHOULD encourage
split ZSK/KSK configurations.</t>
</section>
</section>

<section anchor="ds-records" title="DS records">
<t>Top-level domains are the most prominent example of zones that can be
updated by many different clients from mutually antagonistic
organizations.</t>
<t>TLDs are typically updated via EPP <xref target="RFC5730"></xref>. The only delegation
RRtype it might be possible to use for collision attacks are DS
records. (The other delegation records, NS and glue addresses, are not
signed and their syntax is too constrained.)</t>
<t>Collision attacks using DS records SHOULD be prevented as follows:</t>
<t>
<list style="symbols">
<t>Unknown DS digest types are rejected;</t>
<t>DS records are required to have the correct length for their
digest type;</t>
<t>Alternatively, instead of using client-generated DS records, the
registry accepts DNSKEY records and generates the DS records.</t>
</list>
</t>
</section>
</section>

<section anchor="otherr" title="Other uses of SHA-1 in the DNS">

<section anchor="ds-and-cds-records" title="DS and CDS records">
<t>A DS or CDS record securely identifies a DNSKEY record using a
cryptographic digest (<xref target="RFC4034"></xref> section 5). One of the digest types
is SHA-1. It is deprecated by <xref target="RFC8624"></xref>.</t>
<t>For this purpose, the digest needs preimage security, which SHA-1
still has, and collision attacks do not affect it.</t>
</section>

<section anchor="nsec3-records" title="NSEC3 records">
<t>NSEC3 is an alternative mechanism for authenticated denial of
existence in DNSSEC. It is based on SHA-1 hashes of domain names. The
NSEC3 specification <xref target="RFC5155"></xref> discusses collisions in some detail.</t>
<t>NSEC3 can be attacked with an identical-prefix collision, which is
simpler than the chosen-prefix collisions that are the main subject
of this document. The best collision known at the time of writing
<xref target="SHAttered"></xref> uses two SHA-1 input blocks (128 bytes) so a collision
could in principle be made to fit into a domain name for an attack
on NSEC3. However it will be difficult to make the colliding domain
names conform to host name syntax, and the attack will be futile
because the signer can defeat it by changing its NSEC3 salt
(<xref target="RFC5155"></xref> section C.2.1).</t>
</section>

<section anchor="sshfp-records-1" title="SSHFP records">
<t>An SSHFP record securely identifies an SSH server public key using a
cryptographic digest <xref target="RFC4255"></xref>. Although SSHFP SHA-1 digests have
not yet been deprecated, SHA-256 is preferred <xref target="RFC6594"></xref>.</t>
<t>For SSHFP records the digest needs preimage security, which SHA-1
still has, and collision attacks do not affect it.</t>
</section>

<section anchor="tsig-authentication" title="TSIG authentication">
<t>TSIG is a DNS extension for secret-key transaction authentication
<xref target="I-D.ietf-dnsop-rfc2845bis"></xref>. Its <spanx style="verb">hmac-sha1</spanx> algorithm is
deprecated. Collision attacks do not affect HMAC SHA-1.</t>
</section>
</section>

<section anchor="seccons" title="Security considerations">
<t>We find ourselves in an awkward and embarrassing situation. As
<xref target="timeline"></xref> shows, there has been plenty of warning about the
weakness of SHA-1. Other parts of the industry started making
efforts to deprecate it years ago. But DNSSEC has been complacent.</t>
<t>At the time of writing, there are 1516 top-level domains, of which
1102 use secure DNSSEC algorithms, 274 use algorithms 5 or 7 (RSA
SHA-1), and 140 are insecure. In the reverse DNS, 3 RIRs use secure
DNSSEC algorithms, 2 RIRs use algorithm 5, and many of the non-RIR
legacy delegations are insecure.</t>

<section anchor="staying-secure" title="Staying secure">
<t>There are still many domains that depend on SHA-1 to secure
applications that use DNSSEC, such as issuing TLS certificates
<xref target="RFC8659"></xref> <xref target="RFC8555"></xref>, sending inter-domain email <xref target="RFC7672"></xref>,
and authenticating SSH servers <xref target="RFC4255"></xref>.</t>
<t>Some applications use the &quot;authenticated data&quot; (AD bit) signal from
DNSSEC to make security decisions, and will fail if it unexpectedly
switches off. Other applications use DNSSEC passively and will
silently go insecure. In either case we would prefer them to
continue working as if secure, as long as SHA-1 is still
significantly better than insecure DNS.</t>
</section>

<section anchor="when-to-declare-sha-1-insecure" title="When to declare SHA-1 insecure">
<t>At the time of writing, a SHA-1 chosen-prefix collision costs less
than US$100,000 in computer time, takes about a month, and requires
the attention of expert cryptanalysts. Attacks seem to be getting
better by a factor of 3 or 4 per year.</t>
<t>There is not much time before collisions become affordable, and
possible for non-experts to calculate. <xref target="deprecate"></xref> hopes this will
not happen within the next 2 years.</t>
<t>This 2 year guess is likely to be too optimistic, so DNSSEC
validators need to be prepared to disable support for SHA-1 by
configuration change or security patch as soon as a significantly
improved attack on SHA-1 is announced.</t>
</section>

<section anchor="avoiding-unwanted-insecurity" title="Avoiding unwanted insecurity">
<t>The reason for not deprecating SHA-1 immediately is to allow time to
perform algorithm rollovers, so that zones will continue to be secure.</t>
<t>Abruptly forcing SHA-1 zones to be treated as insecure may encourage
their operators to leave them insecure, instead of encouraging them
to upgrade to a secure algorithm.</t>
</section>
</section>

<section anchor="iana-considerations" title="IANA considerations">
<t>This document has no IANA actions.</t>
</section>

</middle>

<back>
<references title="Normative References">
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4034.xml"?>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8624.xml"?>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
</references>
<references title="Informative References">
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8659.xml"?>
<reference anchor='NIST2006' target='https://csrc.nist.gov/News/2006/NIST-Comments-on-Cryptanalytic-Attacks-on-SHA-1'>
  <front>
    <title>NIST Comments on Cryptanalytic Attacks on SHA-1</title>
	<author><organization abbrev='NIST'>
	  National Institute of Standards and Technology
	</organization></author>
	<date year='2006'/>
  </front>
</reference>
<reference anchor='ROOT-DNSSEC' target='https://www.root-dnssec.org/'>
  <front>
    <title>Information about DNSSEC for the Root Zone</title>
	<author><organization abbrev="ICANN">
	  Internet Corporation For Assigned Names and Numbers
	</organization></author>
	<author><organization>VeriSign, Inc.</organization></author>
	<date year='2010'/>
  </front>
</reference>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6944.xml"?>
<reference anchor='SHA-mbles' target='https://sha-mbles.github.io/'>
  <front>
    <title>
	  SHA-1 is a Shambles:
	  First Chosen-Prefix Collision on SHA-1
	  and Application to the PGP Web of Trust
	</title>
	<author initials='G.' surname='Leurent' fullname='Gaëtan Leurent'/>
	<author initials='T.' surname='Peyrin' fullname='Thomas Peyrin'/>
	<date month='January' year='2020'/>
  </front>
</reference>
<reference anchor='ROGUE-CA' target='https://www.win.tue.nl/hashclash/rogue-ca/'>
  <front>
    <title>Creating a rogue CA certificate</title>
	<author initials='A.' surname='Sotirov' fullname='Alexander Sotirov'/>
	<author initials='M.' surname='Stevens' fullname='Marc Stevens'/>
	<author initials='J.' surname='Appelbaum' fullname='Jacob Appelbaum'/>
	<author initials='A.' surname='Lenstra' fullname='Arjen Lenstra'/>
	<author initials='D.' surname='Molnar' fullname='David Molnar'/>
	<author initials='D.' surname='Osvik' fullname='Dag Arne Osvik'/>
	<author initials='B.' surname='de Weger' fullname='Benne de Weger'/>
	<date month='December' year='2008'/>
  </front>
</reference>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7208.xml"?>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-dnsop-rfc2845bis.xml"?>
<reference anchor='SHAppening' target='https://sites.google.com/site/itstheshappening/'>
  <front>
    <title>Freestart collision for full SHA-1</title>
	<author initials='M.' surname='Stevens' fullname='Marc Stevens'/>
	<author initials='P.' surname='Karpman' fullname='Pierre Karpman'/>
	<author initials='T.' surname='Peyrin' fullname='Thomas Peyrin'/>
	<date month='October' year='2015'/>
  </front>
</reference>
<reference anchor='CABforum2016' target='https://cabforum.org/2016/03/31/ballot-164/'>
  <front>
    <title>Ballot 164 - Certificate Serial Number Entropy</title>
	<author><organization>CA/Browser Forum</organization></author>
	<date month='September' year='2016'/>
  </front>
</reference>
<reference anchor='CABforum2014' target='https://cabforum.org/2014/10/16/ballot-118-sha-1-sunset/'>
  <front>
    <title>Ballot 118 - SHA-1 Sunset</title>
	<author><organization>CA/Browser Forum</organization></author>
	<date month='October' year='2014'/>
  </front>
</reference>
<reference anchor='Cochran2007' target='https://eprint.iacr.org/2007/474'>
  <front>
    <title>Notes on the Wang et al. 2^63 SHA-1 Differential Path</title>
	<author initials='M.' surname='Cochran' fullname='Martin Cochran'/>
	<date year='2007'/>
  </front>
</reference>
<reference anchor='NIST-SP800-131A' target='https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-131a.pdf'>
  <front>
    <title>Recommendation for Transitioning the Use of CryptographicAlgorithms and Key Lengths</title>
	<author><organization abbrev='NIST'>
	  National Institute of Standards and Technology
	</organization></author>
	<date month='January' year='2011'/>
  </front>
</reference>
<reference anchor='DNSKEY-IANA' target='http://www.iana.org/assignments/dns-sec-alg-numbers'>
  <front>
    <title>Domain Name System Security (DNSSEC) Algorithm Numbers</title>
	<author><organization>IANA</organization></author>
    <date year='2017'/>
  </front>
</reference>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8555.xml"?>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6376.xml"?>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4255.xml"?>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5730.xml"?>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5155.xml"?>
<reference anchor='SHAttered' target='https://shattered.io/'>
  <front>
    <title>The first collision for full SHA-1</title>
	<author initials='M.' surname='Stevens' fullname='Marc Stevens'/>
	<author initials='E.' surname='Bursztein' fullname='Elie Bursztein'/>
	<author initials='P.' surname='Karpman' fullname='Pierre Karpman'/>
	<author initials='A.' surname='Albertini' fullname='Ange Albertini'/>
	<author initials='Y.' surname='Markov' fullname='Yarik Markov'/>
	<date month='February' year='2017'/>
  </front>
</reference>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7672.xml"?>
<reference anchor='Wang2005' target='https://link.springer.com/chapter/10.1007/11535218_2'>
  <front>
    <title>Finding Collisions in the Full SHA-1</title>
	<author initials='X.' surname='Wang' fullname='Xiaoyun Wang'/>
	<author initials='Y.' surname='Yin' fullname='Yiqun Lisa Yin'/>
	<author initials='H.' surname='Yu' fullname='Hongbo Yu'/>
    <date year='2005'/>
  </front>
</reference>
<?rfc include="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6594.xml"?>
</references>

<section anchor="acknowledgments" title="Acknowledgments">
<t>Thanks to Viktor Dukhovni for helpful discussions about the
implications of the SHA-1 chosen-prefix collision.</t>
</section>

<section anchor="timeline" title="Timeline">
<t>
<list style="symbols">
<t>2005: Theoretical 2^63 attack on SHA-1 <xref target="Wang2005"></xref> <xref target="Cochran2007"></xref></t>
</list>
</t>
<t>
<list style="symbols">
<t>2006: NIST starts to deprecate SHA-1 <xref target="NIST2006"></xref></t>
</list>
</t>
<t>
<list style="symbols">
<t>2010: DNS root zone signed with RSASHA256 <xref target="ROOT-DNSSEC"></xref></t>
</list>
</t>
<t>
<list style="symbols">
<t>2011: NIST formally deprecates SHA-1 for digital signatures, and
disallows it after 2013 <xref target="NIST-SP800-131A"></xref> (section 3)</t>
</list>
</t>
<t>
<list style="symbols">
<t>2013: IETF recommends RSASHA1 for use in DNSSEC <xref target="RFC6944"></xref></t>
<t>2014: CA/Browser forum sunsets SHA-1 in X.509 WebPKI certificates
after 2015 <xref target="CABforum2014"></xref></t>
</list>
</t>
<t>
<list style="symbols">
<t>2015: Free-start collision demonstrated in SHA-1 <xref target="SHAppening"></xref></t>
</list>
</t>
<t>
<list style="symbols">
<t>2017: Identical-prefix collision demonstrated in SHA-1 <xref target="SHAttered"></xref></t>
</list>
</t>
<t>
<list style="symbols">
<t>2019: IETF partially deprecates SHA-1 for use in DNSSEC <xref target="RFC8624"></xref></t>
<t>2020: Chosen-prefix collision demonstrated in SHA-1 <xref target="SHA-mbles"></xref></t>
</list>
</t>
</section>

</back>

</rfc>
