idnits 2.17.1 draft-ietf-dcrup-dkim-crypto-14.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 abstract seems to contain references ([RFC6376]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. -- The draft header indicates that this document updates RFC6376, but the abstract doesn't seem to directly say this. It does mention RFC6376 though, so this could be OK. 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 -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (June 21, 2018) is 2129 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 229 -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS-180-4-2015' ** Downref: Normative reference to an Informational RFC: RFC 8032 -- Obsolete informational reference (is this intentional?): RFC 3447 (Obsoleted by RFC 8017) Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 5 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 21, 2018 5 Intended status: Standards Track 6 Expires: December 23, 2018 8 A new cryptographic signature method for DKIM 9 draft-ietf-dcrup-dkim-crypto-14 11 Abstract 13 This document adds a new signing algorithm,ed25519-sha256, to DKIM 14 [RFC6376]. DKIM verifiers are required to implement this algorithm. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at https://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on December 23, 2018. 33 Copyright Notice 35 Copyright (c) 2018 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (https://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 2. Conventions Used in This Document . . . . . . . . . . . . . . 2 52 3. Ed25519-SHA256 Signing Algorithm . . . . . . . . . . . . . . 3 53 4. Signature and key syntax . . . . . . . . . . . . . . . . . . 3 54 4.1. Signature syntax . . . . . . . . . . . . . . . . . . . . 3 55 4.2. Key syntax . . . . . . . . . . . . . . . . . . . . . . . 3 56 5. Key and algorithm choice and strength . . . . . . . . . . . . 4 57 6. Transition Considerations . . . . . . . . . . . . . . . . . . 4 58 7. Security Considerations . . . . . . . . . . . . . . . . . . . 4 59 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 60 8.1. DKIM Key Type registry . . . . . . . . . . . . . . . . . 4 61 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 62 9.1. Normative References . . . . . . . . . . . . . . . . . . 5 63 9.2. Informative References . . . . . . . . . . . . . . . . . 5 64 9.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 5 65 Appendix A. Example of a signed message . . . . . . . . . . . . 6 66 A.1. Secret keys . . . . . . . . . . . . . . . . . . . . . . . 6 67 A.2. Public key DNS records . . . . . . . . . . . . . . . . . 6 68 A.3. Signed Message . . . . . . . . . . . . . . . . . . . . . 7 69 Appendix B. Change log . . . . . . . . . . . . . . . . . . . . . 7 70 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 8 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 body and signing the header hash with a digital 79 signature. Message recipients fetch the signature verification key 80 from the DNS. The defining documents specify a single signing 81 algorithm, RSA [RFC3447]. 83 This document adds a new stronger signing algorithm, Edwards-Curve 84 Digital Signature Algorithm using the Curve25519 curve (ed25519), 85 which has much shorter keys than RSA for similar levels of security. 87 2. Conventions Used in This Document 89 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 90 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 91 "OPTIONAL" in this document are to be interpreted as described in BCP 92 14 [RFC2119] [RFC8174], and only when, they appear in all capitals, 93 as shown here. 95 Syntax descriptions use Augmented BNF (ABNF) [RFC5234]. The ABNF 96 tokens sig-a-tag-k and key-k-tag-type are imported from [RFC6376]. 98 3. Ed25519-SHA256 Signing Algorithm 100 The ed25519-sha256 signing algorithm computes a message hash as 101 defined in section 3 of [RFC6376] using SHA-256 [FIPS-180-4-2015] as 102 the hash-alg, and signs it with the PureEdDSA variant Ed25519, as 103 defined in in RFC 8032 section 5.1 [RFC8032]. Example keys and 104 signatures in Appendix A below are based on the test vectors in RFC 105 8032 section 7.1 [RFC8032]. 107 The DNS record for the verification public key has a "k=ed25519" tag 108 to indicate that the key is an Ed25519 rather than RSA key. 110 This is an additional DKIM signature algorithm added to Section 3.3 111 of [RFC6376] as envisioned in Section 3.3.4 of [RFC6376]. 113 Note: since Ed25519 public keys are 256 bits long, the base64 encoded 114 key is only 44 octets, so DNS key record data will generally fit in a 115 single 255 byte TXT string, and will work even with DNS provisioning 116 software that doesn't handle multi-string TXT records. 118 4. Signature and key syntax 120 The syntax of DKIM signatures and DKIM keys are updated as follows. 122 4.1. Signature syntax 124 The syntax of DKIM algorithm tags in section 3.5 of [RFC6376] is 125 updated by adding this rule to the existing rule for sig-a-tag-k: 127 ABNF: 129 sig-a-tag-k =/ "ed25519" 131 4.2. Key syntax 133 The syntax of DKIM key tags in section 3.6.1 of [RFC6376] is updated 134 by adding this rule to the existing rule for key-k-tag-type: 136 ABNF: 138 key-k-tag-type =/ "ed25519" 140 The p= value in the key record is the ed25519 public key encoded in 141 base64. Since the key is 256 bits long, the base64 text is 44 octets 142 long. See Appendix A.2 for a sample key record using the public key 143 in [RFC8032] Section 7.1, Test 1. 145 5. Key and algorithm choice and strength 147 Section 3.3 of [RFC6376] describes DKIM's hash and signature 148 algorithms. It is updated as follows: 150 Signers SHOULD implement and verifiers MUST implement the 151 ed25519-sha256 algorithm. 153 6. Transition Considerations 155 For backward compatibility, signers can add multiple signatures that 156 use old and new signing algorithms. Since there can only be a single 157 key record in the DNS for each selector, the signatures have to use 158 different selectors, although they can use the same d= and i= 159 identifiers. 161 The example message in Appendix A has two signatures with the same d= 162 and i= identifiers but different a= algorithms and s= selectors. 164 7. Security Considerations 166 All of the security advice in [RFC6376] continues to apply except 167 that the security advice about ED25519 in Section 8 of [RFC8032] 168 supplants the advice about RSA threats. 170 8. IANA Considerations 172 IANA is requested to update registries as follows. 174 8.1. DKIM Key Type registry 176 The following value is added to the DKIM Key Type Registry 178 +---------+-----------+--------+ 179 | TYPE | REFERENCE | STATUS | 180 +---------+-----------+--------+ 181 | ed25519 | [RFC8032] | active | 182 +---------+-----------+--------+ 184 Table 1: DKIM Key Type Registry Added Values 186 9. References 188 9.1. Normative References 190 [FIPS-180-4-2015] 191 U.S. Department of Commerce, "Secure Hash Standard", FIPS 192 PUB 180-4, August 2015, 193 . 196 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 197 Requirement Levels", BCP 14, RFC 2119, 198 DOI 10.17487/RFC2119, March 1997, 199 . 201 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 202 Specifications: ABNF", STD 68, RFC 5234, 203 DOI 10.17487/RFC5234, January 2008, 204 . 206 [RFC6376] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 207 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 208 RFC 6376, DOI 10.17487/RFC6376, September 2011, 209 . 211 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 212 Signature Algorithm (EdDSA)", RFC 8032, 213 DOI 10.17487/RFC8032, January 2017, 214 . 216 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 217 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 218 May 2017, . 220 9.2. Informative References 222 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 223 Standards (PKCS) #1: RSA Cryptography Specifications 224 Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February 225 2003, . 227 9.3. URIs 229 [1] mailto:dcrup@ietf.org 231 Appendix A. Example of a signed message 233 This is a small message with both rsa-sha256 and ed25519-sha256 DKIM 234 signatures. The signatures are independent of each other, so either 235 signature would be valid if the other were not present. 237 A.1. Secret keys 239 Ed25519 secret key in base64. This is the secret key from [RFC8032] 240 section 7.1 test 1, converted from hex to base64. 242 nWGxne/9WmC6hEr0kuwsxERJxWl7MmkZcDusAxyuf2A= 244 RSA secret key in PEM format. 246 -----BEGIN RSA PRIVATE KEY----- 247 MIICXQIBAAKBgQDkHlOQoBTzWRiGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQi 248 Y/J16JYi0Qvx/byYzCNb3W91y3FutACDfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqM 249 KrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3Ip3G+2kryOTIKT+l/K4w3QIDAQAB 250 AoGAH0cxOhFZDgzXWhDhnAJDw5s4roOXN4OhjiXa8W7Y3rhX3FJqmJSPuC8N9vQm 251 6SVbaLAE4SG5mLMueHlh4KXffEpuLEiNp9Ss3O4YfLiQpbRqE7Tm5SxKjvvQoZZe 252 zHorimOaChRL2it47iuWxzxSiRMv4c+j70GiWdxXnxe4UoECQQDzJB/0U58W7RZy 253 6enGVj2kWF732CoWFZWzi1FicudrBFoy63QwcowpoCazKtvZGMNlPWnC7x/6o8Gc 254 uSe0ga2xAkEA8C7PipPm1/1fTRQvj1o/dDmZp243044ZNyxjg+/OPN0oWCbXIGxy 255 WvmZbXriOWoSALJTjExEgraHEgnXssuk7QJBALl5ICsYMu6hMxO73gnfNayNgPxd 256 WFV6Z7ULnKyV7HSVYF0hgYOHjeYe9gaMtiJYoo0zGN+L3AAtNP9huqkWlzECQE1a 257 licIeVlo1e+qJ6Mgqr0Q7Aa7falZ448ccbSFYEPD6oFxiOl9Y9se9iYHZKKfIcst 258 o7DUw1/hz2Ck4N5JrgUCQQCyKveNvjzkkd8HjYs0SwM0fPjK16//5qDZ2UiDGnOe 259 uEzxBDAr518Z8VFbR41in3W4Y3yCDgQlLlcETrS+zYcL 260 -----END RSA PRIVATE KEY----- 262 A.2. Public key DNS records 264 The public key p= value in the first record is the public key from 265 [RFC8032] section 7.1 test 1, converted from hex to base64. 267 brisbane._domainkey.football.example.com. IN TXT ( 268 "v=DKIM1; k=ed25519; p=11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=") 270 test._domainkey.football.example.com. IN TXT ( 271 "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkHlOQoBTzWR" 272 "iGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQiY/J16JYi0Qvx/byYzCNb3W91y3FutAC" 273 "DfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqMKrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3" 274 "Ip3G+2kryOTIKT+l/K4w3QIDAQAB") 276 A.3. Signed Message 278 The text in each line of the message starts at the first position 279 except for the continuation lines on the DKIM-Signature headers which 280 start with a single space. A blank line follows the "Joe." line. 282 DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; 283 d=football.example.com; i=@football.example.com; 284 q=dns/txt; s=brisbane; t=1528637909; h=from : to : 285 subject : date : message-id : from : subject : date; 286 bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=; 287 b=/gCrinpcQOoIfuHNQIbq4pgh9kyIK3AQUdt9OdqQehSwhEIug4D11Bus 288 Fa3bT3FY5OsU7ZbnKELq+eXdp1Q1Dw== 289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 290 d=football.example.com; i=@football.example.com; 291 q=dns/txt; s=test; t=1528637909; h=from : to : subject : 292 date : message-id : from : subject : date; 293 bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=; 294 b=F45dVWDfMbQDGHJFlXUNB2HKfbCeLRyhDXgFpEL8GwpsRe0IeIixNTe3 295 DhCVlUrSjV4BwcVcOF6+FF3Zo9Rpo1tFOeS9mPYQTnGdaSGsgeefOsk2Jz 296 dA+L10TeYt9BgDfQNZtKdN1WO//KgIqXP7OdEFE4LjFYNcUxZQ4FADY+8= 297 From: Joe SixPack 298 To: Suzie Q 299 Subject: Is dinner ready? 300 Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) 301 Message-ID: <20030712040037.46341.5F8J@football.example.com> 303 Hi. 305 We lost the game. Are you hungry yet? 307 Joe. 309 Appendix B. Change log 311 13 to 14 Editorial nits. 313 12 to 13 Made example even less wrong. 315 11 to 12 Made example less wrong. 317 10 to 11 New example with both signatures, minor nits. 319 09 to 10 Improve abstract, minor nits. 321 08 to 09 Specify sha-256 for the extremely literal minded. Take out 322 the prehash stuff. Add example. 324 07 to 08 Specify base64 key records. Style edits per Dave C. 326 06 to 07: Remove RSA fingerprints. Change Pure to hashed eddsa. 328 05 to 06: Editorial changes only. 330 04 to 05: Remove deprecation cruft and inconsistent key advice. Fix 331 p= and k= text. 333 03 to 04: Change eddsa to ed25519. Add Martin's key regeneration 334 issue. Remove hashed ed25519 keys. Fix typos and clarify text. 335 Move syntax updates to separate section. Take out SHA-1 stuff. 337 01 to 02: Clarify EdDSA algorithm is ed25519 with Pure version of 338 the signing. Make references to tags and fields consistent. 340 Author's Address 342 John Levine 343 Taughannock Networks 344 PO Box 727 345 Trumansburg, NY 14886 347 Phone: +883.5100.01196712 348 Email: standards@taugh.com