idnits 2.17.1 draft-ietf-dcrup-dkim-crypto-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC6376, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (July 1, 2017) is 2484 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 307 == Missing Reference: 'FIPS-180-3-2008' is mentioned on line 251, but not defined ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Downref: Normative reference to an Informational RFC: RFC 8032 -- Obsolete informational reference (is this intentional?): RFC 4871 (Obsoleted by RFC 6376) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Levine 3 Internet-Draft Taughannock Networks 4 Updates: 6376 (if approved) July 1, 2017 5 Intended status: Standards Track 6 Expires: January 2, 2018 8 Cryptographic Update to DKIM 9 draft-ietf-dcrup-dkim-crypto-03 11 Abstract 13 DKIM was designed to allow new cryptographic algorithms to be added. 14 This document adds a new signing algorithm and a new way to represent 15 signature validation keys, and deprecates an obsolete signing 16 algorithm. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on January 2, 2018. 35 Copyright Notice 37 Copyright (c) 2017 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 2. Conventions Used in This Document . . . . . . . . . . . . . . 3 54 3. EdDSA-SHA256 Signing Algorithm . . . . . . . . . . . . . . . 3 55 4. Public key fingerprints . . . . . . . . . . . . . . . . . . . 3 56 5. Signature and key syntax . . . . . . . . . . . . . . . . . . 4 57 5.1. Signature syntax . . . . . . . . . . . . . . . . . . . . 4 58 5.2. Key syntax . . . . . . . . . . . . . . . . . . . . . . . 4 59 6. Key and algorithm choice and strength . . . . . . . . . . . . 5 60 7. Transition Considerations . . . . . . . . . . . . . . . . . . 5 61 8. Security Considerations . . . . . . . . . . . . . . . . . . . 5 62 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 63 9.1. DKIM Signature Tag Registry . . . . . . . . . . . . . . . 5 64 9.2. DKIM Hash Algorithms Registry . . . . . . . . . . . . . . 6 65 9.3. DKIM Key Type registry . . . . . . . . . . . . . . . . . 6 66 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 10.1. Normative References . . . . . . . . . . . . . . . . . . 6 68 10.2. Informative References . . . . . . . . . . . . . . . . . 7 69 10.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 7 70 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 7 71 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7 73 1. Introduction 75 Discussion Venue: Discussion about this draft is directed to the 76 dcrup@ietf.org [1] mailing list. 78 DKIM [RFC6376] signs e-mail messages, by creating hashes of the 79 message headers and content and signing the header hash with a 80 digital signature. Message recipients fetch the signature 81 verification key from the DNS where it is stored in a TXT record. 82 The defining documents specify a single signing algorithm, RSA 83 [RFC3447], and recommends key sizes of 1024 to 2048 bits. While 1024 84 bit signatures are common, stronger signatures are not. Widely used 85 DNS configuration software places a practical limit on key sizes, 86 because the software only handles a single 256 octet string in a TXT 87 record, and RSA keys longer than 1156 bits don't fit in 256 octets. 89 This document adds a new signing algorithm, Edwards-Curve Digital 90 Signature Algorithm (EdDSA), which has much shorter keys than RSA for 91 similar levels of security. It also adds a new key representation 92 for RSA keys, with the key itself in the signature and a shorter key 93 fingerprint that fits in 256 octets in the DNS. 95 2. Conventions Used in This Document 97 The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", 98 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 99 "OPTIONAL" in this document are to be interpreted as described in 100 [RFC2119]. 102 Syntax descriptions use Augmented BNF (ABNF) [RFC5234]. The ABNF 103 tokens sig-a-tag-k, key-k-tag-type, and base64string are imported 104 from [RFC6376]. 106 3. EdDSA-SHA256 Signing Algorithm 108 The eddsa-sha256 signing algorithm computes a message hash as defined 109 in section 3 of [RFC6376], and signs it with Ed25519, the EdDSA 110 algorithm using the edwards25519 curve, as defined in in RFC 8032 111 section 5.1 [RFC8032]. The signing algorithm is PureEdDSA as defined 112 in RFC 8032 section 4, since the input to the signing algorithm has 113 already been hashed. The DNS record for the verification public key 114 MUST have a "k=eddsa" tag to indicate that the key is an EdDSA rather 115 than RSA key. 117 4. Public key fingerprints 119 Rather than using a public key stored in the DNS, an RSA signature 120 MAY include the corresponding public key, with a verification 121 fingerprint in the DNS. For an RSA signature with a key fingerprint, 122 the Signing Algorithm is rsafp-sha256. The DNS record contains a 123 SHA-256 hash of the public key, stored in base64 in the p= tag. The 124 key type tag MUST be present and contains k=rsafp. 126 Note: since Ed25516 keys are 256 bits long, a SHA-256 hash of a key 127 is the same size as the key itself, so there would be no benefit to 128 storing eddsa key fingerprints in the key record rather than the keys 129 themselves. 131 Section 5.5 of [RFC6376], on computing the message hash and 132 signature, is modified as follows: When creating a signature with a 133 signing algorithm that uses a key fingerprint, the signer includes 134 the public key in the signature as a base64 encoded string with a k= 135 tag. The key in the tag is the same one that would be published in a 136 non-fingerprint key record. 138 Section 3.7 of [RFC6376], on computing the message hashes, is not 139 modified. Since the key in the k= tag is known in advance, it 140 included in the signature in the same manner as all of the other 141 signature fields other than b=. 143 Section 6.1.3 of [RFC6376], to compute the verification, is modified 144 as follows: In item 4, if the signing algorithm uses a key 145 fingerprint, extract the verification key from the k= tag. If there 146 is no such tag, the signature does not validate. Extract the key 147 hash from the p= tag of the key record. If there is no such tag or 148 the tag is empty, the signature does not validate. Compute the 149 SHA-256 hash of the verification key, and compare it to the value of 150 the key hash. If they are not the same, the signature does not 151 validate. Otherwise proceed to verify the signature using the 152 validation key and the algorithm described in the "a=" tag. 154 5. Signature and key syntax 156 The syntax of DKIM signatures and DKIM keys are updated as follows. 158 5.1. Signature syntax 160 The syntax of DKIM algorithm tags in section 3.5 of [RFC6376] s 161 updated as follows, where this rule replaces the existing rule for 162 sig-a-tag-k: 164 ABNF: 166 sig-a-tag-k = "rsa" / "rsafp" / "eddsa" 167 / x-sig-a-tag-k 169 The following tag is added to the list of tags on the DKIM-Signature 170 header field in section 3.5 of [RFC6376]. 172 k= The public key (base64; REQUIRED). White space is ignored in 173 this value and MUST be ignored when reassembling the original 174 key. 176 ABNF: 178 sig-k-tag = %x6b [FWS] "=" [FWS] sig-k-tag-data 179 sig-k-tag-data = base64string 181 5.2. Key syntax 183 The syntax of DKIM key tags in section 3.6.1 of [RFC6376] is updated 184 as follows, where this rule replaces the existing rule for key-k-tag- 185 type: 187 ABNF: 189 key-k-tag-type = "rsa" / "rsafp" / "eddsa" 190 / x-key-k-tag-type 192 6. Key and algorithm choice and strength 194 Section 3.3 of [RFC6376] describes DKIM's hash and signature 195 algorithms. It is updated as follows: 197 Signers MUST NOT implement and verifiers SHOULD NOT implement the 198 rsa-sha1 algorithm. Signers SHOULD implement and verifiers MUST 199 implement the rsafp-sha256 and eddsa-sha256 algorithms. 201 Signers that use rsa-sha256 or rsafp-sha256 signatures MUST use keys 202 at least 1024 bits long and SHOULD use keys 2048 bits long. 203 Verifiers SHOULD NOT accept rsa-sha256 or rsafp-sha256 signatures 204 with keys less than 1024 bits long. 206 7. Transition Considerations 208 For backward compatibility, signers MAY add multiple signatures that 209 use old and new signing algorithms or key representations. Since 210 there can only be a single key record in the DNS for each selector, 211 the signatures will have to use different selectors, although they 212 can use the same d= and i= identifiers. 214 8. Security Considerations 216 EdDSA and key fingerprints are widely used cryptographic techniques, 217 so the security of DKIM signatures using new signing algorithms 218 should be at least as good as those using old algorithms. Since key 219 fingerprints make it possible to publish verification records for RSA 220 keys of any length, rsafp signatures SHOULD use key lengths of 1536 221 or 2048 bits. 223 DKIM signatures that use SHA-1 hashes have been deprecated since 224 [RFC4871] in 2007, and this document finally removes them from DKIM. 225 Since SHA-1 is known to be significantly weaker than SHA-256 and 226 there is at least one known practical SHA-1 hash collision, switching 227 all DKIM signatures to SHA-256 should improve DKIM's security 229 9. IANA Considerations 231 IANA is requested to update registries as follows. 233 9.1. DKIM Signature Tag Registry 235 The following value is added to the DKIM Signature Tag Registry 236 +------+-----------------+--------+ 237 | TYPE | REFERENCE | STATUS | 238 +------+-----------------+--------+ 239 | k | (this document) | active | 240 +------+-----------------+--------+ 242 Table 1: DKIM Signature Tag Registry Added Value 244 9.2. DKIM Hash Algorithms Registry 246 The following value is updated in the DKIM Hash Algorithms Registry 248 +------+-------------------+----------+ 249 | TYPE | REFERENCE | STATUS | 250 +------+-------------------+----------+ 251 | sha1 | [FIPS-180-3-2008] | historic | 252 +------+-------------------+----------+ 254 Table 2: DKIM Hash Algorithms Registry Updated Value 256 9.3. DKIM Key Type registry 258 The following values are added to the DKIM Key Type Registry 260 +-------+-----------+--------+ 261 | TYPE | REFERENCE | STATUS | 262 +-------+-----------+--------+ 263 | rsafp | [RFC3447] | active | 264 | eddsa | [RFC8032] | active | 265 +-------+-----------+--------+ 267 Table 3: DKIM Key Type Registry Added Values 269 10. References 271 10.1. Normative References 273 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 274 Requirement Levels", BCP 14, RFC 2119, 275 DOI 10.17487/RFC2119, March 1997, 276 . 278 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 279 Standards (PKCS) #1: RSA Cryptography Specifications 280 Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February 281 2003, . 283 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 284 Specifications: ABNF", STD 68, RFC 5234, 285 DOI 10.17487/RFC5234, January 2008, 286 . 288 [RFC6376] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 289 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 290 RFC 6376, DOI 10.17487/RFC6376, September 2011, 291 . 293 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 294 Signature Algorithm (EdDSA)", RFC 8032, 295 DOI 10.17487/RFC8032, January 2017, 296 . 298 10.2. Informative References 300 [RFC4871] Allman, E., Callas, J., Delany, M., Libbey, M., Fenton, 301 J., and M. Thomas, "DomainKeys Identified Mail (DKIM) 302 Signatures", RFC 4871, DOI 10.17487/RFC4871, May 2007, 303 . 305 10.3. URIs 307 [1] mailto:dcrup@ietf.org 309 Appendix A. Change log 311 02 to 03: Remove hashed eddsa keys. Fix typos and clarify text. 312 Move syntax updates to separate section. Say something insecure 313 about SHA-1. 315 01 to 02: Clarify EdDSA algorithm is ed25519 with Pure version of 316 the signing. Make references to tags and fields consistent. 318 Author's Address 320 John Levine 321 Taughannock Networks 322 PO Box 727 323 Trumansburg, NY 14886 325 Phone: +1 831 480 2300 326 Email: standards@taugh.com