idnits 2.17.1 draft-ietf-dcrup-dkim-crypto-05.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 (August 6, 2017) is 2453 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 308 ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Downref: Normative reference to an Informational RFC: RFC 8032 Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 3 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) August 6, 2017 5 Intended status: Standards Track 6 Expires: February 7, 2018 8 New cryptographic signature methods for DKIM 9 draft-ietf-dcrup-dkim-crypto-05 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. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at http://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on February 7, 2018. 34 Copyright Notice 36 Copyright (c) 2017 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 2. Conventions Used in This Document . . . . . . . . . . . . . . 3 53 3. Public key fingerprints . . . . . . . . . . . . . . . . . . . 3 54 4. Ed25519-SHA256 Signing Algorithm . . . . . . . . . . . . . . 4 55 5. Signature and key syntax . . . . . . . . . . . . . . . . . . 4 56 5.1. Signature syntax . . . . . . . . . . . . . . . . . . . . 4 57 5.2. Key syntax . . . . . . . . . . . . . . . . . . . . . . . 4 58 6. Key and algorithm choice and strength . . . . . . . . . . . . 5 59 7. Transition Considerations . . . . . . . . . . . . . . . . . . 5 60 8. Security Considerations . . . . . . . . . . . . . . . . . . . 5 61 8.1. Duplicate Signature Key Selection . . . . . . . . . . . . 5 62 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 63 9.1. DKIM Signature Tag Registry . . . . . . . . . . . . . . . 6 64 9.2. DKIM Key Type registry . . . . . . . . . . . . . . . . . 6 65 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 66 10.1. Normative References . . . . . . . . . . . . . . . . . . 6 67 10.2. Informative References . . . . . . . . . . . . . . . . . 7 68 10.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 7 69 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 7 70 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7 72 1. Introduction 74 Discussion Venue: Discussion about this draft is directed to the 75 dcrup@ietf.org [1] mailing list. 77 DKIM [RFC6376] signs e-mail messages, by creating hashes of the 78 message headers and content and signing the header hash with a 79 digital signature. Message recipients fetch the signature 80 verification key from the DNS where it is stored in a TXT record. 81 The defining documents specify a single signing algorithm, RSA 82 [RFC3447], and recommends key sizes of 1024 to 2048 bits. While 1024 83 bit signatures are common, stronger signatures are not. Widely used 84 DNS configuration software places a practical limit on key sizes, 85 because the software only handles a single 256 octet string in a TXT 86 record, and RSA keys longer than 1156 bits don't fit in 256 octets. 88 This document adds a new stronger signing algorithm, Edwards-Curve 89 Digital Signature Algorithm using the Curve25519 curve (ed25519), 90 which has much shorter keys than RSA for similar levels of security. 91 It also adds a new key representation for RSA keys, with the key 92 itself in the signature and a key fingerprint that fits in a a 256 93 octet string in the DNS regardless of the key length. 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. Public key fingerprints 108 Rather than using a public key stored in the DNS, an RSA signature 109 can include the corresponding public key, with a verification 110 fingerprint in the DNS. For an RSA signature with a key fingerprint, 111 the Signing Algorithm is rsafp-sha256. The DNS record contains a 112 SHA-256 hash of the public key, stored in base64 in the p= tag. The 113 key type tag MUST be present and contains k=rsafp. 115 Note: since Ed25519 keys are 256 bits long, a SHA-256 hash of a key 116 is the same size as the key itself, so there would be no benefit to 117 storing ed25519 key fingerprints in the key record rather than the 118 keys themselves. 120 Section 5.5 of [RFC6376], on computing the message hash and 121 signature, is modified as follows: When creating a signature with a 122 signing algorithm that uses a key fingerprint, the signer includes 123 the public key in the signature as a base64 encoded string in the p= 124 tag. The key in the tag is the same one that would be published in a 125 non-fingerprint key record. 127 Section 3.7 of [RFC6376], on computing the message hashes, is not 128 modified. Since the key in the p= tag is known in advance, it 129 included in the signature in the same manner as all of the other 130 signature fields other than b=. 132 Section 6.1.3 of [RFC6376], to compute the verification, is modified 133 as follows: In item 4, if the signing algorithm uses a key 134 fingerprint, extract the verification key from the p= tag. If there 135 is no such tag, the signature does not validate. Extract the key 136 hash from the p= tag of the key record. If there is no such tag or 137 the tag is empty, the signature does not validate. Compute the 138 SHA-256 hash of the verification key, and compare it to the value of 139 the key hash. If they are not the same, the signature does not 140 validate. Otherwise proceed to verify the signature using the 141 validation key and the algorithm described in the "a=" tag. 143 4. Ed25519-SHA256 Signing Algorithm 145 The ed25519-sha256 signing algorithm computes a message hash as 146 defined in section 3 of [RFC6376], and signs it with the Pure variant 147 of Ed25519, as defined in in RFC 8032 section 5.1 [RFC8032]. The 148 signing algorithm is PureEdDSA, since the input to the signing 149 algorithm has already been hashed. The DNS record for the 150 verification public key MUST have a "k=ed25519" tag to indicate that 151 the key is an Ed25519 rather than RSA key. 153 The signature MAY contain a base64 copy of the public key in the p= 154 tag, to enable checks for a cryptograhphic attack described in the 155 Security section below. 157 5. Signature and key syntax 159 The syntax of DKIM signatures and DKIM keys are updated as follows. 161 5.1. Signature syntax 163 The syntax of DKIM algorithm tags in section 3.5 of [RFC6376] is 164 updated by adding this rule to the existing rule for sig-a-tag-k: 166 ABNF: 168 sig-a-tag-k =/ "rsafp" / "ed25519" 170 The following tag is added to the list of tags on the DKIM-Signature 171 header field in section 3.5 of [RFC6376]. 173 p= The public key (base64; REQUIRED). White space is ignored in 174 this value and MUST be ignored when reassembling the original 175 key. 177 ABNF: 179 sig-p-tag = %x70 [FWS] "=" [FWS] sig-p-tag-data 180 sig-p-tag-data = base64string 182 5.2. Key syntax 184 The syntax of DKIM key tags in section 3.6.1 of [RFC6376] is updated 185 by adding this rule to the existing rule for key-k-tag-type: 187 ABNF: 189 key-k-tag-type =/ "rsafp" / "ed25519" 191 6. Key and algorithm choice and strength 193 Section 3.3 of [RFC6376] describes DKIM's hash and signature 194 algorithms. It is updated as follows: 196 Signers SHOULD implement and verifiers MUST implement the rsafp- 197 sha256 and ed25519-sha256 algorithms. 199 Signers that use rsa-sha256 or rsafp-sha256 signatures MUST use keys 200 at least 1024 bits long and SHOULD use keys 2048 bits long. 201 Verifiers MUST NOT accept rsa-sha256 or rsafp-sha256 signatures with 202 keys less than 1024 bits long. 204 7. Transition Considerations 206 For backward compatibility, signers MAY add multiple signatures that 207 use old and new signing algorithms or key representations. Since 208 there can only be a single key record in the DNS for each selector, 209 the signatures will have to use different selectors, although they 210 can use the same d= and i= identifiers. 212 8. Security Considerations 214 Ed25519 and key fingerprints are widely used cryptographic 215 techniques, so the security of DKIM signatures using new signing 216 algorithms should be at least as good as those using old algorithms. 218 8.1. Duplicate Signature Key Selection 220 The rsafp signature scheme describes a method where the public key is 221 hashed. The primary motivation for this design is allowing for a 222 smaller key representation of larger public keys. Hashing has a 223 secondary effect: the public key is included in messages and is 224 signed. Including and signing the public key renders duplicate 225 signature key selection attacks [Koblitz13] infeasible. An attacker 226 cannot claim a message by constructing a key that would be valid for 227 a signed message because the public key is covered by the signature. 229 There is currently no known way that an attacker might use a 230 duplicate signature key selection attack to their advantage and so 231 defending against the attack is not mandated by this specification. 232 In the event that a potential attack becomes known, a signer could 233 include the public key in messages using the `p=` parameter. If the 234 `p=` parameter is present, a verifier MUST ensure that the parameter 235 contains the public key that it uses to verify the message signature. 237 9. IANA Considerations 239 IANA is requested to update registries as follows. 241 9.1. DKIM Signature Tag Registry 243 The following value is added to the DKIM Signature Tag Registry 245 +------+-----------------+--------+ 246 | TYPE | REFERENCE | STATUS | 247 +------+-----------------+--------+ 248 | p | (this document) | active | 249 +------+-----------------+--------+ 251 Table 1: DKIM Signature Tag Registry Added Value 253 9.2. DKIM Key Type registry 255 The following values are added to the DKIM Key Type Registry 257 +---------+-----------+--------+ 258 | TYPE | REFERENCE | STATUS | 259 +---------+-----------+--------+ 260 | rsafp | [RFC3447] | active | 261 | ed25519 | [RFC8032] | active | 262 +---------+-----------+--------+ 264 Table 2: DKIM Key Type Registry Added Values 266 10. References 268 10.1. Normative References 270 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 271 Requirement Levels", BCP 14, RFC 2119, 272 DOI 10.17487/RFC2119, March 1997, 273 . 275 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 276 Standards (PKCS) #1: RSA Cryptography Specifications 277 Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February 278 2003, . 280 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 281 Specifications: ABNF", STD 68, RFC 5234, 282 DOI 10.17487/RFC5234, January 2008, 283 . 285 [RFC6376] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 286 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 287 RFC 6376, DOI 10.17487/RFC6376, September 2011, 288 . 290 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 291 Signature Algorithm (EdDSA)", RFC 8032, 292 DOI 10.17487/RFC8032, January 2017, 293 . 295 10.2. Informative References 297 [Koblitz13] 298 Koblitz, N. and A. Menezes, "Another look at security 299 definitions", DOI 10.3934/amc.2013.7.1, 2013, 300 . 303 Advances in Mathematics of Communications, Vol 7, Num 1, 304 pp. 1-38. 306 10.3. URIs 308 [1] mailto:dcrup@ietf.org 310 Appendix A. Change log 312 04 to 05: Remove deprecation cruft and inconsistent key advice. Fix 313 p= and k= text. 315 03 to 04: Change eddsa to ed25519. Add Martin's key regeneration 316 issue. Remove hashed ed25519 keys. Fix typos and clarify text. 317 Move syntax updates to separate section. Take out SHA-1 stuff. 319 01 to 02: Clarify EdDSA algorithm is ed25519 with Pure version of 320 the signing. Make references to tags and fields consistent. 322 Author's Address 324 John Levine 325 Taughannock Networks 326 PO Box 727 327 Trumansburg, NY 14886 329 Phone: +1 831 480 2300 330 Email: standards@taugh.com