idnits 2.17.1 draft-ietf-dcrup-dkim-crypto-12.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 6, 2018) is 2143 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: 1 error (**), 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 6, 2018 5 Intended status: Standards Track 6 Expires: December 8, 2018 8 A new cryptographic signature method for DKIM 9 draft-ietf-dcrup-dkim-crypto-12 11 Abstract 13 This document adds a new signing algorithm to DKIM, ed25519-sha256. 14 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 8, 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 . . . . . . . . . . . . 5 66 A.1. Secret keys . . . . . . . . . . . . . . . . . . . . . . . 6 67 A.2. Public key DNS records . . . . . . . . . . . . . . . . . 6 68 A.3. Signed Message . . . . . . . . . . . . . . . . . . . . . 6 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 capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", 90 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 91 "OPTIONAL" in this document are to be interpreted as described in 92 [RFC2119]. 94 Syntax descriptions use Augmented BNF (ABNF) [RFC5234]. The ABNF 95 tokens sig-a-tag-k and key-k-tag-type are imported from [RFC6376]. 97 3. Ed25519-SHA256 Signing Algorithm 99 The ed25519-sha256 signing algorithm computes a message hash as 100 defined in section 3 of [RFC6376] using SHA-256 [FIPS-180-4-2015] as 101 the hash-alg, and signs it with the PureEdDSA variant Ed25519, as 102 defined in in RFC 8032 section 5.1 [RFC8032]. Example keys and 103 signatures in Appendix A below are based on the test vectors in RFC 104 8032 section 7.1 [RFC8032]. 106 The DNS record for the verification public key has a "k=ed25519" tag 107 to indicate that the key is an Ed25519 rather than RSA key. 109 This is an additional DKIM signature algorithm added to Section 3.3 110 of [RFC6376] as envisioned in Section 3.3.4 of [RFC6376]. 112 Note: since Ed25519 keys are 256 bits long, the base64 encoded key is 113 only 44 octets, so DNS key record data will generally fit in a single 114 255 byte TXT string, and will work even with DNS provisioning 115 software that doesn't handle multi-string TXT records. 117 4. Signature and key syntax 119 The syntax of DKIM signatures and DKIM keys are updated as follows. 121 4.1. Signature syntax 123 The syntax of DKIM algorithm tags in section 3.5 of [RFC6376] is 124 updated by adding this rule to the existing rule for sig-a-tag-k: 126 ABNF: 128 sig-a-tag-k =/ "ed25519" 130 4.2. Key syntax 132 The syntax of DKIM key tags in section 3.6.1 of [RFC6376] is updated 133 by adding this rule to the existing rule for key-k-tag-type: 135 ABNF: 137 key-k-tag-type =/ "ed25519" 139 The p= value in the key record is the ed25519 public key encoded in 140 base64. Since the key is 256 bits long, the base64 text is 44 octets 141 long. For example, a key record using the public key in [RFC8032] 142 Section 7.1, Test 1, mignt be: 144 s._domainkey.example TXT ( 145 "v=DKIM1; k=ed25519; p=11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=" 146 ) 148 5. Key and algorithm choice and strength 150 Section 3.3 of [RFC6376] describes DKIM's hash and signature 151 algorithms. It is updated as follows: 153 Signers SHOULD implement and verifiers MUST implement the 154 ed25519-sha256 algorithm. 156 6. Transition Considerations 158 For backward compatibility, signers can add multiple signatures that 159 use old and new signing algorithms. Since there can only be a single 160 key record in the DNS for each selector, the signatures have to use 161 different selectors, although they can use the same d= and i= 162 identifiers. 164 7. Security Considerations 166 Ed25519 is a widely used cryptographic technique, so the security of 167 DKIM signatures using new signing algorithms should be at least as 168 good as those using old algorithms. 170 All of the security advice in [RFC6376] continues to apply except 171 that the advice in Section 8 of [RFC8032] supplants the advice about 172 RSA threats. 174 8. IANA Considerations 176 IANA is requested to update registries as follows. 178 8.1. DKIM Key Type registry 180 The following value is added to the DKIM Key Type Registry 182 +---------+-----------+--------+ 183 | TYPE | REFERENCE | STATUS | 184 +---------+-----------+--------+ 185 | ed25519 | [RFC8032] | active | 186 +---------+-----------+--------+ 188 Table 1: DKIM Key Type Registry Added Values 190 9. References 192 9.1. Normative References 194 [FIPS-180-4-2015] 195 U.S. Department of Commerce, "Secure Hash Standard", FIPS 196 PUB 180-4, August 2015, 197 . 200 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 201 Requirement Levels", BCP 14, RFC 2119, 202 DOI 10.17487/RFC2119, March 1997, 203 . 205 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 206 Specifications: ABNF", STD 68, RFC 5234, 207 DOI 10.17487/RFC5234, January 2008, 208 . 210 [RFC6376] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 211 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 212 RFC 6376, DOI 10.17487/RFC6376, September 2011, 213 . 215 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 216 Signature Algorithm (EdDSA)", RFC 8032, 217 DOI 10.17487/RFC8032, January 2017, 218 . 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. 241 fL+5V9EquCZAovKik3pA6Lk9zwCzoEtjIuIqK9ZXHHA= 243 RSA secret key in PEM format. 245 -----BEGIN RSA PRIVATE KEY----- 246 MIICXQIBAAKBgQDkHlOQoBTzWRiGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQi 247 Y/J16JYi0Qvx/byYzCNb3W91y3FutACDfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqM 248 KrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3Ip3G+2kryOTIKT+l/K4w3QIDAQAB 249 AoGAH0cxOhFZDgzXWhDhnAJDw5s4roOXN4OhjiXa8W7Y3rhX3FJqmJSPuC8N9vQm 250 6SVbaLAE4SG5mLMueHlh4KXffEpuLEiNp9Ss3O4YfLiQpbRqE7Tm5SxKjvvQoZZe 251 zHorimOaChRL2it47iuWxzxSiRMv4c+j70GiWdxXnxe4UoECQQDzJB/0U58W7RZy 252 6enGVj2kWF732CoWFZWzi1FicudrBFoy63QwcowpoCazKtvZGMNlPWnC7x/6o8Gc 253 uSe0ga2xAkEA8C7PipPm1/1fTRQvj1o/dDmZp243044ZNyxjg+/OPN0oWCbXIGxy 254 WvmZbXriOWoSALJTjExEgraHEgnXssuk7QJBALl5ICsYMu6hMxO73gnfNayNgPxd 255 WFV6Z7ULnKyV7HSVYF0hgYOHjeYe9gaMtiJYoo0zGN+L3AAtNP9huqkWlzECQE1a 256 licIeVlo1e+qJ6Mgqr0Q7Aa7falZ448ccbSFYEPD6oFxiOl9Y9se9iYHZKKfIcst 257 o7DUw1/hz2Ck4N5JrgUCQQCyKveNvjzkkd8HjYs0SwM0fPjK16//5qDZ2UiDGnOe 258 uEzxBDAr518Z8VFbR41in3W4Y3yCDgQlLlcETrS+zYcL 259 -----END RSA PRIVATE KEY----- 261 A.2. Public key DNS records 263 brisbane._domainkey.football.example.com. IN TXT ( 264 "v=DKIM1; k=ed25519; p=yi50DjK5O9pqbFpNHklsv9lqaS0ArSYu02qp1S0DW1Y=") 266 test._domainkey.football.example.com. IN TXT ( 267 "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkHlOQoBTzWR" 268 "iGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQiY/J16JYi0Qvx/byYzCNb3W91y3FutAC" 269 "DfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqMKrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3" 270 "Ip3G+2kryOTIKT+l/K4w3QIDAQAB") 272 A.3. Signed Message 274 The text in each line of the message starts at the first position 275 except for the continuation lines on the DKIM-Signature headers which 276 start with a single space. 278 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; 279 d=football.example.com; i=@football.example.com; 280 q=dns/txt; s=brisbane; t=1518460054; h=from : to : 281 subject : date : message-id : from : subject : date; 282 bh=4bLNXImK9drULnmePzZNEBleUanJCX5PIsDIFoH4KTQ=; 283 b=9/dsDChY0YMTtD5Eyw3wx7x22BlSJP7M5ECbJ7GWrR45nXlTCGb8l0YB 284 o0wBLR++X5LqmsxXaOYLLJe46l10AQ== 285 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; 286 d=football.example.com; i=@football.example.com; 287 q=dns/txt; s=test; t=1527915362; h=from : to : subject : 288 date : message-id : from : subject : date; 289 bh=4bLNXImK9drULnmePzZNEBleUanJCX5PIsDIFoH4KTQ=; 290 b=icKcLSEZYXJ95flvWE8FT6hl5iqd8MC/LEKYH0QjsqYy6MO/4pgVNCZH 291 l/RAXAuADxE/40Fg7uTlxwwD1hjN2Ple6J//cJfslBdDOq6zTVbne1dqtl 292 NOat7iamJ1AfRqyG+ja7a2AZsrpUuJ7VA6O+0zRYPqpwMEkEFIzI9i/Xk= 293 From: Joe SixPack 294 To: Suzie Q 295 Subject: Is dinner ready? 296 Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) 297 Message-ID: <20030712040037.46341.5F8J@football.example.com> 299 Hi. 301 We lost the game. Are you hungry yet? 303 Joe. 305 Appendix B. Change log 307 11 to 12 Made example less wrong. 309 10 to 11 New example with both signatures, minor nits. 311 09 to 10 Improve abstract, minor nits. 313 08 to 09 Specify sha-256 for the extremely literal minded. Take out 314 the prehash stuff. Add example. 316 07 to 08 Specify base64 key records. Style edits per Dave C. 318 06 to 07: Remove RSA fingerprints. Change Pure to hashed eddsa. 320 05 to 06: Editorial changes only. 322 04 to 05: Remove deprecation cruft and inconsistent key advice. Fix 323 p= and k= text. 325 03 to 04: Change eddsa to ed25519. Add Martin's key regeneration 326 issue. Remove hashed ed25519 keys. Fix typos and clarify text. 327 Move syntax updates to separate section. Take out SHA-1 stuff. 329 01 to 02: Clarify EdDSA algorithm is ed25519 with Pure version of 330 the signing. Make references to tags and fields consistent. 332 Author's Address 334 John Levine 335 Taughannock Networks 336 PO Box 727 337 Trumansburg, NY 14886 339 Phone: +883.5100.01196712 340 Email: standards@taugh.com