idnits 2.17.1 draft-ietf-dcrup-dkim-crypto-02.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 (June 20, 2017) is 2502 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 273 == Missing Reference: 'FIPS-180-3-2008' is mentioned on line 224, but not defined ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Downref: Normative reference to an Informational RFC: RFC 8032 Summary: 2 errors (**), 0 flaws (~~), 3 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) June 20, 2017 5 Intended status: Standards Track 6 Expires: December 22, 2017 8 Cryptographic Update to DKIM 9 draft-ietf-dcrup-dkim-crypto-02 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 December 22, 2017. 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 . . . . . . . . . . . . . . 2 54 3. EdDSA-SHA256 Signing Algorithm . . . . . . . . . . . . . . . 3 55 4. Public key fingerprints . . . . . . . . . . . . . . . . . . . 3 56 5. Key and algorithm choice and strength . . . . . . . . . . . . 4 57 6. Transition Considerations . . . . . . . . . . . . . . . . . . 4 58 7. Security Considerations . . . . . . . . . . . . . . . . . . . 5 59 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 60 8.1. DKIM Signature Tag Registry . . . . . . . . . . . . . . . 5 61 8.2. DKIM Hash Algorithms Registry . . . . . . . . . . . . . . 5 62 8.3. DKIM Key Type registry . . . . . . . . . . . . . . . . . 5 63 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 64 9.1. Normative References . . . . . . . . . . . . . . . . . . 6 65 9.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 6 66 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 6 67 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7 69 1. Introduction 71 Discussion Venue: Discussion about this draft is directed to the 72 dcrup@ietf.org [1] mailing list. 74 DKIM [RFC6376] signs e-mail messages, by creating hashes of the 75 message headers and content and signing the header hash with a 76 digital signature. Message recipients fetch the signature 77 verification key from the DNS where it is stored in a TXT record. 78 The defining documents specify a single signing algorithm, RSA 79 [RFC3447], and recommends key sizes of 1024 to 2048 bits. While 1024 80 bit signatures are common, stronger signatures are not. Widely used 81 DNS configuration software places a practical limit on key sizes, 82 because the software only handles a single 256 octet string in a TXT 83 record, and RSA keys longer than 1156 bits don't fit in 256 octets. 85 This document adds a new signing algorithm, Edwards-Curve Digital 86 Signature Algorithm (EdDSA), which has much shorter keys than RSA for 87 similar levels of security. It also adds a new key representation, 88 with the key itself in the signature and a shorter key fingerprint in 89 the DNS. 91 2. Conventions Used in This Document 93 The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", 94 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 95 "OPTIONAL" in this document are to be interpreted as described in 96 [RFC2119]. 98 Syntax descriptions use Augmented BNF (ABNF) [RFC5234]. The ABNF 99 tokens sig-a-tag-k, key-k-tag-type, and base64string are imported 100 from [RFC6376]. 102 3. EdDSA-SHA256 Signing Algorithm 104 The eddsa-sha256 signing algorithm computes a message hash as defined 105 in section 3 of [RFC6376], and signs it with Ed25519, the EdDSA 106 algorithm using the edwards25519 curve, as defined in in RFC 8032 107 section 5.1 [RFC8032]. The signing algorithm is PureEdDSA as defined 108 in RFC 8032 section 4, since the input to the signing algorithm has 109 already been hashed. The DNS record for the verification public key 110 MUST have a "k=eddsa" or "k=eddsafp" tag to indicate that the key is 111 an EdDSA rather than RSA key. 113 The syntax of DKIM signature tags is updated as follows, where this 114 rule replaces the existing rule for sig-a-tag-k: 116 ABNF: 118 sig-a-tag-k = "rsa" / "rsafp" / "eddsa" / "eddsafp" 119 / x-sig-a-tag-k 121 The syntax of DKIM key tags is updated as follows, where this rule 122 replaces the existing rule for key-k-tag-type: 124 ABNF: 126 key-k-tag-type = "rsa" / "rsafp" / "eddsa" / "eddsafp" 127 / x-key-k-tag-type 129 4. Public key fingerprints 131 Rather than using a public key stored in the DNS, a signature MAY 132 include the corresponding public key, with a fingerprint in the DNS. 133 For an RSA signature, the Signing Algorithm is rsafp-sha256, or for 134 an EdDSA signature the Signing Algorithm is eddsafp-sha256. The DNS 135 record contains a SHA-256 hash of the public key, stored in base64 in 136 the p= tag. The key type tag MUST be present and contains k=rsafp or 137 k=eddsafp. 139 k= The public key (base64; REQUIRED). White space is ignored in 140 this value and MUST be ignored when reassembling the original 141 key. 143 ABNF: 145 sig-k-tag = %x6b [FWS] "=" [FWS] sig-k-tag-data 146 sig-k-tag-data = base64string 148 Section 5.5 of [RFC6376], on computing the message hash and 149 signature, is modified as follows: When creating a signature with a 150 signing algorithm that uses a key fingerprint, the signer includes 151 the public key in the signature as a base64 encoded string with a k= 152 tag. The key in the tag is the same one that would be published in a 153 non-fingerprint key record. 155 Section 3.7 of [RFC6376], on computing the message hashes, is not 156 modified. Since the key in the k= tag is known in advance, it 157 included in the signature in the same manner as all of the other 158 signature fields other than b=. 160 Section 6.1.3 of [RFC6376], to compute the verification, is modified 161 as follows: In item 4, if the signing algorithm uses a key 162 fingerprint, extract the verification key from the k= tag. If there 163 is no such tag, the signature does not validate. Extract the key 164 hash from the p= tag of the key record. If there is no such tag or 165 the tag is empty, the signature does not validate. Compute the 166 SHA-256 hash of the verification key, and compare it to the value of 167 the key hash. If they are not the same, the signature does not 168 validate. Otherwise proceed to verify the signature using the 169 validation key and the algorithm described in the "a=" tag. 171 5. Key and algorithm choice and strength 173 Section 3.3 of [RFC6376] describes DKIM's hash and signature 174 algorithms. It is updated as follows: 176 Signers MUST NOT implement and verifiers SHOULD NOT implement the 177 rsa-sha1 algorithm. Signers SHOULD implement and verifiers MUST 178 implement the rsafp-256, eddsa-sha256, and eddsafp-sha256 algorithms. 180 Signers that use rsa-sha256 signatures MUST use keys at least 1024 181 bits long and SHOULD use keys 2048 bits long. Verifiers MUST NOT 182 accept rsa-sha256 signatures with keys less than 1024 bits long. 184 6. Transition Considerations 186 For backward compatibility, signers MAY add multiple signatures that 187 use old and new signing algorithms or key representations. Since 188 there can only be a single key record in the DNS for each selector, 189 the signatures will have to use different selectors, although they 190 can use the same d= and i= identifiers. 192 7. Security Considerations 194 EdDSA and key fingerprints are widely used cryptographic techniques, 195 so the security of DKIM signatures using new signing algorithms 196 should be at least as good as those using old algorithms. Since key 197 fingerprints make it possible to publish verification records for RSA 198 keys of any length, rsafp signatures SHOULD use key lengths of 1536 199 or 2048 bits. 201 8. IANA Considerations 203 IANA is requested to update registries as follows. 205 8.1. DKIM Signature Tag Registry 207 The following value is added to the DKIM Signature Tag Registry 209 +------+-----------------+--------+ 210 | TYPE | REFERENCE | STATUS | 211 +------+-----------------+--------+ 212 | k | (this document) | active | 213 +------+-----------------+--------+ 215 Table 1: DKIM Signature Tag Registry Added Value 217 8.2. DKIM Hash Algorithms Registry 219 The following value is updated in the DKIM Hash Algorithms Registry 221 +------+-------------------+----------+ 222 | TYPE | REFERENCE | STATUS | 223 +------+-------------------+----------+ 224 | sha1 | [FIPS-180-3-2008] | historic | 225 +------+-------------------+----------+ 227 Table 2: DKIM Hash Algorithms Registry Updated Value 229 8.3. DKIM Key Type registry 231 The following values are added to the DKIM Key Type Registry 232 +---------+-----------+--------+ 233 | TYPE | REFERENCE | STATUS | 234 +---------+-----------+--------+ 235 | rsafp | [RFC3447] | active | 236 | eddsa | [RFC8032] | active | 237 | eddsafp | [RFC8032] | active | 238 +---------+-----------+--------+ 240 Table 3: DKIM Key Type Registry Added Values 242 9. References 244 9.1. Normative References 246 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 247 Requirement Levels", BCP 14, RFC 2119, 248 DOI 10.17487/RFC2119, March 1997, 249 . 251 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 252 Standards (PKCS) #1: RSA Cryptography Specifications 253 Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February 254 2003, . 256 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 257 Specifications: ABNF", STD 68, RFC 5234, 258 DOI 10.17487/RFC5234, January 2008, 259 . 261 [RFC6376] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 262 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 263 RFC 6376, DOI 10.17487/RFC6376, September 2011, 264 . 266 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 267 Signature Algorithm (EdDSA)", RFC 8032, 268 DOI 10.17487/RFC8032, January 2017, 269 . 271 9.2. URIs 273 [1] mailto:dcrup@ietf.org 275 Appendix A. Change log 277 01 to 02: Clarify EdDSA algorithm is ed25519 with Pure version of 278 the signing. Make references to tags and fields consistent. 280 Author's Address 282 John Levine 283 Taughannock Networks 284 PO Box 727 285 Trumansburg, NY 14886 287 Phone: +1 831 480 2300 288 Email: standards@taugh.com