7Internet Engineering Task Force (IETF)                      S. Kitterman
 
8Request for Comments: 8301                  Kitterman Technical Services
 
9Updates: 6376                                               January 2018
 
10Category: Standards Track
 
14            Cryptographic Algorithm and Key Usage Update to
 
15                   DomainKeys Identified Mail (DKIM)
 
19   The cryptographic algorithm and key size requirements included when
 
20   DomainKeys Identified Mail (DKIM) was designed a decade ago are
 
21   functionally obsolete and in need of immediate revision.  This
 
22   document updates DKIM requirements to those minimally suitable for
 
23   operation with currently specified algorithms.
 
27   This is an Internet Standards Track document.
 
29   This document is a product of the Internet Engineering Task Force
 
30   (IETF).  It represents the consensus of the IETF community.  It has
 
31   received public review and has been approved for publication by the
 
32   Internet Engineering Steering Group (IESG).  Further information on
 
33   Internet Standards is available in Section 2 of RFC 7841.
 
35   Information about the current status of this document, any errata,
 
36   and how to provide feedback on it may be obtained at
 
37   https://www.rfc-editor.org/info/rfc8301.
 
41   Copyright (c) 2018 IETF Trust and the persons identified as the
 
42   document authors.  All rights reserved.
 
44   This document is subject to BCP 78 and the IETF Trust's Legal
 
45   Provisions Relating to IETF Documents
 
46   (https://trustee.ietf.org/license-info) in effect on the date of
 
47   publication of this document.  Please review these documents
 
48   carefully, as they describe your rights and restrictions with respect
 
49   to this document.  Code Components extracted from this document must
 
50   include Simplified BSD License text as described in Section 4.e of
 
51   the Trust Legal Provisions and are provided without warranty as
 
52   described in the Simplified BSD License.
 
58Kitterman                    Standards Track                    [Page 1]
 
60RFC 8301                DKIM Crypto Usage Update            January 2018
 
65   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
 
66   2.  Conventions Used in This Document . . . . . . . . . . . . . .   2
 
67   3.  Updates to DKIM Signing and Verification Requirements . . . .   3
 
68     3.1.  Signing and Verification Algorithms . . . . . . . . . . .   3
 
69     3.2.  Key Sizes . . . . . . . . . . . . . . . . . . . . . . . .   3
 
70   4.  Security Considerations . . . . . . . . . . . . . . . . . . .   3
 
71   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
 
72   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   4
 
73     6.1.  Normative References  . . . . . . . . . . . . . . . . . .   4
 
74     6.2.  Informative References  . . . . . . . . . . . . . . . . .   4
 
75   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   5
 
76   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   5
 
80   DKIM [RFC6376] signs email messages by creating hashes of the message
 
81   headers and content and signing the header hash with a digital
 
82   signature.  Message recipients fetch the signature verification key
 
83   from the DNS where it is stored in a TXT record.
 
85   The defining documents, RFC 6376 [RFC6376] and its predecessors,
 
86   specify a single signing algorithm, RSA [RFC8017], and recommend key
 
87   sizes of 1024 to 2048 bits (but require verification of 512-bit
 
88   keys).  As discussed in US-CERT Vulnerability Note VU#268267
 
89   [VULNOTE], the operational community has recognized that shorter keys
 
90   compromise the effectiveness of DKIM.  While 1024-bit signatures are
 
91   common, stronger signatures are not.  Widely used DNS configuration
 
92   software places a practical limit on key sizes, because the software
 
93   only handles a single 256-octet string in a TXT record, and RSA keys
 
94   significantly longer than 1024 bits don't fit in 256 octets.
 
96   Due to the recognized weakness of the SHA-1 hash algorithm (see
 
97   [RFC6194]) and the wide availability of the SHA-256 hash algorithm
 
98   (it has been a required part of DKIM [RFC6376] since it was
 
99   originally standardized in 2007), the SHA-1 hash algorithm MUST NOT
 
100   be used.  This is being done now to allow the operational community
 
101   time to fully shift to SHA-256 in advance of any SHA-1-related
 
1042.  Conventions Used in This Document
 
106   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
 
107   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
 
108   "OPTIONAL" in this document are to be interpreted as described in
 
109   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
 
110   capitals, as shown here.
 
114Kitterman                    Standards Track                    [Page 2]
 
116RFC 8301                DKIM Crypto Usage Update            January 2018
 
1193.  Updates to DKIM Signing and Verification Requirements
 
121   This document updates [RFC6376] as follows:
 
123   o  Section 3.1 of this document updates Section 3.3 of [RFC6376].
 
125   o  Section 3.2 of this document updates Section 3.3.3 of [RFC6376].
 
127   o  The algorithm described in Section 3.3.1 of [RFC6376] is now
 
128      historic and no longer used by DKIM.
 
130   Sections 3.3.2 and 3.3.4 of [RFC6376] are not affected.
 
1323.1.  Signing and Verification Algorithms
 
134   DKIM supports multiple digital signature algorithms.  Two algorithms
 
135   are defined by this specification at this time: rsa-sha1 and
 
136   rsa-sha256.  Signers MUST sign using rsa-sha256.  Verifiers MUST be
 
137   able to verify using rsa-sha256.  rsa-sha1 MUST NOT be used for
 
138   signing or verifying.
 
140   DKIM signatures identified as having been signed with historic
 
141   algorithms (currently, rsa-sha1) have permanently failed evaluation
 
142   as discussed in Section 3.9 of [RFC6376].
 
146   Selecting appropriate key sizes is a trade-off between cost,
 
147   performance, and risk.  Since short RSA keys more easily succumb to
 
148   off-line attacks, Signers MUST use RSA keys of at least 1024 bits for
 
149   all keys.  Signers SHOULD use RSA keys of at least 2048 bits.
 
150   Verifiers MUST be able to validate signatures with keys ranging from
 
151   1024 bits to 4096 bits, and they MAY be able to validate signatures
 
152   with larger keys.  Verifier policies can use the length of the
 
153   signing key as one metric for determining whether a signature is
 
154   acceptable.  Verifiers MUST NOT consider signatures using RSA keys of
 
155   less than 1024 bits as valid signatures.
 
158   with less than 1024 bits) have permanently failed evaluation as
 
159   discussed in Section 3.9 of [RFC6376].
 
1614.  Security Considerations
 
163   This document does not change the Security Considerations of
 
164   [RFC6376].  It reduces the risk of signature compromise due to weak
 
165   cryptography.  The SHA-1 risks discussed in Section 3 of [RFC6194]
 
166   are resolved due to rsa-sha1 no longer being used by DKIM.
 
170Kitterman                    Standards Track                    [Page 3]
 
172RFC 8301                DKIM Crypto Usage Update            January 2018
 
1755.  IANA Considerations
 
177   IANA has updated the Reference and Status fields of the "sha1"
 
178   registration in the "DKIM Hash Algorithms" registry.  The
 
179   registration now appears as follows:
 
181                 +------+---------------------+----------+
 
182                 | Type | Reference           | Status   |
 
183                 +------+---------------------+----------+
 
184                 | sha1 | [RFC6376] [RFC8301] | historic |
 
185                 +------+---------------------+----------+
 
1896.1.  Normative References
 
191   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
 
192              Requirement Levels", BCP 14, RFC 2119,
 
193              DOI 10.17487/RFC2119, March 1997,
 
194              <https://www.rfc-editor.org/info/rfc2119>.
 
196   [RFC6376]  Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed.,
 
197              "DomainKeys Identified Mail (DKIM) Signatures", STD 76,
 
198              RFC 6376, DOI 10.17487/RFC6376, September 2011,
 
199              <https://www.rfc-editor.org/info/rfc6376>.
 
201   [RFC8017]  Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch,
 
202              "PKCS #1: RSA Cryptography Specifications Version 2.2",
 
203              RFC 8017, DOI 10.17487/RFC8017, November 2016,
 
204              <https://www.rfc-editor.org/info/rfc8017>.
 
206   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
 
207              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
 
208              May 2017, <https://www.rfc-editor.org/info/rfc8174>.
 
2106.2.  Informative References
 
212   [RFC6194]  Polk, T., Chen, L., Turner, S., and P. Hoffman, "Security
 
213              Considerations for the SHA-0 and SHA-1 Message-Digest
 
214              Algorithms", RFC 6194, DOI 10.17487/RFC6194, March 2011,
 
215              <https://www.rfc-editor.org/info/rfc6194>.
 
217   [VULNOTE]  US-CERT, "Vulnerability Note VU#268267: DomainKeys
 
218              Identified Mail (DKIM) Verifiers may inappropriately
 
219              convey message trust", October 2012,
 
220              <http://www.kb.cert.org/vuls/id/268267>.
 
226Kitterman                    Standards Track                    [Page 4]
 
228RFC 8301                DKIM Crypto Usage Update            January 2018
 
233   The author wishes to acknowledge the following individuals for their
 
234   review and comments on this proposal: Kurt Andersen, Murray
 
235   S. Kucherawy, Martin Thomson, John Levine, Russ Housley, and Jim
 
238   Thanks to John Levine for his DKIM Crypto Update (DCRUP) work that
 
239   was the source for much of the introductory material in this
 
245   Kitterman Technical Services
 
247   Ellicott City, MD  21042
 
248   United States of America
 
250   Phone: +1 301 325-5475
 
251   Email: scott@kitterman.com
 
282Kitterman                    Standards Track                    [Page 5]