idnits 2.17.1 draft-ietf-dkim-rfc4871bis-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 : ---------------------------------------------------------------------------- ** There are 2 instances of too long lines in the document, the longest one being 9 characters in excess of 72. -- The draft header indicates that this document obsoletes RFC4871, 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 == Line 1324 has weird spacing: '... email elec...' -- The document date (October 11, 2010) is 4946 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'FWS' is mentioned on line 948, but not defined == Unused Reference: 'ITU-X660-1997' is defined on line 2804, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS-180-2-2002' -- Possible downref: Non-RFC (?) normative reference: ref. 'ITU-X660-1997' ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Obsolete normative reference: RFC 3490 (Obsoleted by RFC 5890, RFC 5891) ** Obsolete normative reference: RFC 4234 (Obsoleted by RFC 5234) ** Downref: Normative reference to an Informational RFC: RFC 5598 -- Obsolete informational reference (is this intentional?): RFC 4409 (Obsoleted by RFC 6409) -- Obsolete informational reference (is this intentional?): RFC 4870 (Obsoleted by RFC 4871) -- Obsolete informational reference (is this intentional?): RFC 4871 (Obsoleted by RFC 6376) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) -- Obsolete informational reference (is this intentional?): RFC 5451 (Obsoleted by RFC 7001) -- Obsolete informational reference (is this intentional?): RFC 5751 (Obsoleted by RFC 8551) Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DKIM D. Crocker, Ed. 3 Internet-Draft Brandenburg InternetWorking 4 Obsoletes: 4871 (if approved) T. Hansen, Ed. 5 Intended status: Standards Track AT&T Laboratories 6 Expires: April 14, 2011 M. Kucherawy, Ed. 7 Cloudmark 8 October 11, 2010 10 DomainKeys Identified Mail (DKIM) Signatures 11 draft-ietf-dkim-rfc4871bis-02 13 Abstract 15 DomainKeys Identified Mail (DKIM) permits a person, role, or 16 organization that owns the signing domain to claim some 17 responsibility for a message by associating the domain with the 18 message. This can be an author's organization, an operational relay 19 or one of their agents. DKIM separates the question of the identity 20 of the signer of the message from the purported author of the 21 message. Assertion of responsibility is validated through a 22 cryptographic signature and querying the signer's domain directly to 23 retrieve the appropriate public key. Message transit from author to 24 recipient is through relays that typically make no substantive change 25 to the message content and thus preserve the DKIM signature. 27 Status of this Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on April 14, 2011. 44 Copyright Notice 46 Copyright (c) 2010 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 62 1.1. Signing Identity . . . . . . . . . . . . . . . . . . . . . 6 63 1.2. Scalability . . . . . . . . . . . . . . . . . . . . . . . 6 64 1.3. Simple Key Management . . . . . . . . . . . . . . . . . . 6 65 2. Terminology and Definitions . . . . . . . . . . . . . . . . . 6 66 2.1. Signers . . . . . . . . . . . . . . . . . . . . . . . . . 7 67 2.2. Verifiers . . . . . . . . . . . . . . . . . . . . . . . . 7 68 2.3. Identity . . . . . . . . . . . . . . . . . . . . . . . . . 7 69 2.4. Identifier . . . . . . . . . . . . . . . . . . . . . . . . 7 70 2.5. Signing Domain Identifier (SDID) . . . . . . . . . . . . . 7 71 2.6. Agent or User Identifier (AUID) . . . . . . . . . . . . . 7 72 2.7. Identity Assessor . . . . . . . . . . . . . . . . . . . . 8 73 2.8. Whitespace . . . . . . . . . . . . . . . . . . . . . . . . 8 74 2.9. Common ABNF Tokens . . . . . . . . . . . . . . . . . . . . 8 75 2.10. Imported ABNF Tokens . . . . . . . . . . . . . . . . . . . 9 76 2.11. DKIM-Quoted-Printable . . . . . . . . . . . . . . . . . . 9 77 3. Protocol Elements . . . . . . . . . . . . . . . . . . . . . . 10 78 3.1. Selectors . . . . . . . . . . . . . . . . . . . . . . . . 10 79 3.2. Tag=Value Lists . . . . . . . . . . . . . . . . . . . . . 12 80 3.3. Signing and Verification Algorithms . . . . . . . . . . . 13 81 3.4. Canonicalization . . . . . . . . . . . . . . . . . . . . . 15 82 3.5. The DKIM-Signature Header Field . . . . . . . . . . . . . 19 83 3.6. Key Management and Representation . . . . . . . . . . . . 28 84 3.7. Computing the Message Hashes . . . . . . . . . . . . . . . 33 85 3.8. Signing by Parent Domains . . . . . . . . . . . . . . . . 35 86 3.9. Relationship between SDID and AUID . . . . . . . . . . . . 35 87 4. Semantics of Multiple Signatures . . . . . . . . . . . . . . . 36 88 4.1. Example Scenarios . . . . . . . . . . . . . . . . . . . . 36 89 4.2. Interpretation . . . . . . . . . . . . . . . . . . . . . . 38 90 5. Signer Actions . . . . . . . . . . . . . . . . . . . . . . . . 39 91 5.1. Determine Whether the Email Should Be Signed and by 92 Whom . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 93 5.2. Select a Private Key and Corresponding Selector 94 Information . . . . . . . . . . . . . . . . . . . . . . . 39 95 5.3. Normalize the Message to Prevent Transport Conversions . . 40 96 5.4. Determine the Header Fields to Sign . . . . . . . . . . . 40 97 5.5. Recommended Signature Content . . . . . . . . . . . . . . 42 98 5.6. Compute the Message Hash and Signature . . . . . . . . . . 44 99 5.7. Insert the DKIM-Signature Header Field . . . . . . . . . . 44 100 6. Verifier Actions . . . . . . . . . . . . . . . . . . . . . . . 45 101 6.1. Extract Signatures from the Message . . . . . . . . . . . 45 102 6.2. Communicate Verification Results . . . . . . . . . . . . . 51 103 6.3. Interpret Results/Apply Local Policy . . . . . . . . . . . 52 104 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 53 105 7.1. DKIM-Signature Tag Specifications . . . . . . . . . . . . 53 106 7.2. DKIM-Signature Query Method Registry . . . . . . . . . . . 53 107 7.3. DKIM-Signature Canonicalization Registry . . . . . . . . . 54 108 7.4. _domainkey DNS TXT Record Tag Specifications . . . . . . . 54 109 7.5. DKIM Key Type Registry . . . . . . . . . . . . . . . . . . 55 110 7.6. DKIM Hash Algorithms Registry . . . . . . . . . . . . . . 56 111 7.7. DKIM Service Types Registry . . . . . . . . . . . . . . . 56 112 7.8. DKIM Selector Flags Registry . . . . . . . . . . . . . . . 56 113 7.9. DKIM-Signature Header Field . . . . . . . . . . . . . . . 57 114 8. Security Considerations . . . . . . . . . . . . . . . . . . . 57 115 8.1. Misuse of Body Length Limits ("l=" Tag) . . . . . . . . . 57 116 8.2. Misappropriated Private Key . . . . . . . . . . . . . . . 58 117 8.3. Key Server Denial-of-Service Attacks . . . . . . . . . . . 59 118 8.4. Attacks Against the DNS . . . . . . . . . . . . . . . . . 59 119 8.5. Replay Attacks . . . . . . . . . . . . . . . . . . . . . . 60 120 8.6. Limits on Revoking Keys . . . . . . . . . . . . . . . . . 60 121 8.7. Intentionally Malformed Key Records . . . . . . . . . . . 60 122 8.8. Intentionally Malformed DKIM-Signature Header Fields . . . 61 123 8.9. Information Leakage . . . . . . . . . . . . . . . . . . . 61 124 8.10. Remote Timing Attacks . . . . . . . . . . . . . . . . . . 61 125 8.11. Reordered Header Fields . . . . . . . . . . . . . . . . . 61 126 8.12. RSA Attacks . . . . . . . . . . . . . . . . . . . . . . . 61 127 8.13. Inappropriate Signing by Parent Domains . . . . . . . . . 62 128 8.14. Attacks Involving Addition of Header Fields . . . . . . . 62 129 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 63 130 9.1. Normative References . . . . . . . . . . . . . . . . . . . 63 131 9.2. Informative References . . . . . . . . . . . . . . . . . . 64 132 Appendix A. Example of Use (INFORMATIVE) . . . . . . . . . . . . 65 133 A.1. The User Composes an Email . . . . . . . . . . . . . . . . 65 134 A.2. The Email is Signed . . . . . . . . . . . . . . . . . . . 65 135 A.3. The Email Signature is Verified . . . . . . . . . . . . . 66 136 Appendix B. Usage Examples (INFORMATIVE) . . . . . . . . . . . . 67 137 B.1. Alternate Submission Scenarios . . . . . . . . . . . . . . 68 138 B.2. Alternate Delivery Scenarios . . . . . . . . . . . . . . . 70 139 Appendix C. Creating a Public Key (INFORMATIVE) . . . . . . . . . 72 140 Appendix D. MUA Considerations . . . . . . . . . . . . . . . . . 73 141 Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 74 142 Appendix F. RFC4871bis Changes . . . . . . . . . . . . . . . . . 74 143 F.1. TO DO . . . . . . . . . . . . . . . . . . . . . . . . . . 74 144 F.2. DONE . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 145 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 75 147 1. Introduction 149 DomainKeys Identified Mail (DKIM) permits a person, role, or 150 organization that owns the signing domain to claim some 151 responsibility for a message by associating the domain with the 152 message. This can be an author's organization, an operational relay 153 or one of their agents. Assertion of responsibility is validated 154 through a cryptographic signature and querying the signer's domain 155 directly to retrieve the appropriate public key. Message transit 156 from author to recipient is through relays that typically make no 157 substantive change to the message content and thus preserve the DKIM 158 signature. A message can contain multiple signatures, from the same 159 or different organizations involved with the message. 161 The approach taken by DKIM differs from previous approaches to 162 message signing (e.g., Secure/Multipurpose Internet Mail Extensions 163 (S/MIME) [RFC1847], OpenPGP [RFC4880]) in that: 165 o the message signature is written as a message header field so that 166 neither human recipients nor existing MUA (Mail User Agent) 167 software is confused by signature-related content appearing in the 168 message body; 170 o there is no dependency on public and private key pairs being 171 issued by well-known, trusted certificate authorities; 173 o there is no dependency on the deployment of any new Internet 174 protocols or services for public key distribution or revocation; 176 o signature verification failure does not force rejection of the 177 message; 179 o no attempt is made to include encryption as part of the mechanism; 181 o message archiving is not a design goal. 183 DKIM: 185 o is compatible with the existing email infrastructure and 186 transparent to the fullest extent possible; 188 o requires minimal new infrastructure; 190 o can be implemented independently of clients in order to reduce 191 deployment time; 193 o can be deployed incrementally; 194 o allows delegation of signing to third parties. 196 1.1. Signing Identity 198 DKIM separates the question of the identity of the signer of the 199 message from the purported author of the message. In particular, a 200 signature includes the identity of the signer. Verifiers can use the 201 signing information to decide how they want to process the message. 202 The signing identity is included as part of the signature header 203 field. 205 INFORMATIVE RATIONALE: The signing identity specified by a DKIM 206 signature is not required to match an address in any particular 207 header field because of the broad methods of interpretation by 208 recipient mail systems, including MUAs. 210 1.2. Scalability 212 DKIM is designed to support the extreme scalability requirements that 213 characterize the email identification problem. There are currently 214 over 70 million domains and a much larger number of individual 215 addresses. DKIM seeks to preserve the positive aspects of the 216 current email infrastructure, such as the ability for anyone to 217 communicate with anyone else without introduction. 219 1.3. Simple Key Management 221 DKIM differs from traditional hierarchical public-key systems in that 222 no Certificate Authority infrastructure is required; the verifier 223 requests the public key from a repository in the domain of the 224 claimed signer directly rather than from a third party. 226 The DNS is proposed as the initial mechanism for the public keys. 227 Thus, DKIM currently depends on DNS administration and the security 228 of the DNS system. DKIM is designed to be extensible to other key 229 fetching services as they become available. 231 2. Terminology and Definitions 233 This section defines terms used in the rest of the document. 235 DKIM is designed to operate within the Internet Mail service, as 236 defined in [RFC5598]. Basic email terminology is taken from that 237 specification. 239 Syntax descriptions use Augmented BNF (ABNF) [RFC4234]. 241 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 242 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 243 document are to be interpreted as described in [RFC2119]. 245 2.1. Signers 247 Elements in the mail system that sign messages on behalf of a domain 248 are referred to as signers. These may be MUAs (Mail User Agents), 249 MSAs (Mail Submission Agents), MTAs (Mail Transfer Agents), or other 250 agents such as mailing list exploders. In general, any signer will 251 be involved in the injection of a message into the message system in 252 some way. The key issue is that a message must be signed before it 253 leaves the administrative domain of the signer. 255 2.2. Verifiers 257 Elements in the mail system that verify signatures are referred to as 258 verifiers. These may be MTAs, Mail Delivery Agents (MDAs), or MUAs. 259 In most cases it is expected that verifiers will be close to an end 260 user (reader) of the message or some consuming agent such as a 261 mailing list exploder. 263 2.3. Identity 265 A person, role, or organization. In the context of DKIM, examples 266 include author, author's organization, an ISP along the handling 267 path, an independent trust assessment service, and a mailing list 268 operator. 270 2.4. Identifier 272 A label that refers to an identity. 274 2.5. Signing Domain Identifier (SDID) 276 A single domain name that is the mandatory payload output of DKIM and 277 that refers to the identity claiming responsibility for introduction 278 of a message into the mail stream. For DKIM processing, the name has 279 only basic domain name semantics; any possible owner-specific 280 semantics are outside the scope of DKIM. It is specified in 281 Section 3.5. 283 2.6. Agent or User Identifier (AUID) 285 A single identifier that refers to the agent or user on behalf of 286 whom the Signing Domain Identifier (SDID) has taken responsibility. 287 The AUID comprises a domain name and an optional . The 288 domain name is the same as that used for the SDID or is a sub-domain 289 of it. For DKIM processing, the domain name portion of the AUID has 290 only basic domain name semantics; any possible owner-specific 291 semantics are outside the scope of DKIM. It is specified in 292 Section 3.5 . 294 2.7. Identity Assessor 296 A module that consumes DKIM's mandatory payload, which is the 297 responsible Signing Domain Identifier (SDID). The module is 298 dedicated to the assessment of the delivered identifier. Other DKIM 299 (and non-DKIM) values can also be delivered to this module as well as 300 to a more general message evaluation filtering engine. However, this 301 additional activity is outside the scope of the DKIM signature 302 specification. 304 2.8. Whitespace 306 There are three forms of whitespace: 308 o WSP represents simple whitespace, i.e., a space or a tab character 309 (formal definition in [RFC4234]). 311 o LWSP is linear whitespace, defined as WSP plus CRLF (formal 312 definition in [RFC4234]). 314 o FWS is folding whitespace. It allows multiple lines separated by 315 CRLF followed by at least one whitespace, to be joined. 317 The formal ABNF for these are (WSP and LWSP are given for information 318 only): 319 WSP = SP / HTAB 320 LWSP = *(WSP / CRLF WSP) 321 FWS = [*WSP CRLF] 1*WSP 323 The definition of FWS is identical to that in [RFC5322] except for 324 the exclusion of obs-FWS. 326 2.9. Common ABNF Tokens 328 The following ABNF tokens are used elsewhere in this document: 329 hyphenated-word = ALPHA [ *(ALPHA / DIGIT / "-") (ALPHA / DIGIT) ] 330 ALPHADIGITPS = (ALPHA / DIGIT / "+" / "/") 331 base64string = ALPHADIGITPS *([FWS] ALPHADIGITPS) 332 [ [FWS] "=" [ [FWS] "=" ] ] 334 2.10. Imported ABNF Tokens 336 The following tokens are imported from other RFCs as noted. Those 337 RFCs should be considered definitive. 339 The following tokens are imported from [RFC5321]: 341 o "Local-part" (implementation warning: this permits quoted strings) 343 o "sub-domain" 345 The following tokens are imported from [RFC5322]: 347 o "field-name" (name of a header field) 349 o "dot-atom-text" (in the Local-part of an email address) 351 The following tokens are imported from [RFC2045]: 353 o "qp-section" (a single line of quoted-printable-encoded text) 355 o "hex-octet" (a quoted-printable encoded octet) 357 INFORMATIVE NOTE: Be aware that the ABNF in [RFC2045] does not 358 obey the rules of [RFC4234] and must be interpreted accordingly, 359 particularly as regards case folding. 361 Other tokens not defined herein are imported from [RFC4234]. These 362 are intuitive primitives such as SP, HTAB, WSP, ALPHA, DIGIT, CRLF, 363 etc. 365 2.11. DKIM-Quoted-Printable 367 The DKIM-Quoted-Printable encoding syntax resembles that described in 368 Quoted-Printable [RFC2045], Section 6.7: any character MAY be encoded 369 as an "=" followed by two hexadecimal digits from the alphabet 370 "0123456789ABCDEF" (no lowercase characters permitted) representing 371 the hexadecimal-encoded integer value of that character. All control 372 characters (those with values < %x20), 8-bit characters (values > 373 %x7F), and the characters DEL (%x7F), SPACE (%x20), and semicolon 374 (";", %x3B) MUST be encoded. Note that all whitespace, including 375 SPACE, CR, and LF characters, MUST be encoded. After encoding, FWS 376 MAY be added at arbitrary locations in order to avoid excessively 377 long lines; such whitespace is NOT part of the value, and MUST be 378 removed before decoding. 380 ABNF: 382 dkim-quoted-printable = *(FWS / hex-octet / dkim-safe-char) 383 ; hex-octet is from RFC2045 384 dkim-safe-char = %x21-3A / %x3C / %x3E-7E 385 ; '!' - ':', '<', '>' - '~' 386 ; Characters not listed as "mail-safe" in 387 ; [RFC2049] are also not recommended. 389 INFORMATIVE NOTE: DKIM-Quoted-Printable differs from Quoted- 390 Printable as defined in [RFC2045] in several important ways: 392 1. Whitespace in the input text, including CR and LF, must be 393 encoded. [RFC2045] does not require such encoding, and does 394 not permit encoding of CR or LF characters that are part of a 395 CRLF line break. 397 2. Whitespace in the encoded text is ignored. This is to allow 398 tags encoded using DKIM-Quoted-Printable to be wrapped as 399 needed. In particular, [RFC2045] requires that line breaks in 400 the input be represented as physical line breaks; that is not 401 the case here. 403 3. The "soft line break" syntax ("=" as the last non-whitespace 404 character on the line) does not apply. 406 4. DKIM-Quoted-Printable does not require that encoded lines be 407 no more than 76 characters long (although there may be other 408 requirements depending on the context in which the encoded 409 text is being used). 411 3. Protocol Elements 413 Protocol Elements are conceptual parts of the protocol that are not 414 specific to either signers or verifiers. The protocol descriptions 415 for signers and verifiers are described in later sections (Signer 416 Actions (Section 5) and Verifier Actions (Section 6)). NOTE: This 417 section must be read in the context of those sections. 419 3.1. Selectors 421 To support multiple concurrent public keys per signing domain, the 422 key namespace is subdivided using "selectors". For example, 423 selectors might indicate the names of office locations (e.g., 424 "sanfrancisco", "coolumbeach", and "reykjavik"), the signing date 425 (e.g., "january2005", "february2005", etc.), or even an individual 426 user. 428 Selectors are needed to support some important use cases. For 429 example: 431 o Domains that want to delegate signing capability for a specific 432 address for a given duration to a partner, such as an advertising 433 provider or other outsourced function. 435 o Domains that want to allow frequent travelers to send messages 436 locally without the need to connect with a particular MSA. 438 o "Affinity" domains (e.g., college alumni associations) that 439 provide forwarding of incoming mail, but that do not operate a 440 mail submission agent for outgoing mail. 442 Periods are allowed in selectors and are component separators. When 443 keys are retrieved from the DNS, periods in selectors define DNS 444 label boundaries in a manner similar to the conventional use in 445 domain names. Selector components might be used to combine dates 446 with locations, for example, "march2005.reykjavik". In a DNS 447 implementation, this can be used to allow delegation of a portion of 448 the selector namespace. 450 ABNF: 451 selector = sub-domain *( "." sub-domain ) 453 The number of public keys and corresponding selectors for each domain 454 is determined by the domain owner. Many domain owners will be 455 satisfied with just one selector, whereas administratively 456 distributed organizations may choose to manage disparate selectors 457 and key pairs in different regions or on different email servers. 459 Beyond administrative convenience, selectors make it possible to 460 seamlessly replace public keys on a routine basis. If a domain 461 wishes to change from using a public key associated with selector 462 "january2005" to a public key associated with selector 463 "february2005", it merely makes sure that both public keys are 464 advertised in the public-key repository concurrently for the 465 transition period during which email may be in transit prior to 466 verification. At the start of the transition period, the outbound 467 email servers are configured to sign with the "february2005" private 468 key. At the end of the transition period, the "january2005" public 469 key is removed from the public-key repository. 471 INFORMATIVE NOTE: A key may also be revoked as described below. 472 The distinction between revoking and removing a key selector 473 record is subtle. When phasing out keys as described above, a 474 signing domain would probably simply remove the key record after 475 the transition period. However, a signing domain could elect to 476 revoke the key (but maintain the key record) for a further period. 477 There is no defined semantic difference between a revoked key and 478 a removed key. 480 While some domains may wish to make selector values well known, 481 others will want to take care not to allocate selector names in a way 482 that allows harvesting of data by outside parties. For example, if 483 per-user keys are issued, the domain owner will need to make the 484 decision as to whether to associate this selector directly with the 485 name of a registered end-user, or make it some unassociated random 486 value, such as a fingerprint of the public key. 488 INFORMATIVE OPERATIONS NOTE: Reusing a selector with a new key 489 (for example, changing the key associated with a user's name) 490 makes it impossible to tell the difference between a message that 491 didn't verify because the key is no longer valid versus a message 492 that is actually forged. For this reason, signers are ill-advised 493 to reuse selectors for new keys. A better strategy is to assign 494 new keys to new selectors. 496 3.2. Tag=Value Lists 498 DKIM uses a simple "tag=value" syntax in several contexts, including 499 in messages and domain signature records. 501 Values are a series of strings containing either plain text, "base64" 502 text (as defined in [RFC2045], Section 6.8), "qp-section" (ibid, 503 Section 6.7), or "dkim-quoted-printable" (as defined in Section 2.6). 504 The name of the tag will determine the encoding of each value. 505 Unencoded semicolon (";") characters MUST NOT occur in the tag value, 506 since that separates tag-specs. 508 INFORMATIVE IMPLEMENTATION NOTE: Although the "plain text" defined 509 below (as "tag-value") only includes 7-bit characters, an 510 implementation that wished to anticipate future standards would be 511 advised not to preclude the use of UTF8-encoded text in tag=value 512 lists. 514 Formally, the ABNF syntax rules are as follows: 515 tag-list = tag-spec 0*( ";" tag-spec ) [ ";" ] 516 tag-spec = [FWS] tag-name [FWS] "=" [FWS] tag-value [FWS] 517 tag-name = ALPHA 0*ALNUMPUNC 518 tag-value = [ tval 0*( 1*(WSP / FWS) tval ) ] 519 ; WSP and FWS prohibited at beginning and end 520 tval = 1*VALCHAR 521 VALCHAR = %x21-3A / %x3C-7E 522 ; EXCLAMATION to TILDE except SEMICOLON 523 ALNUMPUNC = ALPHA / DIGIT / "_" 525 Note that WSP is allowed anywhere around tags. In particular, any 526 WSP after the "=" and any WSP before the terminating ";" is not part 527 of the value; however, WSP inside the value is significant. 529 Tags MUST be interpreted in a case-sensitive manner. Values MUST be 530 processed as case sensitive unless the specific tag description of 531 semantics specifies case insensitivity. 533 Tags with duplicate names MUST NOT occur within a single tag-list; if 534 a tag name does occur more than once, the entire tag-list is invalid. 536 Whitespace within a value MUST be retained unless explicitly excluded 537 by the specific tag description. 539 Tag=value pairs that represent the default value MAY be included to 540 aid legibility. 542 Unrecognized tags MUST be ignored. 544 Tags that have an empty value are not the same as omitted tags. An 545 omitted tag is treated as having the default value; a tag with an 546 empty value explicitly designates the empty string as the value. For 547 example, "g=" does not mean "g=*", even though "g=*" is the default 548 for that tag. 550 3.3. Signing and Verification Algorithms 552 DKIM supports multiple digital signature algorithms. Two algorithms 553 are defined by this specification at this time: rsa-sha1 and rsa- 554 sha256. Signers MUST implement and SHOULD sign using rsa-sha256. 556 INFORMATIVE NOTE: Although sha256 is strongly encouraged, some 557 senders of low-security messages (such as routine newsletters) may 558 prefer to use sha1 because of reduced CPU requirements to compute 559 a sha1 hash. In general, sha256 should always be used whenever 560 possible. 562 3.3.1. The rsa-sha1 Signing Algorithm 564 The rsa-sha1 Signing Algorithm computes a message hash as described 565 in Section 3.7 below using SHA-1 [FIPS-180-2-2002] as the hash-alg. 566 That hash is then signed by the signer using the RSA algorithm 567 (defined in PKCS#1 version 1.5 [RFC3447]) as the crypt-alg and the 568 signer's private key. The hash MUST NOT be truncated or converted 569 into any form other than the native binary form before being signed. 570 The signing algorithm SHOULD use a public exponent of 65537. 572 3.3.2. The rsa-sha256 Signing Algorithm 574 The rsa-sha256 Signing Algorithm computes a message hash as described 575 in Section 3.7 below using SHA-256 [FIPS-180-2-2002] as the hash-alg. 576 That hash is then signed by the signer using the RSA algorithm 577 (defined in PKCS#1 version 1.5 [RFC3447]) as the crypt-alg and the 578 signer's private key. The hash MUST NOT be truncated or converted 579 into any form other than the native binary form before being signed. 581 3.3.3. Key Sizes 583 Selecting appropriate key sizes is a trade-off between cost, 584 performance, and risk. Since short RSA keys more easily succumb to 585 off-line attacks, signers MUST use RSA keys of at least 1024 bits for 586 long-lived keys. Verifiers MUST be able to validate signatures with 587 keys ranging from 512 bits to 2048 bits, and they MAY be able to 588 validate signatures with larger keys. Verifier policies may use the 589 length of the signing key as one metric for determining whether a 590 signature is acceptable. 592 Factors that should influence the key size choice include the 593 following: 595 o The practical constraint that large (e.g., 4096 bit) keys may not 596 fit within a 512-byte DNS UDP response packet 598 o The security constraint that keys smaller than 1024 bits are 599 subject to off-line attacks 601 o Larger keys impose higher CPU costs to verify and sign email 603 o Keys can be replaced on a regular basis, thus their lifetime can 604 be relatively short 606 o The security goals of this specification are modest compared to 607 typical goals of other systems that employ digital signatures 609 See [RFC3766] for further discussion on selecting key sizes. 611 3.3.4. Other Algorithms 613 Other algorithms MAY be defined in the future. Verifiers MUST ignore 614 any signatures using algorithms that they do not implement. 616 3.4. Canonicalization 618 Some mail systems modify email in transit, potentially invalidating a 619 signature. For most signers, mild modification of email is 620 immaterial to validation of the DKIM domain name's use. For such 621 signers, a canonicalization algorithm that survives modest in-transit 622 modification is preferred. 624 Other signers demand that any modification of the email, however 625 minor, result in a signature verification failure. These signers 626 prefer a canonicalization algorithm that does not tolerate in-transit 627 modification of the signed email. 629 Some signers may be willing to accept modifications to header fields 630 that are within the bounds of email standards such as [RFC5322], but 631 are unwilling to accept any modification to the body of messages. 633 To satisfy all requirements, two canonicalization algorithms are 634 defined for each of the header and the body: a "simple" algorithm 635 that tolerates almost no modification and a "relaxed" algorithm that 636 tolerates common modifications such as whitespace replacement and 637 header field line rewrapping. A signer MAY specify either algorithm 638 for header or body when signing an email. If no canonicalization 639 algorithm is specified by the signer, the "simple" algorithm defaults 640 for both header and body. Verifiers MUST implement both 641 canonicalization algorithms. Note that the header and body may use 642 different canonicalization algorithms. Further canonicalization 643 algorithms MAY be defined in the future; verifiers MUST ignore any 644 signatures that use unrecognized canonicalization algorithms. 646 Canonicalization simply prepares the email for presentation to the 647 signing or verification algorithm. It MUST NOT change the 648 transmitted data in any way. Canonicalization of header fields and 649 body are described below. 651 NOTE: This section assumes that the message is already in "network 652 normal" format (text is ASCII encoded, lines are separated with CRLF 653 characters, etc.). See also Section 5.3 for information about 654 normalizing the message. 656 3.4.1. The "simple" Header Canonicalization Algorithm 658 The "simple" header canonicalization algorithm does not change header 659 fields in any way. Header fields MUST be presented to the signing or 660 verification algorithm exactly as they are in the message being 661 signed or verified. In particular, header field names MUST NOT be 662 case folded and whitespace MUST NOT be changed. 664 3.4.2. The "relaxed" Header Canonicalization Algorithm 666 The "relaxed" header canonicalization algorithm MUST apply the 667 following steps in order: 669 o Convert all header field names (not the header field values) to 670 lowercase. For example, convert "SUBJect: AbC" to "subject: AbC". 672 o Unfold all header field continuation lines as described in 673 [RFC5322]; in particular, lines with terminators embedded in 674 continued header field values (that is, CRLF sequences followed by 675 WSP) MUST be interpreted without the CRLF. Implementations MUST 676 NOT remove the CRLF at the end of the header field value. 678 o Convert all sequences of one or more WSP characters to a single SP 679 character. WSP characters here include those before and after a 680 line folding boundary. 682 o Delete all WSP characters at the end of each unfolded header field 683 value. 685 o Delete any WSP characters remaining before and after the colon 686 separating the header field name from the header field value. The 687 colon separator MUST be retained. 689 3.4.3. The "simple" Body Canonicalization Algorithm 691 The "simple" body canonicalization algorithm ignores all empty lines 692 at the end of the message body. An empty line is a line of zero 693 length after removal of the line terminator. If there is no body or 694 no trailing CRLF on the message body, a CRLF is added. It makes no 695 other changes to the message body. In more formal terms, the 696 "simple" body canonicalization algorithm converts "0*CRLF" at the end 697 of the body to a single "CRLF". 699 Note that a completely empty or missing body is canonicalized as a 700 single "CRLF"; that is, the canonicalized length will be 2 octets. 702 The sha1 value (in base64) for an empty body (canonicalized to a 703 "CRLF") is: 705 uoq1oCgLlTqpdDX/iUbLy7J1Wic= 706 The sha256 value is: 707 frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN/XKdLCPjaYaY= 709 3.4.4. The "relaxed" Body Canonicalization Algorithm 711 The "relaxed" body canonicalization algorithm MUST apply the 712 following steps (a) and (b) in order: 714 a. Reduce whitespace: 716 * Ignore all whitespace at the end of lines. Implementations 717 MUST NOT remove the CRLF at the end of the line. 719 * Reduce all sequences of WSP within a line to a single SP 720 character. 722 b. Ignore all empty lines at the end of the message body. "Empty 723 line" is defined in Section 3.4.3. If the body is non-empty, but 724 does not end with a CRLF, a CRLF is added. (For email, this is 725 only possible when using extensions to SMTP or non-SMTP transport 726 mechanisms.) 728 The sha1 value (in base64) for an empty body (canonicalized to a null 729 input) is: 730 2jmj7l5rSw0yVb/vlWAYkK/YBwk= 731 The sha256 value is: 732 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= 734 INFORMATIVE NOTE: It should be noted that the relaxed body 735 canonicalization algorithm may enable certain types of extremely 736 crude "ASCII Art" attacks where a message may be conveyed by 737 adjusting the spacing between words. If this is a concern, the 738 "simple" body canonicalization algorithm should be used instead. 740 3.4.5. Body Length Limits 742 A body length count MAY be specified to limit the signature 743 calculation to an initial prefix of the body text, measured in 744 octets. If the body length count is not specified, the entire 745 message body is signed. 747 INFORMATIVE RATIONALE: This capability is provided because it is 748 very common for mailing lists to add trailers to messages (e.g., 749 instructions how to get off the list). Until those messages are 750 also signed, the body length count is a useful tool for the 751 verifier since it may as a matter of policy accept messages having 752 valid signatures with extraneous data. 754 INFORMATIVE IMPLEMENTATION NOTE: Using body length limits enables 755 an attack in which an attacker modifies a message to include 756 content that solely benefits the attacker. It is possible for the 757 appended content to completely replace the original content in the 758 end recipient's eyes and to defeat duplicate message detection 759 algorithms. To avoid this attack, signers should be wary of using 760 this tag, and verifiers might wish to ignore the tag or remove 761 text that appears after the specified content length, perhaps 762 based on other criteria. 764 The body length count allows the signer of a message to permit data 765 to be appended to the end of the body of a signed message. The body 766 length count MUST be calculated following the canonicalization 767 algorithm; for example, any whitespace ignored by a canonicalization 768 algorithm is not included as part of the body length count. Signers 769 of MIME messages that include a body length count SHOULD be sure that 770 the length extends to the closing MIME boundary string. 772 INFORMATIVE IMPLEMENTATION NOTE: A signer wishing to ensure that 773 the only acceptable modifications are to add to the MIME postlude 774 would use a body length count encompassing the entire final MIME 775 boundary string, including the final "--CRLF". A signer wishing 776 to allow additional MIME parts but not modification of existing 777 parts would use a body length count extending through the final 778 MIME boundary string, omitting the final "--CRLF". Note that this 779 only works for some MIME types, e.g., multipart/mixed but not 780 multipart/signed. 782 A body length count of zero means that the body is completely 783 unsigned. 785 Signers wishing to ensure that no modification of any sort can occur 786 should specify the "simple" canonicalization algorithm for both 787 header and body and omit the body length count. 789 3.4.6. Canonicalization Examples (INFORMATIVE) 791 In the following examples, actual whitespace is used only for 792 clarity. The actual input and output text is designated using 793 bracketed descriptors: "" for a space character, "" for a 794 tab character, and "" for a carriage-return/line-feed sequence. 795 For example, "X Y" and "XY" represent the same three 796 characters. 798 Example 1: A message reading: 799 A: X 800 B : Y 801 Z 802 803 C 804 D E 805 806 808 when canonicalized using relaxed canonicalization for both header and 809 body results in a header reading: 810 a:X 811 b:Y Z 813 and a body reading: 814 C 815 D E 817 Example 2: The same message canonicalized using simple 818 canonicalization for both header and body results in a header 819 reading: 820 A: X 821 B : Y 822 Z 824 and a body reading: 825 C 826 D E 828 Example 3: When processed using relaxed header canonicalization and 829 simple body canonicalization, the canonicalized version has a header 830 of: 831 a:X 832 b:Y Z 834 and a body reading: 835 C 836 D E 838 3.5. The DKIM-Signature Header Field 840 The signature of the email is stored in the DKIM-Signature header 841 field. This header field contains all of the signature and key- 842 fetching data. The DKIM-Signature value is a tag-list as described 843 in Section 3.2. 845 The DKIM-Signature header field SHOULD be treated as though it were a 846 trace header field as defined in Section 3.6 of [RFC5322], and hence 847 SHOULD NOT be reordered and SHOULD be prepended to the message. 849 The DKIM-Signature header field being created or verified is always 850 included in the signature calculation, after the rest of the header 851 fields being signed; however, when calculating or verifying the 852 signature, the value of the "b=" tag (signature value) of that DKIM- 853 Signature header field MUST be treated as though it were an empty 854 string. Unknown tags in the DKIM-Signature header field MUST be 855 included in the signature calculation but MUST be otherwise ignored 856 by verifiers. Other DKIM-Signature header fields that are included 857 in the signature should be treated as normal header fields; in 858 particular, the "b=" tag is not treated specially. 860 The encodings for each field type are listed below. Tags described 861 as qp-section are encoded as described in Section 6.7 of MIME Part 862 One [RFC2045], with the additional conversion of semicolon characters 863 to "=3B"; intuitively, this is one line of quoted-printable encoded 864 text. The dkim-quoted-printable syntax is defined in Section 2.11. 866 Tags on the DKIM-Signature header field along with their type and 867 requirement status are shown below. Unrecognized tags MUST be 868 ignored. 870 v= Version (MUST be included). This tag defines the version of this 871 specification that applies to the signature record. It MUST have 872 the value "1". Note that verifiers must do a string comparison on 873 this value; for example, "1" is not the same as "1.0". 875 ABNF: 876 sig-v-tag = %x76 [FWS] "=" [FWS] "1" 878 INFORMATIVE NOTE: DKIM-Signature version numbers are expected 879 to increase arithmetically as new versions of this 880 specification are released. 882 a= The algorithm used to generate the signature (plain-text; 883 REQUIRED). Verifiers MUST support "rsa-sha1" and "rsa-sha256"; 884 signers SHOULD sign using "rsa-sha256". See Section 3.3 for a 885 description of algorithms. 887 ABNF: 888 a-tag = %x61 [FWS] "=" [FWS] sig-a-tag-alg 889 sig-a-tag-alg = sig-a-tag-k "-" sig-a-tag-h 890 sig-a-tag-k = "rsa" / x-sig-a-tag-k 891 sig-a-tag-h = "sha1" / "sha256" / x-sig-a-tag-h 892 x-sig-a-tag-k = ALPHA *(ALPHA / DIGIT) ; for later extension 893 x-sig-a-tag-h = ALPHA *(ALPHA / DIGIT) ; for later extension 895 b= The signature data (base64; REQUIRED). Whitespace is ignored in 896 this value and MUST be ignored when reassembling the original 897 signature. In particular, the signing process can safely insert 898 FWS in this value in arbitrary places to conform to line-length 899 limits. See Signer Actions Section 5 for how the signature is 900 computed. 902 ABNF: 903 sig-b-tag = %x62 [FWS] "=" [FWS] sig-b-tag-data 904 sig-b-tag-data = base64string 906 bh= The hash of the canonicalized body part of the message as 907 limited by the "l=" tag (base64; REQUIRED). Whitespace is ignored 908 in this value and MUST be ignored when reassembling the original 909 signature. In particular, the signing process can safely insert 910 FWS in this value in arbitrary places to conform to line-length 911 limits. See Section 3.7 for how the body hash is computed. 913 ABNF: 914 sig-bh-tag = %x62 %x68 [FWS] "=" [FWS] sig-bh-tag-data 915 sig-bh-tag-data = base64string 917 c= Message canonicalization (plain-text; OPTIONAL, default is 918 "simple/simple"). This tag informs the verifier of the type of 919 canonicalization used to prepare the message for signing. It 920 consists of two names separated by a "slash" (%d47) character, 921 corresponding to the header and body canonicalization algorithms 922 respectively. These algorithms are described in Section 3.4. If 923 only one algorithm is named, that algorithm is used for the header 924 and "simple" is used for the body. For example, "c=relaxed" is 925 treated the same as "c=relaxed/simple". 927 ABNF: 928 sig-c-tag = %x63 [FWS] "=" [FWS] sig-c-tag-alg 929 ["/" sig-c-tag-alg] 930 sig-c-tag-alg = "simple" / "relaxed" / x-sig-c-tag-alg 931 x-sig-c-tag-alg = hyphenated-word ; for later extension 933 d= Specifies the SDID claiming responsibility for an introduction of 934 a message into the mail stream (plain-text; REQUIRED). Hence, the 935 SDID value is used to form the query for the public key. The SDID 936 MUST correspond to a valid DNS name under which the DKIM key 937 record is published. The conventions and semantics used by a 938 signer to create and use a specific SDID are outside the scope of 939 the DKIM Signing specification, as is any use of those conventions 940 and semantics. When presented with a signature that does not meet 941 these requirements, verifiers MUST consider the signature invalid. 943 Internationalized domain names MUST be encoded as described in 944 [RFC3490]. 946 ABNF: 948 sig-d-tag = %x64 [FWS] "=" [FWS] domain-name 949 domain-name = sub-domain 1*("." sub-domain) 950 ; from RFC 5321 Domain, but excluding address-literall 952 h= Signed header fields (plain-text, but see description; REQUIRED). 953 A colon-separated list of header field names that identify the 954 header fields presented to the signing algorithm. The field MUST 955 contain the complete list of header fields in the order presented 956 to the signing algorithm. The field MAY contain names of header 957 fields that do not exist when signed; nonexistent header fields do 958 not contribute to the signature computation (that is, they are 959 treated as the null input, including the header field name, the 960 separating colon, the header field value, and any CRLF 961 terminator). The field MUST NOT include the DKIM-Signature header 962 field that is being created or verified, but may include others. 964 Folding whitespace (FWS) MAY be included on either side of the 965 colon separator. Header field names MUST be compared against 966 actual header field names in a case-insensitive manner. This list 967 MUST NOT be empty. See Section 5.4 for a discussion of choosing 968 header fields to sign. 970 ABNF: 971 sig-h-tag = %x68 [FWS] "=" [FWS] hdr-name 972 0*( [FWS] ":" [FWS] hdr-name ) 974 INFORMATIVE EXPLANATION: By "signing" header fields that do not 975 actually exist, a signer can prevent insertion of those header 976 fields before verification. However, since a signer cannot 977 possibly know what header fields might be created in the 978 future, and that some MUAs might present header fields that are 979 embedded inside a message (e.g., as a message/rfc822 content 980 type), the security of this solution is not total. 982 INFORMATIVE EXPLANATION: The exclusion of the header field name 983 and colon as well as the header field value for non-existent 984 header fields prevents an attacker from inserting an actual 985 header field with a null value. 987 i= The Agent or User Identifier (AUID) on behalf of which the SDID is 988 taking responsibility (dkim-quoted-printable; OPTIONAL, default is 989 an empty Local-part followed by an "@" followed by the domain from 990 the "d=" tag). 992 The syntax is a standard email address where the Local-part MAY be 993 omitted. The domain part of the address MUST be the same as, or a 994 subdomain of the value of, the "d=" tag. 996 Internationalized domain names MUST be converted using the steps 997 listed in Section 4 of [RFC3490] using the "ToASCII" function. 999 ABNF: 1001 sig-i-tag = %x69 [FWS] "=" [FWS] [ Local-part ] 1002 "@" domain-name 1004 The AUID is specified as having the same syntax as an email 1005 address, but is not required to have the same semantics. Notably, 1006 the domain name is not required to be registered in the DNS -- so 1007 it might not resolve in a query -- and the Local-part MAY be drawn 1008 from a namespace unrelated to any mailbox. The details of the 1009 structure and semantics for the namespace are determined by the 1010 Signer. Any knowledge or use of those details by verifiers or 1011 assessors is outside the scope of the DKIM Signing specification. 1012 The Signer MAY choose to use the same namespace for its AUIDs as 1013 its users' email addresses or MAY choose other means of 1014 representing its users. However, the signer SHOULD use the same 1015 AUID for each message intended to be evaluated as being within the 1016 same sphere of responsibility, if it wishes to offer receivers the 1017 option of using the AUID as a stable identifier that is finer 1018 grained than the SDID. 1020 INFORMATIVE NOTE: The Local-part of the "i=" tag is optional 1021 because, in some cases, a signer may not be able to establish a 1022 verified individual identity. In such cases, the signer might 1023 wish to assert that although it is willing to go as far as 1024 signing for the domain, it is unable or unwilling to commit to 1025 an individual user name within their domain. It can do so by 1026 including the domain part but not the Local-part of the 1027 identity. 1029 INFORMATIVE DISCUSSION: This specification does not require the 1030 value of the "i=" tag to match the identity in any message 1031 header fields. This is considered to be a verifier policy 1032 issue. Constraints between the value of the "i=" tag and other 1033 identities in other header fields seek to apply basic 1034 authentication into the semantics of trust associated with a 1035 role such as content author. Trust is a broad and complex 1036 topic and trust mechanisms are subject to highly creative 1037 attacks. The real-world efficacy of any but the most basic 1038 bindings between the "i=" value and other identities is not 1039 well established, nor is its vulnerability to subversion by an 1040 attacker. Hence reliance on the use of these options should be 1041 strictly limited. In particular, it is not at all clear to 1042 what extent a typical end-user recipient can rely on any 1043 assurances that might be made by successful use of the "i=" 1044 options. 1046 l= Body length count (plain-text unsigned decimal integer; OPTIONAL, 1047 default is entire body). This tag informs the verifier of the 1048 number of octets in the body of the email after canonicalization 1049 included in the cryptographic hash, starting from 0 immediately 1050 following the CRLF preceding the body. This value MUST NOT be 1051 larger than the actual number of octets in the canonicalized 1052 message body. 1054 INFORMATIVE IMPLEMENTATION WARNING: Use of the "l=" tag might 1055 allow display of fraudulent content without appropriate warning 1056 to end users. The "l=" tag is intended for increasing 1057 signature robustness when sending to mailing lists that both 1058 modify their content and do not sign their messages. However, 1059 using the "l=" tag enables attacks in which an intermediary 1060 with malicious intent modifies a message to include content 1061 that solely benefits the attacker. It is possible for the 1062 appended content to completely replace the original content in 1063 the end recipient's eyes and to defeat duplicate message 1064 detection algorithms. Examples are described in Security 1065 Considerations Section 8. To avoid this attack, signers should 1066 be extremely wary of using this tag, and verifiers might wish 1067 to ignore the tag or remove text that appears after the 1068 specified content length. 1070 INFORMATIVE NOTE: The value of the "l=" tag is constrained to 1071 76 decimal digits. This constraint is not intended to predict 1072 the size of future messages or to require implementations to 1073 use an integer representation large enough to represent the 1074 maximum possible value, but is intended to remind the 1075 implementer to check the length of this and all other tags 1076 during verification and to test for integer overflow when 1077 decoding the value. Implementers may need to limit the actual 1078 value expressed to a value smaller than 10^76, e.g., to allow a 1079 message to fit within the available storage space. 1081 ABNF: 1082 sig-l-tag = %x6c [FWS] "=" [FWS] 1083 1*76DIGIT 1085 q= A colon-separated list of query methods used to retrieve the 1086 public key (plain-text; OPTIONAL, default is "dns/txt"). Each 1087 query method is of the form "type[/options]", where the syntax and 1088 semantics of the options depend on the type and specified options. 1089 If there are multiple query mechanisms listed, the choice of query 1090 mechanism MUST NOT change the interpretation of the signature. 1091 Implementations MUST use the recognized query mechanisms in the 1092 order presented. Unrecognized query mechanisms MUST be ignored. 1094 Currently, the only valid value is "dns/txt", which defines the 1095 DNS TXT record lookup algorithm described elsewhere in this 1096 document. The only option defined for the "dns" query type is 1097 "txt", which MUST be included. Verifiers and signers MUST support 1098 "dns/txt". 1100 ABNF: 1101 sig-q-tag = %x71 [FWS] "=" [FWS] sig-q-tag-method 1102 *([FWS] ":" [FWS] sig-q-tag-method) 1103 sig-q-tag-method = "dns/txt" / x-sig-q-tag-type 1104 ["/" x-sig-q-tag-args] 1105 x-sig-q-tag-type = hyphenated-word ; for future extension 1106 x-sig-q-tag-args = qp-hdr-value 1108 s= The selector subdividing the namespace for the "d=" (domain) tag 1109 (plain-text; REQUIRED). 1111 ABNF: 1112 sig-s-tag = %x73 [FWS] "=" [FWS] selector 1114 t= Signature Timestamp (plain-text unsigned decimal integer; 1115 RECOMMENDED, default is an unknown creation time). The time that 1116 this signature was created. The format is the number of seconds 1117 since 00:00:00 on January 1, 1970 in the UTC time zone. The value 1118 is expressed as an unsigned integer in decimal ASCII. This value 1119 is not constrained to fit into a 31- or 32-bit integer. 1120 Implementations SHOULD be prepared to handle values up to at least 1121 10^12 (until approximately AD 200,000; this fits into 40 bits). 1122 To avoid denial-of-service attacks, implementations MAY consider 1123 any value longer than 12 digits to be infinite. Leap seconds are 1124 not counted. Implementations MAY ignore signatures that have a 1125 timestamp in the future. 1127 ABNF: 1128 sig-t-tag = %x74 [FWS] "=" [FWS] 1*12DIGIT 1129 x= Signature Expiration (plain-text unsigned decimal integer; 1130 RECOMMENDED, default is no expiration). The format is the same as 1131 in the "t=" tag, represented as an absolute date, not as a time 1132 delta from the signing timestamp. The value is expressed as an 1133 unsigned integer in decimal ASCII, with the same constraints on 1134 the value in the "t=" tag. Signatures MAY be considered invalid 1135 if the verification time at the verifier is past the expiration 1136 date. The verification time should be the time that the message 1137 was first received at the administrative domain of the verifier if 1138 that time is reliably available; otherwise the current time should 1139 be used. The value of the "x=" tag MUST be greater than the value 1140 of the "t=" tag if both are present. 1142 INFORMATIVE NOTE: The "x=" tag is not intended as an anti- 1143 replay defense. 1145 INFORMATIVE NOTE: Due to clock drift, the receiver's notion of 1146 when to consider the signature expired may not match exactly 1147 when the sender is expecting. Receivers MAY add a 'fudge 1148 factor' to allow for such possible drift. 1150 ABNF: 1151 sig-x-tag = %x78 [FWS] "=" [FWS] 1152 1*12DIGIT 1154 z= Copied header fields (dkim-quoted-printable, but see description; 1155 OPTIONAL, default is null). A vertical-bar-separated list of 1156 selected header fields present when the message was signed, 1157 including both the field name and value. It is not required to 1158 include all header fields present at the time of signing. This 1159 field need not contain the same header fields listed in the "h=" 1160 tag. The header field text itself must encode the vertical bar 1161 ("|", %x7C) character (i.e., vertical bars in the "z=" text are 1162 meta-characters, and any actual vertical bar characters in a 1163 copied header field must be encoded). Note that all whitespace 1164 must be encoded, including whitespace between the colon and the 1165 header field value. After encoding, FWS MAY be added at arbitrary 1166 locations in order to avoid excessively long lines; such 1167 whitespace is NOT part of the value of the header field, and MUST 1168 be removed before decoding. 1170 The header fields referenced by the "h=" tag refer to the fields 1171 in the [RFC5322] header of the message, not to any copied fields 1172 in the "z=" tag. Copied header field values are for diagnostic 1173 use. 1175 Header fields with characters requiring conversion (perhaps from 1176 legacy MTAs that are not [RFC5322] compliant) SHOULD be converted 1177 as described in MIME Part Three [RFC2047]. 1179 ABNF: 1180 sig-z-tag = %x7A [FWS] "=" [FWS] sig-z-tag-copy 1181 *( "|" [FWS] sig-z-tag-copy ) 1182 sig-z-tag-copy = hdr-name [FWS] ":" qp-hdr-value 1184 INFORMATIVE EXAMPLE of a signature header field spread across 1185 multiple continuation lines: 1186 DKIM-Signature: v=1; a=rsa-sha256; d=example.net; s=brisbane; 1187 c=simple; q=dns/txt; i=@eng.example.net; 1188 t=1117574938; x=1118006938; 1189 h=from:to:subject:date; 1190 z=From:foo@eng.example.net|To:joe@example.com| 1191 Subject:demo=20run|Date:July=205,=202005=203:44:08=20PM=20-0700; 1192 bh=MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=; 1193 b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZVoG4ZHRNiYzR 1195 3.6. Key Management and Representation 1197 Signature applications require some level of assurance that the 1198 verification public key is associated with the claimed signer. Many 1199 applications achieve this by using public key certificates issued by 1200 a trusted third party. However, DKIM can achieve a sufficient level 1201 of security, with significantly enhanced scalability, by simply 1202 having the verifier query the purported signer's DNS entry (or some 1203 security-equivalent) in order to retrieve the public key. 1205 DKIM keys can potentially be stored in multiple types of key servers 1206 and in multiple formats. The storage and format of keys are 1207 irrelevant to the remainder of the DKIM algorithm. 1209 Parameters to the key lookup algorithm are the type of the lookup 1210 (the "q=" tag), the domain of the signer (the "d=" tag of the DKIM- 1211 Signature header field), and the selector (the "s=" tag). 1213 public_key = dkim_find_key(q_val, d_val, s_val) 1215 This document defines a single binding, using DNS TXT records to 1216 distribute the keys. Other bindings may be defined in the future. 1218 3.6.1. Textual Representation 1220 It is expected that many key servers will choose to present the keys 1221 in an otherwise unstructured text format (for example, an XML form 1222 would not be considered to be unstructured text for this purpose). 1223 The following definition MUST be used for any DKIM key represented in 1224 an otherwise unstructured textual form. 1226 The overall syntax is a tag-list as described in Section 3.2. The 1227 current valid tags are described below. Other tags MAY be present 1228 and MUST be ignored by any implementation that does not understand 1229 them. 1231 v= Version of the DKIM key record (plain-text; RECOMMENDED, default 1232 is "DKIM1"). If specified, this tag MUST be set to "DKIM1" 1233 (without the quotes). This tag MUST be the first tag in the 1234 record. Records beginning with a "v=" tag with any other value 1235 MUST be discarded. Note that verifiers must do a string 1236 comparison on this value; for example, "DKIM1" is not the same as 1237 "DKIM1.0". 1239 ABNF: 1240 key-v-tag = %x76 [FWS] "=" [FWS] %x44 %x4B %x49 %x4D %x31 1242 g= Granularity of the key (plain-text; OPTIONAL, default is "*"). 1243 This value MUST match the Local-part of the "i=" tag of the DKIM- 1244 Signature header field (or its default value of the empty string 1245 if "i=" is not specified), with a single, optional "*" character 1246 matching a sequence of zero or more arbitrary characters 1247 ("wildcarding"). An email with a signing address that does not 1248 match the value of this tag constitutes a failed verification. 1249 The intent of this tag is to constrain which signing address can 1250 legitimately use this selector, for example, when delegating a key 1251 to a third party that should only be used for special purposes. 1252 Wildcarding allows matching for addresses such as "user+*", 1253 "*-offer" or "foo*bar". An empty "g=" value never matches any 1254 addresses. 1256 ABNF: 1257 key-g-tag = %x67 [FWS] "=" [FWS] key-g-tag-lpart 1258 key-g-tag-lpart = [dot-atom-text] ["*" [dot-atom-text] ] 1260 h= Acceptable hash algorithms (plain-text; OPTIONAL, defaults to 1261 allowing all algorithms). A colon-separated list of hash 1262 algorithms that might be used. Signers and Verifiers MUST support 1263 the "sha256" hash algorithm. Verifiers MUST also support the 1264 "sha1" hash algorithm. Unrecognized hash algorithms MUST be 1265 ignored. 1267 ABNF: 1268 key-h-tag = %x68 [FWS] "=" [FWS] key-h-tag-alg 1269 0*( [FWS] ":" [FWS] key-h-tag-alg ) 1270 key-h-tag-alg = "sha1" / "sha256" / x-key-h-tag-alg 1271 x-key-h-tag-alg = hyphenated-word ; for future extension 1273 k= Key type (plain-text; OPTIONAL, default is "rsa"). Signers and 1274 verifiers MUST support the "rsa" key type. The "rsa" key type 1275 indicates that an ASN.1 DER-encoded [ITU-X660-1997] RSAPublicKey 1276 [RFC3447] (see Sections Section 3.1 and A.1.1) is being used in 1277 the "p=" tag. (Note: the "p=" tag further encodes the value using 1278 the base64 algorithm.) Unrecognized key types MUST be ignored. 1280 ABNF: 1281 key-k-tag = %x76 [FWS] "=" [FWS] key-k-tag-type 1282 key-k-tag-type = "rsa" / x-key-k-tag-type 1283 x-key-k-tag-type = hyphenated-word ; for future extension 1285 n= Notes that might be of interest to a human (qp-section; OPTIONAL, 1286 default is empty). No interpretation is made by any program. 1287 This tag should be used sparingly in any key server mechanism that 1288 has space limitations (notably DNS). This is intended for use by 1289 administrators, not end users. 1291 ABNF: 1292 key-n-tag = %x6e [FWS] "=" [FWS] qp-section 1294 p= Public-key data (base64; REQUIRED). An empty value means that 1295 this public key has been revoked. The syntax and semantics of 1296 this tag value before being encoded in base64 are defined by the 1297 "k=" tag. 1299 INFORMATIVE RATIONALE: If a private key has been compromised or 1300 otherwise disabled (e.g., an outsourcing contract has been 1301 terminated), a signer might want to explicitly state that it 1302 knows about the selector, but all messages using that selector 1303 should fail verification. Verifiers should ignore any DKIM- 1304 Signature header fields with a selector referencing a revoked 1305 key. 1307 ABNF: 1308 key-p-tag = %x70 [FWS] "=" [ [FWS] base64string] 1310 INFORMATIVE NOTE: A base64string is permitted to include white 1311 space (FWS) at arbitrary places; however, any CRLFs must be 1312 followed by at least one WSP character. Implementors and 1313 administrators are cautioned to ensure that selector TXT 1314 records conform to this specification. 1316 s= Service Type (plain-text; OPTIONAL; default is "*"). A colon- 1317 separated list of service types to which this record applies. 1318 Verifiers for a given service type MUST ignore this record if the 1319 appropriate type is not listed. Unrecognized service types MUST 1320 be ignored. Currently defined service types are as follows: 1322 * matches all service types 1324 email electronic mail (not necessarily limited to SMTP) 1326 This tag is intended to constrain the use of keys for other 1327 purposes, should use of DKIM be defined by other services in the 1328 future. 1330 ABNF: 1331 key-s-tag = %x73 [FWS] "=" [FWS] key-s-tag-type 1332 0*( [FWS] ":" [FWS] key-s-tag-type ) 1333 key-s-tag-type = "email" / "*" / x-key-s-tag-type 1334 x-key-s-tag-type = hyphenated-word ; for future extension 1336 t= Flags, represented as a colon-separated list of names (plain- 1337 text; OPTIONAL, default is no flags set). Unrecognized flags MUST 1338 be ignored. The defined flags are as follows: 1340 y This domain is testing DKIM. Verifiers MUST NOT treat messages 1341 from signers in testing mode differently from unsigned email, even 1342 should the signature fail to verify. Verifiers MAY wish to track 1343 testing mode results to assist the signer. 1345 s Any DKIM-Signature header fields using the "i=" tag MUST have the 1346 same domain value on the right-hand side of the "@" in the "i=" 1347 tag and the value of the "d=" tag. That is, the "i=" domain MUST 1348 NOT be a subdomain of "d=". Use of this flag is RECOMMENDED 1349 unless subdomaining is required. 1351 ABNF: 1352 key-t-tag = %x74 [FWS] "=" [FWS] key-t-tag-flag 1353 0*( [FWS] ":" [FWS] key-t-tag-flag ) 1354 key-t-tag-flag = "y" / "s" / x-key-t-tag-flag 1355 x-key-t-tag-flag = hyphenated-word ; for future extension 1357 Unrecognized flags MUST be ignored. 1359 3.6.1.1. Compatibility Note for DomainKeys 1361 If a v= value is not found at the beginning of the DKIM key record, 1362 the key record MAY be interpreted as for DomainKeys [RFC4870]. The 1363 definition given here is upwardly compatible with what is used for 1364 DomainKeys, with the exception of the "g=" value. In a DomainKeys 1365 key record, an empty "g=" value would be interpreted as being 1366 equivalent to DKIM's "g=*". 1368 3.6.2. DNS Binding 1370 A binding using DNS TXT records as a key service is hereby defined. 1371 All implementations MUST support this binding. 1373 3.6.2.1. Namespace 1375 All DKIM keys are stored in a subdomain named "_domainkey". Given a 1376 DKIM-Signature field with a "d=" tag of "example.com" and an "s=" tag 1377 of "foo.bar", the DNS query will be for 1378 "foo.bar._domainkey.example.com". 1380 INFORMATIVE OPERATIONAL NOTE: Wildcard DNS records (e.g., 1381 *.bar._domainkey.example.com) do not make sense in this context 1382 and should not be used. Note also that wildcards within domains 1383 (e.g., s._domainkey.*.example.com) are not supported by the DNS. 1385 3.6.2.2. Resource Record Types for Key Storage 1387 The DNS Resource Record type used is specified by an option to the 1388 query-type ("q=") tag. The only option defined in this base 1389 specification is "txt", indicating the use of a TXT Resource Record 1390 (RR). A later extension of this standard may define another RR type. 1392 Strings in a TXT RR MUST be concatenated together before use with no 1393 intervening whitespace. TXT RRs MUST be unique for a particular 1394 selector name; that is, if there are multiple records in an RRset, 1395 the results are undefined. 1397 TXT RRs are encoded as described in Section 3.6.1 1399 3.7. Computing the Message Hashes 1401 Both signing and verifying message signatures start with a step of 1402 computing two cryptographic hashes over the message. Signers will 1403 choose the parameters of the signature as described in Signer Actions 1404 Section 5; verifiers will use the parameters specified in the DKIM- 1405 Signature header field being verified. In the following discussion, 1406 the names of the tags in the DKIM-Signature header field that either 1407 exists (when verifying) or will be created (when signing) are used. 1408 Note that canonicalization (Section 3.4) is only used to prepare the 1409 email for signing or verifying; it does not affect the transmitted 1410 email in any way. 1412 The signer/verifier MUST compute two hashes, one over the body of the 1413 message and one over the selected header fields of the message. 1415 Signers MUST compute them in the order shown. Verifiers MAY compute 1416 them in any order convenient to the verifier, provided that the 1417 result is semantically identical to the semantics that would be the 1418 case had they been computed in this order. 1420 In hash step 1, the signer/verifier MUST hash the message body, 1421 canonicalized using the body canonicalization algorithm specified in 1422 the "c=" tag and then truncated to the length specified in the "l=" 1423 tag. That hash value is then converted to base64 form and inserted 1424 into (signers) or compared to (verifiers) the "bh=" tag of the DKIM- 1425 Signature header field. 1427 In hash step 2, the signer/verifier MUST pass the following to the 1428 hash algorithm in the indicated order. 1430 1. The header fields specified by the "h=" tag, in the order 1431 specified in that tag, and canonicalized using the header 1432 canonicalization algorithm specified in the "c=" tag. Each 1433 header field MUST be terminated with a single CRLF. 1435 2. The DKIM-Signature header field that exists (verifying) or will 1436 be inserted (signing) in the message, with the value of the "b=" 1437 tag (including all surrounding whitespace) deleted (i.e., treated 1438 as the empty string), canonicalized using the header 1439 canonicalization algorithm specified in the "c=" tag, and without 1440 a trailing CRLF. 1442 All tags and their values in the DKIM-Signature header field are 1443 included in the cryptographic hash with the sole exception of the 1444 value portion of the "b=" (signature) tag, which MUST be treated as 1445 the null string. All tags MUST be included even if they might not be 1446 understood by the verifier. The header field MUST be presented to 1447 the hash algorithm after the body of the message rather than with the 1448 rest of the header fields and MUST be canonicalized as specified in 1449 the "c=" (canonicalization) tag. The DKIM-Signature header field 1450 MUST NOT be included in its own h= tag, although other DKIM-Signature 1451 header fields MAY be signed (see Section 4). 1453 When calculating the hash on messages that will be transmitted using 1454 base64 or quoted-printable encoding, signers MUST compute the hash 1455 after the encoding. Likewise, the verifier MUST incorporate the 1456 values into the hash before decoding the base64 or quoted-printable 1457 text. However, the hash MUST be computed before transport level 1458 encodings such as SMTP "dot-stuffing" (the modification of lines 1459 beginning with a "." to avoid confusion with the SMTP end-of-message 1460 marker, as specified in [RFC5321]). 1462 With the exception of the canonicalization procedure described in 1463 Section 3.4, the DKIM signing process treats the body of messages as 1464 simply a string of octets. DKIM messages MAY be either in plain-text 1465 or in MIME format; no special treatment is afforded to MIME content. 1466 Message attachments in MIME format MUST be included in the content 1467 that is signed. 1469 More formally, the algorithm for the signature is as follows: 1470 body-hash = hash-alg(canon_body) 1471 header-hash = hash-alg(canon_header || DKIM-SIG) 1472 signature = sig-alg(header-hash, key) 1474 where "sig-alg" is the signature algorithm specified by the "a=" tag, 1475 "hash-alg" is the hash algorithm specified by the "a=" tag, 1476 "canon_header" and "canon_body" are the canonicalized message header 1477 and body (respectively) as defined in Section 3.4 (excluding the 1478 DKIM-Signature header field), and "DKIM-SIG" is the canonicalized 1479 DKIM-Signature header field sans the signature value itself, but with 1480 "body-hash" included as the "bh=" tag. 1482 INFORMATIVE IMPLEMENTERS' NOTE: Many digital signature APIs 1483 provide both hashing and application of the RSA private key using 1484 a single "sign()" primitive. When using such an API, the last two 1485 steps in the algorithm would probably be combined into a single 1486 call that would perform both the "hash-alg" and the "sig-alg". 1488 3.8. Signing by Parent Domains 1490 In some circumstances, it is desirable for a domain to apply a 1491 signature on behalf of any of its subdomains without the need to 1492 maintain separate selectors (key records) in each subdomain. By 1493 default, private keys corresponding to key records can be used to 1494 sign messages for any subdomain of the domain in which they reside; 1495 for example, a key record for the domain example.com can be used to 1496 verify messages where the AUID ("i=" tag of the signature) is 1497 sub.example.com, or even sub1.sub2.example.com. In order to limit 1498 the capability of such keys when this is not intended, the "s" flag 1499 MAY be set in the "t=" tag of the key record, to constrain the 1500 validity of the domain of the AUID. If the referenced key record 1501 contains the "s" flag as part of the "t=" tag, the domain of the AUID 1502 ("i=" flag) MUST be the same as that of the SDID (d=) domain. If 1503 this flag is absent, the domain of the AUID MUST be the same as, or a 1504 subdomain of, the SDID. 1506 3.9. Relationship between SDID and AUID 1508 DKIM's primary task is to communicate from the Signer to a recipient- 1509 side Identity Assessor a single Signing Domain Identifier (SDID) that 1510 refers to a responsible identity. DKIM MAY optionally provide a 1511 single responsible Agent or User Identifier (AUID). 1513 Hence, DKIM's mandatory output to a receive-side Identity Assessor is 1514 a single domain name. Within the scope of its use as DKIM output, 1515 the name hnamas only basic domain name semantics; any possible owner- 1516 specific semantics are outside the scope of DKIM. That is, within 1517 its role as a DKIM identifier, additional semantics cannot be assumed 1518 by an Identity Assessor. 1520 A receive-side DKIM verifier MUST communicate the Signing Domain 1521 Identifier (d=) to a consuming Identity Assessor module and MAY 1522 communicate the Agent or User Identifier (i=) if present. 1524 To the extent that a receiver attempts to intuit any structured 1525 semantics for either of the identifiers, this is a heuristic function 1526 that is outside the scope of DKIM's specification and semantics. 1527 Hence, it is relegated to a higher-level service, such as a delivery 1528 handling filter that integrates a variety of inputs and performs 1529 heuristic analysis of them. 1531 INFORMATIVE DISCUSSION: This document does not require the value 1532 of the SDID or AUID to match an identifier in any other message 1533 header field. This requirement is, instead, an assessor policy 1534 issue. The purpose of such a linkage would be to authenticate the 1535 value in that other header field. This, in turn, is the basis for 1536 applying a trust assessment based on the identifier value. Trust 1537 is a broad and complex topic and trust mechanisms are subject to 1538 highly creative attacks. The real-world efficacy of any but the 1539 most basic bindings between the SDID or AUID and other identities 1540 is not well established, nor is its vulnerability to subversion by 1541 an attacker. Hence, reliance on the use of such bindings should 1542 be strictly limited. In particular, it is not at all clear to 1543 what extent a typical end-user recipient can rely on any 1544 assurances that might be made by successful use of the SDID or 1545 AUID. 1547 4. Semantics of Multiple Signatures 1549 4.1. Example Scenarios 1551 There are many reasons why a message might have multiple signatures. 1552 For example, a given signer might sign multiple times, perhaps with 1553 different hashing or signing algorithms during a transition phase. 1555 INFORMATIVE EXAMPLE: Suppose SHA-256 is in the future found to be 1556 insufficiently strong, and DKIM usage transitions to SHA-1024. A 1557 signer might immediately sign using the newer algorithm, but 1558 continue to sign using the older algorithm for interoperability 1559 with verifiers that had not yet upgraded. The signer would do 1560 this by adding two DKIM-Signature header fields, one using each 1561 algorithm. Older verifiers that did not recognize SHA-1024 as an 1562 acceptable algorithm would skip that signature and use the older 1563 algorithm; newer verifiers could use either signature at their 1564 option, and all other things being equal might not even attempt to 1565 verify the other signature. 1567 Similarly, a signer might sign a message including all headers and no 1568 "l=" tag (to satisfy strict verifiers) and a second time with a 1569 limited set of headers and an "l=" tag (in anticipation of possible 1570 message modifications in route to other verifiers). Verifiers could 1571 then choose which signature they preferred. 1573 INFORMATIVE EXAMPLE: A verifier might receive a message with two 1574 signatures, one covering more of the message than the other. If 1575 the signature covering more of the message verified, then the 1576 verifier could make one set of policy decisions; if that signature 1577 failed but the signature covering less of the message verified, 1578 the verifier might make a different set of policy decisions. 1580 Of course, a message might also have multiple signatures because it 1581 passed through multiple signers. A common case is expected to be 1582 that of a signed message that passes through a mailing list that also 1583 signs all messages. Assuming both of those signatures verify, a 1584 recipient might choose to accept the message if either of those 1585 signatures were known to come from trusted sources. 1587 INFORMATIVE EXAMPLE: Recipients might choose to whitelist mailing 1588 lists to which they have subscribed and that have acceptable anti- 1589 abuse policies so as to accept messages sent to that list even 1590 from unknown authors. They might also subscribe to less trusted 1591 mailing lists (e.g., those without anti-abuse protection) and be 1592 willing to accept all messages from specific authors, but insist 1593 on doing additional abuse scanning for other messages. 1595 Another related example of multiple signers might be forwarding 1596 services, such as those commonly associated with academic alumni 1597 sites. 1599 INFORMATIVE EXAMPLE: A recipient might have an address at 1600 members.example.org, a site that has anti-abuse protection that is 1601 somewhat less effective than the recipient would prefer. Such a 1602 recipient might have specific authors whose messages would be 1603 trusted absolutely, but messages from unknown authors that had 1604 passed the forwarder's scrutiny would have only medium trust. 1606 4.2. Interpretation 1608 A signer that is adding a signature to a message merely creates a new 1609 DKIM-Signature header, using the usual semantics of the h= option. A 1610 signer MAY sign previously existing DKIM-Signature header fields 1611 using the method described in Section 5.4 to sign trace header 1612 fields. 1614 INFORMATIVE NOTE: Signers should be cognizant that signing DKIM- 1615 Signature header fields may result in signature failures with 1616 intermediaries that do not recognize that DKIM-Signature header 1617 fields are trace header fields and unwittingly reorder them, thus 1618 breaking such signatures. For this reason, signing existing DKIM- 1619 Signature header fields is unadvised, albeit legal. 1621 INFORMATIVE NOTE: If a header field with multiple instances is 1622 signed, those header fields are always signed from the bottom up. 1623 Thus, it is not possible to sign only specific DKIM-Signature 1624 header fields. For example, if the message being signed already 1625 contains three DKIM-Signature header fields A, B, and C, it is 1626 possible to sign all of them, B and C only, or C only, but not A 1627 only, B only, A and B only, or A and C only. 1629 A signer MAY add more than one DKIM-Signature header field using 1630 different parameters. For example, during a transition period a 1631 signer might want to produce signatures using two different hash 1632 algorithms. 1634 Signers SHOULD NOT remove any DKIM-Signature header fields from 1635 messages they are signing, even if they know that the signatures 1636 cannot be verified. 1638 When evaluating a message with multiple signatures, a verifier SHOULD 1639 evaluate signatures independently and on their own merits. For 1640 example, a verifier that by policy chooses not to accept signatures 1641 with deprecated cryptographic algorithms would consider such 1642 signatures invalid. Verifiers MAY process signatures in any order of 1643 their choice; for example, some verifiers might choose to process 1644 signatures corresponding to the From field in the message header 1645 before other signatures. See Section 6.1 for more information about 1646 signature choices. 1648 INFORMATIVE IMPLEMENTATION NOTE: Verifier attempts to correlate 1649 valid signatures with invalid signatures in an attempt to guess 1650 why a signature failed are ill-advised. In particular, there is 1651 no general way that a verifier can determine that an invalid 1652 signature was ever valid. 1654 Verifiers SHOULD ignore failed signatures as though they were not 1655 present in the message. Verifiers SHOULD continue to check 1656 signatures until a signature successfully verifies to the 1657 satisfaction of the verifier. To limit potential denial-of-service 1658 attacks, verifiers MAY limit the total number of signatures they will 1659 attempt to verify. 1661 5. Signer Actions 1663 The following steps are performed in order by signers. 1665 5.1. Determine Whether the Email Should Be Signed and by Whom 1667 A signer can obviously only sign email for domains for which it has a 1668 private key and the necessary knowledge of the corresponding public 1669 key and selector information. However, there are a number of other 1670 reasons beyond the lack of a private key why a signer could choose 1671 not to sign an email. 1673 INFORMATIVE NOTE: Signing modules may be incorporated into any 1674 portion of the mail system as deemed appropriate, including an 1675 MUA, a SUBMISSION server, or an MTA. Wherever implemented, 1676 signers should beware of signing (and thereby asserting 1677 responsibility for) messages that may be problematic. In 1678 particular, within a trusted enclave the signing address might be 1679 derived from the header according to local policy; SUBMISSION 1680 servers might only sign messages from users that are properly 1681 authenticated and authorized. 1683 INFORMATIVE IMPLEMENTER ADVICE: SUBMISSION servers should not sign 1684 Received header fields if the outgoing gateway MTA obfuscates 1685 Received header fields, for example, to hide the details of 1686 internal topology. 1688 If an email cannot be signed for some reason, it is a local policy 1689 decision as to what to do with that email. 1691 5.2. Select a Private Key and Corresponding Selector Information 1693 This specification does not define the basis by which a signer should 1694 choose which private key and selector information to use. Currently, 1695 all selectors are equal as far as this specification is concerned, so 1696 the decision should largely be a matter of administrative 1697 convenience. Distribution and management of private keys is also 1698 outside the scope of this document. 1700 INFORMATIVE OPERATIONS ADVICE: A signer should not sign with a 1701 private key when the selector containing the corresponding public 1702 key is expected to be revoked or removed before the verifier has 1703 an opportunity to validate the signature. The signer should 1704 anticipate that verifiers may choose to defer validation, perhaps 1705 until the message is actually read by the final recipient. In 1706 particular, when rotating to a new key pair, signing should 1707 immediately commence with the new private key and the old public 1708 key should be retained for a reasonable validation interval before 1709 being removed from the key server. 1711 5.3. Normalize the Message to Prevent Transport Conversions 1713 Some messages, particularly those using 8-bit characters, are subject 1714 to modification during transit, notably conversion to 7-bit form. 1715 Such conversions will break DKIM signatures. In order to minimize 1716 the chances of such breakage, signers SHOULD convert the message to a 1717 suitable MIME content transfer encoding such as quoted-printable or 1718 base64 as described in [RFC2045] before signing. Such conversion is 1719 outside the scope of DKIM; the actual message SHOULD be converted to 1720 7-bit MIME by an MUA or MSA prior to presentation to the DKIM 1721 algorithm. 1723 Similarly, a message that is not compliant with RFC5322, RFC2045 1724 correct or interpret such content. See Section 8 of [RFC4409] for 1725 examples of changes that are commonly made. Such "corrections" may 1726 break DKIM signatures or have other undesirable effects. Therefore, 1727 a verifier SHOULD NOT validate a message that is not conformant. 1729 If the message is submitted to the signer with any local encoding 1730 that will be modified before transmission, that modification to 1731 canonical [RFC5322] form MUST be done before signing. In particular, 1732 bare CR or LF characters (used by some systems as a local line 1733 separator convention) MUST be converted to the SMTP-standard CRLF 1734 sequence before the message is signed. Any conversion of this sort 1735 SHOULD be applied to the message actually sent to the recipient(s), 1736 not just to the version presented to the signing algorithm. 1738 More generally, the signer MUST sign the message as it is expected to 1739 be received by the verifier rather than in some local or internal 1740 form. 1742 5.4. Determine the Header Fields to Sign 1744 The From header field MUST be signed (that is, included in the "h=" 1745 tag of the resulting DKIM-Signature header field). Signers SHOULD 1746 NOT sign an existing header field likely to be legitimately modified 1747 or removed in transit. In particular, [RFC5321] explicitly permits 1748 modification or removal of the Return-Path header field in transit. 1749 Signers MAY include any other header fields present at the time of 1750 signing at the discretion of the signer. 1752 INFORMATIVE OPERATIONS NOTE: The choice of which header fields to 1753 sign is non-obvious. One strategy is to sign all existing, non- 1754 repeatable header fields. An alternative strategy is to sign only 1755 header fields that are likely to be displayed to or otherwise be 1756 likely to affect the processing of the message at the receiver. A 1757 third strategy is to sign only "well known" headers. Note that 1758 verifiers may treat unsigned header fields with extreme 1759 skepticism, including refusing to display them to the end user or 1760 even ignoring the signature if it does not cover certain header 1761 fields. For this reason, signing fields present in the message 1762 such as Date, Subject, Reply-To, Sender, and all MIME header 1763 fields are highly advised. 1765 The DKIM-Signature header field is always implicitly signed and MUST 1766 NOT be included in the "h=" tag except to indicate that other 1767 preexisting signatures are also signed. 1769 Signers MAY claim to have signed header fields that do not exist 1770 (that is, signers MAY include the header field name in the "h=" tag 1771 even if that header field does not exist in the message). When 1772 computing the signature, the non-existing header field MUST be 1773 treated as the null string (including the header field name, header 1774 field value, all punctuation, and the trailing CRLF). 1776 INFORMATIVE RATIONALE: This allows signers to explicitly assert 1777 the absence of a header field; if that header field is added later 1778 the signature will fail. 1780 INFORMATIVE NOTE: A header field name need only be listed once 1781 more than the actual number of that header field in a message at 1782 the time of signing in order to prevent any further additions. 1783 For example, if there is a single Comments header field at the 1784 time of signing, listing Comments twice in the "h=" tag is 1785 sufficient to prevent any number of Comments header fields from 1786 being appended; it is not necessary (but is legal) to list 1787 Comments three or more times in the "h=" tag. 1789 Signers choosing to sign an existing header field that occurs more 1790 than once in the message (such as Received) MUST sign the physically 1791 last instance of that header field in the header block. Signers 1792 wishing to sign multiple instances of such a header field MUST 1793 include the header field name multiple times in the h= tag of the 1794 DKIM-Signature header field, and MUST sign such header fields in 1795 order from the bottom of the header field block to the top. The 1796 signer MAY include more instances of a header field name in h= than 1797 there are actual corresponding header fields to indicate that 1798 additional header fields of that name SHOULD NOT be added. 1800 INFORMATIVE EXAMPLE: 1802 If the signer wishes to sign two existing Received header fields, 1803 and the existing header contains: 1804 Received: 1805 Received: 1806 Received: 1808 then the resulting DKIM-Signature header field should read: 1810 DKIM-Signature: ... h=Received : Received :... 1811 and Received header fields and will be signed in that 1812 order. 1814 Signers should be careful of signing header fields that might have 1815 additional instances added later in the delivery process, since such 1816 header fields might be inserted after the signed instance or 1817 otherwise reordered. Trace header fields (such as Received) and 1818 Resent-* blocks are the only fields prohibited by [RFC5322] from 1819 being reordered. In particular, since DKIM-Signature header fields 1820 may be reordered by some intermediate MTAs, signing existing DKIM- 1821 Signature header fields is error-prone. 1823 INFORMATIVE ADMONITION: Despite the fact that [RFC5322] permits 1824 header fields to be reordered (with the exception of Received 1825 header fields), reordering of signed header fields with multiple 1826 instances by intermediate MTAs will cause DKIM signatures to be 1827 broken; such anti-social behavior should be avoided. 1829 INFORMATIVE IMPLEMENTER'S NOTE: Although not required by this 1830 specification, all end-user visible header fields should be signed 1831 to avoid possible "indirect spamming". For example, if the 1832 Subject header field is not signed, a spammer can resend a 1833 previously signed mail, replacing the legitimate subject with a 1834 one-line spam. 1836 5.5. Recommended Signature Content 1838 In order to maximize compatibility with a variety of verifiers, it is 1839 recommended that signers follow the practices outlined in this 1840 section when signing a message. However, these are generic 1841 recommendations applying to the general case; specific senders may 1842 wish to modify these guidelines as required by their unique 1843 situations. Verifiers MUST be capable of verifying signatures even 1844 if one or more of the recommended header fields is not signed (with 1845 the exception of From, which must always be signed) or if one or more 1846 of the dis-recommended header fields is signed. Note that verifiers 1847 do have the option of ignoring signatures that do not cover a 1848 sufficient portion of the header or body, just as they may ignore 1849 signatures from an identity they do not trust. 1851 The following header fields SHOULD be included in the signature, if 1852 they are present in the message being signed: 1854 o From (REQUIRED in all signatures) 1856 o Sender, Reply-To 1858 o Subject 1860 o Date, Message-ID 1862 o To, Cc 1864 o MIME-Version 1866 o Content-Type, Content-Transfer-Encoding, Content-ID, Content- 1867 Description 1869 o Resent-Date, Resent-From, Resent-Sender, Resent-To, Resent-Cc, 1870 Resent-Message-ID 1872 o In-Reply-To, References 1874 o List-Id, List-Help, List-Unsubscribe, List-Subscribe, List-Post, 1875 List-Owner, List-Archive 1877 The following header fields SHOULD NOT be included in the signature: 1879 o Return-Path 1881 o Received 1883 o Comments, Keywords 1885 o Bcc, Resent-Bcc 1887 o DKIM-Signature 1889 Optional header fields (those not mentioned above) normally SHOULD 1890 NOT be included in the signature, because of the potential for 1891 additional header fields of the same name to be legitimately added or 1892 reordered prior to verification. There are likely to be legitimate 1893 exceptions to this rule, because of the wide variety of application- 1894 specific header fields that may be applied to a message, some of 1895 which are unlikely to be duplicated, modified, or reordered. 1897 Signers SHOULD choose canonicalization algorithms based on the types 1898 of messages they process and their aversion to risk. For example, 1899 e-commerce sites sending primarily purchase receipts, which are not 1900 expected to be processed by mailing lists or other software likely to 1901 modify messages, will generally prefer "simple" canonicalization. 1902 Sites sending primarily person-to-person email will likely prefer to 1903 be more resilient to modification during transport by using "relaxed" 1904 canonicalization. 1906 Signers SHOULD NOT use "l=" unless they intend to accommodate 1907 intermediate mail processors that append text to a message. For 1908 example, many mailing list processors append "unsubscribe" 1909 information to message bodies. If signers use "l=", they SHOULD 1910 include the entire message body existing at the time of signing in 1911 computing the count. In particular, signers SHOULD NOT specify a 1912 body length of 0 since this may be interpreted as a meaningless 1913 signature by some verifiers. 1915 5.6. Compute the Message Hash and Signature 1917 The signer MUST compute the message hash as described in Section 3.7 1918 and then sign it using the selected public-key algorithm. This will 1919 result in a DKIM-Signature header field that will include the body 1920 hash and a signature of the header hash, where that header includes 1921 the DKIM-Signature header field itself. 1923 Entities such as mailing list managers that implement DKIM and that 1924 modify the message or a header field (for example, inserting 1925 unsubscribe information) before retransmitting the message SHOULD 1926 check any existing signature on input and MUST make such 1927 modifications before re-signing the message. 1929 The signer MAY elect to limit the number of bytes of the body that 1930 will be included in the hash and hence signed. The length actually 1931 hashed should be inserted in the "l=" tag of the DKIM-Signature 1932 header field. 1934 5.7. Insert the DKIM-Signature Header Field 1936 Finally, the signer MUST insert the DKIM-Signature header field 1937 created in the previous step prior to transmitting the email. The 1938 DKIM-Signature header field MUST be the same as used to compute the 1939 hash as described above, except that the value of the "b=" tag MUST 1940 be the appropriately signed hash computed in the previous step, 1941 signed using the algorithm specified in the "a=" tag of the DKIM- 1942 Signature header field and using the private key corresponding to the 1943 selector given in the "s=" tag of the DKIM-Signature header field, as 1944 chosen above in Section 5.2 1946 The DKIM-Signature header field MUST be inserted before any other 1947 DKIM-Signature fields in the header block. 1949 INFORMATIVE IMPLEMENTATION NOTE: The easiest way to achieve this 1950 is to insert the DKIM-Signature header field at the beginning of 1951 the header block. In particular, it may be placed before any 1952 existing Received header fields. This is consistent with treating 1953 DKIM-Signature as a trace header field. 1955 6. Verifier Actions 1957 Since a signer MAY remove or revoke a public key at any time, it is 1958 recommended that verification occur in a timely manner. In many 1959 configurations, the most timely place is during acceptance by the 1960 border MTA or shortly thereafter. In particular, deferring 1961 verification until the message is accessed by the end user is 1962 discouraged. 1964 A border or intermediate MTA MAY verify the message signature(s). An 1965 MTA who has performed verification MAY communicate the result of that 1966 verification by adding a verification header field to incoming 1967 messages. This considerably simplifies things for the user, who can 1968 now use an existing mail user agent. Most MUAs have the ability to 1969 filter messages based on message header fields or content; these 1970 filters would be used to implement whatever policy the user wishes 1971 with respect to unsigned mail. 1973 A verifying MTA MAY implement a policy with respect to unverifiable 1974 mail, regardless of whether or not it applies the verification header 1975 field to signed messages. 1977 Verifiers MUST produce a result that is semantically equivalent to 1978 applying the following steps in the order listed. In practice, 1979 several of these steps can be performed in parallel in order to 1980 improve performance. 1982 6.1. Extract Signatures from the Message 1984 The order in which verifiers try DKIM-Signature header fields is not 1985 defined; verifiers MAY try signatures in any order they like. For 1986 example, one implementation might try the signatures in textual 1987 order, whereas another might try signatures by identities that match 1988 the contents of the From header field before trying other signatures. 1989 Verifiers MUST NOT attribute ultimate meaning to the order of 1990 multiple DKIM-Signature header fields. In particular, there is 1991 reason to believe that some relays will reorder the header fields in 1992 potentially arbitrary ways. 1994 INFORMATIVE IMPLEMENTATION NOTE: Verifiers might use the order as 1995 a clue to signing order in the absence of any other information. 1996 However, other clues as to the semantics of multiple signatures 1997 (such as correlating the signing host with Received header fields) 1998 may also be considered. 2000 A verifier SHOULD NOT treat a message that has one or more bad 2001 signatures and no good signatures differently from a message with no 2002 signature at all; such treatment is a matter of local policy and is 2003 beyond the scope of this document. 2005 When a signature successfully verifies, a verifier will either stop 2006 processing or attempt to verify any other signatures, at the 2007 discretion of the implementation. A verifier MAY limit the number of 2008 signatures it tries to avoid denial-of-service attacks. 2010 INFORMATIVE NOTE: An attacker could send messages with large 2011 numbers of faulty signatures, each of which would require a DNS 2012 lookup and corresponding CPU time to verify the message. This 2013 could be an attack on the domain that receives the message, by 2014 slowing down the verifier by requiring it to do a large number of 2015 DNS lookups and/or signature verifications. It could also be an 2016 attack against the domains listed in the signatures, essentially 2017 by enlisting innocent verifiers in launching an attack against the 2018 DNS servers of the actual victim. 2020 In the following description, text reading "return status 2021 (explanation)" (where "status" is one of "PERMFAIL" or "TEMPFAIL") 2022 means that the verifier MUST immediately cease processing that 2023 signature. The verifier SHOULD proceed to the next signature, if any 2024 is present, and completely ignore the bad signature. If the status 2025 is "PERMFAIL", the signature failed and should not be reconsidered. 2026 If the status is "TEMPFAIL", the signature could not be verified at 2027 this time but may be tried again later. A verifier MAY either defer 2028 the message for later processing, perhaps by queueing it locally or 2029 issuing a 451/4.7.5 SMTP reply, or try another signature; if no good 2030 signature is found and any of the signatures resulted in a TEMPFAIL 2031 status, the verifier MAY save the message for later processing. The 2032 "(explanation)" is not normative text; it is provided solely for 2033 clarification. 2035 Verifiers SHOULD ignore any DKIM-Signature header fields where the 2036 signature does not validate. Verifiers that are prepared to validate 2037 multiple signature header fields SHOULD proceed to the next signature 2038 header field, should it exist. However, verifiers MAY make note of 2039 the fact that an invalid signature was present for consideration at a 2040 later step. 2042 INFORMATIVE NOTE: The rationale of this requirement is to permit 2043 messages that have invalid signatures but also a valid signature 2044 to work. For example, a mailing list exploder might opt to leave 2045 the original submitter signature in place even though the exploder 2046 knows that it is modifying the message in some way that will break 2047 that signature, and the exploder inserts its own signature. In 2048 this case, the message should succeed even in the presence of the 2049 known-broken signature. 2051 For each signature to be validated, the following steps should be 2052 performed in such a manner as to produce a result that is 2053 semantically equivalent to performing them in the indicated order. 2055 6.1.1. Validate the Signature Header Field 2057 Implementers MUST meticulously validate the format and values in the 2058 DKIM-Signature header field; any inconsistency or unexpected values 2059 MUST cause the header field to be completely ignored and the verifier 2060 to return PERMFAIL (signature syntax error). Being "liberal in what 2061 you accept" is definitely a bad strategy in this security context. 2062 Note however that this does not include the existence of unknown tags 2063 in a DKIM-Signature header field, which are explicitly permitted. 2064 Verifiers MUST ignore DKIM-Signature header fields with a "v=" tag 2065 that is inconsistent with this specification and return PERMFAIL 2066 (incompatible version). 2068 INFORMATIVE IMPLEMENTATION NOTE: An implementation may, of course, 2069 choose to also verify signatures generated by older versions of 2070 this specification. 2072 If any tag listed as "required" in Section 3.5 is omitted from the 2073 DKIM-Signature header field, the verifier MUST ignore the DKIM- 2074 Signature header field and return PERMFAIL (signature missing 2075 required tag). 2077 INFORMATIONAL NOTE: The tags listed as required in Section 3.5 are 2078 "v=", "a=", "b=", "bh=", "d=", "h=", and "s=". Should there be a 2079 conflict between this note and Section 3.5, Section 3.5 is 2080 normative. 2082 If the DKIM-Signature header field does not contain the "i=" tag, the 2083 verifier MUST behave as though the value of that tag were "@d", where 2084 "d" is the value from the "d=" tag. 2086 Verifiers MUST confirm that the domain specified in the "d=" tag is 2087 the same as or a parent domain of the domain part of the "i=" tag. 2088 If not, the DKIM-Signature header field MUST be ignored and the 2089 verifier should return PERMFAIL (domain mismatch). 2091 If the "h=" tag does not include the From header field, the verifier 2092 MUST ignore the DKIM-Signature header field and return PERMFAIL (From 2093 field not signed). 2095 Verifiers MAY ignore the DKIM-Signature header field and return 2096 PERMFAIL (signature expired) if it contains an "x=" tag and the 2097 signature has expired. 2099 Verifiers MAY ignore the DKIM-Signature header field if the domain 2100 used by the signer in the "d=" tag is not associated with a valid 2101 signing entity. For example, signatures with "d=" values such as 2102 "com" and "co.uk" may be ignored. The list of unacceptable domains 2103 SHOULD be configurable. 2105 Verifiers MAY ignore the DKIM-Signature header field and return 2106 PERMFAIL (unacceptable signature header) for any other reason, for 2107 example, if the signature does not sign header fields that the 2108 verifier views to be essential. As a case in point, if MIME header 2109 fields are not signed, certain attacks may be possible that the 2110 verifier would prefer to avoid. 2112 6.1.2. Get the Public Key 2114 The public key for a signature is needed to complete the verification 2115 process. The process of retrieving the public key depends on the 2116 query type as defined by the "q=" tag in the DKIM-Signature header 2117 field. Obviously, a public key need only be retrieved if the process 2118 of extracting the signature information is completely successful. 2119 Details of key management and representation are described in 2120 Section 3.6. The verifier MUST validate the key record and MUST 2121 ignore any public key records that are malformed. 2123 When validating a message, a verifier MUST perform the following 2124 steps in a manner that is semantically the same as performing them in 2125 the order indicated (in some cases, the implementation may 2126 parallelize or reorder these steps, as long as the semantics remain 2127 unchanged): 2129 1. Retrieve the public key as described in Section 3.6 using the 2130 algorithm in the "q=" tag, the domain from the "d=" tag, and the 2131 selector from the "s=" tag. 2133 2. If the query for the public key fails to respond, the verifier 2134 MAY defer acceptance of this email and return TEMPFAIL (key 2135 unavailable). If verification is occurring during the incoming 2136 SMTP session, this MAY be achieved with a 451/4.7.5 SMTP reply 2137 code. Alternatively, the verifier MAY store the message in the 2138 local queue for later trial or ignore the signature. Note that 2139 storing a message in the local queue is subject to denial-of- 2140 service attacks. 2142 3. If the query for the public key fails because the corresponding 2143 key record does not exist, the verifier MUST immediately return 2144 PERMFAIL (no key for signature). 2146 4. If the query for the public key returns multiple key records, the 2147 verifier may choose one of the key records or may cycle through 2148 the key records performing the remainder of these steps on each 2149 record at the discretion of the implementer. The order of the 2150 key records is unspecified. If the verifier chooses to cycle 2151 through the key records, then the "return ..." wording in the 2152 remainder of this section means "try the next key record, if any; 2153 if none, return to try another signature in the usual way". 2155 5. If the result returned from the query does not adhere to the 2156 format defined in this specification, the verifier MUST ignore 2157 the key record and return PERMFAIL (key syntax error). Verifiers 2158 are urged to validate the syntax of key records carefully to 2159 avoid attempted attacks. In particular, the verifier MUST ignore 2160 keys with a version code ("v=" tag) that they do not implement. 2162 6. If the "g=" tag in the public key does not match the Local-part 2163 of the "i=" tag in the message signature header field, the 2164 verifier MUST ignore the key record and return PERMFAIL 2165 (inapplicable key). If the Local-part of the "i=" tag on the 2166 message signature is not present, the "g=" tag must be "*" (valid 2167 for all addresses in the domain) or the entire g= tag must be 2168 omitted (which defaults to "g=*"), otherwise the verifier MUST 2169 ignore the key record and return PERMFAIL (inapplicable key). 2170 Other than this test, verifiers SHOULD NOT treat a message signed 2171 with a key record having a "g=" tag any differently than one 2172 without; in particular, verifiers SHOULD NOT prefer messages that 2173 seem to have an individual signature by virtue of a "g=" tag 2174 versus a domain signature. 2176 7. If the "h=" tag exists in the public key record and the hash 2177 algorithm implied by the a= tag in the DKIM-Signature header 2178 field is not included in the contents of the "h=" tag, the 2179 verifier MUST ignore the key record and return PERMFAIL 2180 (inappropriate hash algorithm). 2182 8. If the public key data (the "p=" tag) is empty, then this key has 2183 been revoked and the verifier MUST treat this as a failed 2184 signature check and return PERMFAIL (key revoked). There is no 2185 defined semantic difference between a key that has been revoked 2186 and a key record that has been removed. 2188 9. If the public key data is not suitable for use with the algorithm 2189 and key types defined by the "a=" and "k=" tags in the DKIM- 2190 Signature header field, the verifier MUST immediately return 2191 PERMFAIL (inappropriate key algorithm). 2193 6.1.3. Compute the Verification 2195 Given a signer and a public key, verifying a signature consists of 2196 actions semantically equivalent to the following steps. 2198 1. Based on the algorithm defined in the "c=" tag, the body length 2199 specified in the "l=" tag, and the header field names in the "h=" 2200 tag, prepare a canonicalized version of the message as is 2201 described in Section 3.7 (note that this version does not 2202 actually need to be instantiated). When matching header field 2203 names in the "h=" tag against the actual message header field, 2204 comparisons MUST be case-insensitive. 2206 2. Based on the algorithm indicated in the "a=" tag, compute the 2207 message hashes from the canonical copy as described in 2208 Section 3.7. 2210 3. Verify that the hash of the canonicalized message body computed 2211 in the previous step matches the hash value conveyed in the "bh=" 2212 tag. If the hash does not match, the verifier SHOULD ignore the 2213 signature and return PERMFAIL (body hash did not verify). 2215 4. Using the signature conveyed in the "b=" tag, verify the 2216 signature against the header hash using the mechanism appropriate 2217 for the public key algorithm described in the "a=" tag. If the 2218 signature does not validate, the verifier SHOULD ignore the 2219 signature and return PERMFAIL (signature did not verify). 2221 5. Otherwise, the signature has correctly verified. 2223 INFORMATIVE IMPLEMENTER'S NOTE: Implementations might wish to 2224 initiate the public-key query in parallel with calculating the 2225 hash as the public key is not needed until the final decryption is 2226 calculated. Implementations may also verify the signature on the 2227 message header before validating that the message hash listed in 2228 the "bh=" tag in the DKIM-Signature header field matches that of 2229 the actual message body; however, if the body hash does not match, 2230 the entire signature must be considered to have failed. 2232 A body length specified in the "l=" tag of the signature limits the 2233 number of bytes of the body passed to the verification algorithm. 2234 All data beyond that limit is not validated by DKIM. Hence, 2235 verifiers might treat a message that contains bytes beyond the 2236 indicated body length with suspicion, such as by truncating the 2237 message at the indicated body length, declaring the signature invalid 2238 (e.g., by returning PERMFAIL (unsigned content)), or conveying the 2239 partial verification to the policy module. 2241 INFORMATIVE IMPLEMENTATION NOTE: Verifiers that truncate the body 2242 at the indicated body length might pass on a malformed MIME 2243 message if the signer used the "N-4" trick (omitting the final 2244 "--CRLF") described in the informative note in Section 3.4.5. 2245 Such verifiers may wish to check for this case and include a 2246 trailing "--CRLF" to avoid breaking the MIME structure. A simple 2247 way to achieve this might be to append "--CRLF" to any "multipart" 2248 message with a body length; if the MIME structure is already 2249 correctly formed, this will appear in the postlude and will not be 2250 displayed to the end user. 2252 6.2. Communicate Verification Results 2254 Verifiers wishing to communicate the results of verification to other 2255 parts of the mail system may do so in whatever manner they see fit. 2256 For example, implementations might choose to add an email header 2257 field to the message before passing it on. Any such header field 2258 SHOULD be inserted before any existing DKIM-Signature or preexisting 2259 authentication status header fields in the header field block. The 2260 Authentication-Results: header field ([RFC5451]) MAY be used for this 2261 purpose. 2263 INFORMATIVE ADVICE to MUA filter writers: Patterns intended to 2264 search for results header fields to visibly mark authenticated 2265 mail for end users should verify that such header field was added 2266 by the appropriate verifying domain and that the verified identity 2267 matches the author identity that will be displayed by the MUA. In 2268 particular, MUA filters should not be influenced by bogus results 2269 header fields added by attackers. To circumvent this attack, 2270 verifiers may wish to delete existing results header fields after 2271 verification and before adding a new header field. 2273 6.3. Interpret Results/Apply Local Policy 2275 It is beyond the scope of this specification to describe what actions 2276 an Identity Assessor can make, but mail carrying a validated SDID 2277 presents an opportunity to an Identity Assessor that unauthenticated 2278 email does not. Specifically, an authenticated email creates a 2279 predictable identifier by which other decisions can reliably be 2280 managed, such as trust and reputation. Conversely, unauthenticated 2281 email lacks a reliable identifier that can be used to assign trust 2282 and reputation. It is reasonable to treat unauthenticated email as 2283 lacking any trust and having no positive reputation. 2285 In general, verifiers SHOULD NOT reject messages solely on the basis 2286 of a lack of signature or an unverifiable signature; such rejection 2287 would cause severe interoperability problems. However, if the 2288 verifier does opt to reject such messages (for example, when 2289 communicating with a peer who, by prior agreement, agrees to only 2290 send signed messages), and the verifier runs synchronously with the 2291 SMTP session and a signature is missing or does not verify, the MTA 2292 SHOULD use a 550/5.7.x reply code. 2294 If it is not possible to fetch the public key, perhaps because the 2295 key server is not available, a temporary failure message MAY be 2296 generated using a 451/4.7.5 reply code, such as: 2297 451 4.7.5 Unable to verify signature - key server unavailable 2299 Temporary failures such as inability to access the key server or 2300 other external service are the only conditions that SHOULD use a 4xx 2301 SMTP reply code. In particular, cryptographic signature verification 2302 failures MUST NOT return 4xx SMTP replies. 2304 Once the signature has been verified, that information MUST be 2305 conveyed to the Identity Assessor (such as an explicit allow/ 2306 whitelist and reputation system) and/or to the end user. If the SDID 2307 is not the same as the address in the From: header field, the mail 2308 system SHOULD take pains to ensure that the actual SDID is clear to 2309 the reader. 2311 The verifier MAY treat unsigned header fields with extreme 2312 skepticism, including marking them as untrusted or even deleting them 2313 before display to the end user. 2315 While the symptoms of a failed verification are obvious -- the 2316 signature doesn't verify -- establishing the exact cause can be more 2317 difficult. If a selector cannot be found, is that because the 2318 selector has been removed, or was the value changed somehow in 2319 transit? If the signature line is missing, is that because it was 2320 never there, or was it removed by an overzealous filter? For 2321 diagnostic purposes, the exact reason why the verification fails 2322 SHOULD be made available to the policy module and possibly recorded 2323 in the system logs. If the email cannot be verified, then it SHOULD 2324 be rendered the same as all unverified email regardless of whether or 2325 not it looks like it was signed. 2327 7. IANA Considerations 2329 DKIM has registered new namespaces with IANA. In all cases, new 2330 values are assigned only for values that have been documented in a 2331 published RFC that has IETF Consensus [RFC5226]. 2333 7.1. DKIM-Signature Tag Specifications 2335 A DKIM-Signature provides for a list of tag specifications. IANA has 2336 established the DKIM-Signature Tag Specification Registry for tag 2337 specifications that can be used in DKIM-Signature fields. 2339 The initial entries in the registry comprise: 2341 +------+-----------------+ 2342 | TYPE | REFERENCE | 2343 +------+-----------------+ 2344 | v | (this document) | 2345 | a | (this document) | 2346 | b | (this document) | 2347 | bh | (this document) | 2348 | c | (this document) | 2349 | d | (this document) | 2350 | h | (this document) | 2351 | i | (this document) | 2352 | l | (this document) | 2353 | q | (this document) | 2354 | s | (this document) | 2355 | t | (this document) | 2356 | x | (this document) | 2357 | z | (this document) | 2358 +------+-----------------+ 2360 Table 1: DKIM-Signature Tag Specification Registry Initial 2361 Values 2363 7.2. DKIM-Signature Query Method Registry 2365 The "q=" tag-spec (specified in Section 3.5) provides for a list of 2366 query methods. 2368 IANA has established the DKIM-Signature Query Method Registry for 2369 mechanisms that can be used to retrieve the key that will permit 2370 validation processing of a message signed using DKIM. 2372 The initial entry in the registry comprises: 2374 +------+--------+-----------------+ 2375 | TYPE | OPTION | REFERENCE | 2376 +------+--------+-----------------+ 2377 | dns | txt | (this document) | 2378 +------+--------+-----------------+ 2380 DKIM-Signature Query Method Registry Initial Values 2382 7.3. DKIM-Signature Canonicalization Registry 2384 The "c=" tag-spec (specified in Section 3.5) provides for a specifier 2385 for canonicalization algorithms for the header and body of the 2386 message. 2388 IANA has established the DKIM-Signature Canonicalization Algorithm 2389 Registry for algorithms for converting a message into a canonical 2390 form before signing or verifying using DKIM. 2392 The initial entries in the body registry comprise: 2394 +---------+-----------------+ 2395 | TYPE | REFERENCE | 2396 +---------+-----------------+ 2397 | simple | (this document) | 2398 | relaxed | (this document) | 2399 +---------+-----------------+ 2401 DKIM-Signature Body Canonicalization Algorithm Registry 2402 Initial Values 2404 7.4. _domainkey DNS TXT Record Tag Specifications 2406 A _domainkey DNS TXT record provides for a list of tag 2407 specifications. IANA has established the DKIM _domainkey DNS TXT Tag 2408 Specification Registry for tag specifications that can be used in DNS 2409 TXT Records. 2411 The initial entries in the registry comprise: 2413 +------+-----------------+ 2414 | TYPE | REFERENCE | 2415 +------+-----------------+ 2416 | v | (this document) | 2417 | g | (this document) | 2418 | h | (this document) | 2419 | k | (this document) | 2420 | n | (this document) | 2421 | p | (this document) | 2422 | s | (this document) | 2423 | t | (this document) | 2424 +------+-----------------+ 2426 DKIM _domainkey DNS TXT Record Tag Specification Registry 2427 Initial Values 2429 The initial entries in the body registry comprise: 2431 +---------+-----------------+ 2432 | TYPE | REFERENCE | 2433 +---------+-----------------+ 2434 | simple | (this document) | 2435 | relaxed | (this document) | 2436 +---------+-----------------+ 2438 DKIM-Signature Body Canonicalization Algorithm Registry 2439 Initial Values 2441 7.5. DKIM Key Type Registry 2443 The "k=" (specified in Section 3.6.1) and the "a=" (specified in Section 3.5) tags provide for a list of 2445 mechanisms that can be used to decode a DKIM signature. 2447 IANA has established the DKIM Key Type Registry for such mechanisms. 2449 The initial entry in the registry comprises: 2451 +------+-----------+ 2452 | TYPE | REFERENCE | 2453 +------+-----------+ 2454 | rsa | [RFC3447] | 2455 +------+-----------+ 2457 DKIM Key Type Initial Values 2459 7.6. DKIM Hash Algorithms Registry 2461 The "h=" (specified in Section 3.6.1) and the "a=" (specified in Section 3.5) tags provide for a list of 2463 mechanisms that can be used to produce a digest of message data. 2465 IANA has established the DKIM Hash Algorithms Registry for such 2466 mechanisms. 2468 The initial entries in the registry comprise: 2470 +--------+-------------------+ 2471 | TYPE | REFERENCE | 2472 +--------+-------------------+ 2473 | sha1 | [FIPS-180-2-2002] | 2474 | sha256 | [FIPS-180-2-2002] | 2475 +--------+-------------------+ 2477 DKIM Hash Algorithms Initial Values 2479 7.7. DKIM Service Types Registry 2481 The "s=" tag (specified in Section 3.6.1) provides for a 2482 list of service types to which this selector may apply. 2484 IANA has established the DKIM Service Types Registry for service 2485 types. 2487 The initial entries in the registry comprise: 2489 +-------+-----------------+ 2490 | TYPE | REFERENCE | 2491 +-------+-----------------+ 2492 | email | (this document) | 2493 | * | (this document) | 2494 +-------+-----------------+ 2496 DKIM Service Types Registry Initial Values 2498 7.8. DKIM Selector Flags Registry 2500 The "t=" tag (specified in Section 3.6.1) provides for a 2501 list of flags to modify interpretation of the selector. 2503 IANA has established the DKIM Selector Flags Registry for additional 2504 flags. 2506 The initial entries in the registry comprise: 2508 +------+-----------------+ 2509 | TYPE | REFERENCE | 2510 +------+-----------------+ 2511 | y | (this document) | 2512 | s | (this document) | 2513 +------+-----------------+ 2515 DKIM Selector Flags Registry Initial Values 2517 7.9. DKIM-Signature Header Field 2519 IANA has added DKIM-Signature to the "Permanent Message Header 2520 Fields" registry (see [RFC3864]) for the "mail" protocol, using this 2521 document as the reference. 2523 8. Security Considerations 2525 It has been observed that any mechanism that is introduced that 2526 attempts to stem the flow of spam is subject to intensive attack. 2527 DKIM needs to be carefully scrutinized to identify potential attack 2528 vectors and the vulnerability to each. See also [RFC4686]. 2530 8.1. Misuse of Body Length Limits ("l=" Tag) 2532 Body length limits (in the form of the "l=" tag) are subject to 2533 several potential attacks. 2535 8.1.1. Addition of New MIME Parts to Multipart/* 2537 If the body length limit does not cover a closing MIME multipart 2538 section (including the trailing "--CRLF" portion), then it is 2539 possible for an attacker to intercept a properly signed multipart 2540 message and add a new body part. Depending on the details of the 2541 MIME type and the implementation of the verifying MTA and the 2542 receiving MUA, this could allow an attacker to change the information 2543 displayed to an end user from an apparently trusted source. 2545 For example, if attackers can append information to a "text/html" 2546 body part, they may be able to exploit a bug in some MUAs that 2547 continue to read after a "" marker, and thus display HTML text 2548 on top of already displayed text. If a message has a "multipart/ 2549 alternative" body part, they might be able to add a new body part 2550 that is preferred by the displaying MUA. 2552 8.1.2. Addition of new HTML content to existing content 2554 Several receiving MUA implementations do not cease display after a 2555 """" tag. In particular, this allows attacks involving 2556 overlaying images on top of existing text. 2558 INFORMATIVE EXAMPLE: Appending the following text to an existing, 2559 properly closed message will in many MUAs result in inappropriate 2560 data being rendered on top of existing, correct data: 2562
2563
2565 8.2. Misappropriated Private Key 2567 If the private key for a user is resident on their computer and is 2568 not protected by an appropriately secure mechanism, it is possible 2569 for malware to send mail as that user and any other user sharing the 2570 same private key. The malware would not, however, be able to 2571 generate signed spoofs of other signers' addresses, which would aid 2572 in identification of the infected user and would limit the 2573 possibilities for certain types of attacks involving socially 2574 engineered messages. This threat applies mainly to MUA-based 2575 implementations; protection of private keys on servers can be easily 2576 achieved through the use of specialized cryptographic hardware. 2578 A larger problem occurs if malware on many users' computers obtains 2579 the private keys for those users and transmits them via a covert 2580 channel to a site where they can be shared. The compromised users 2581 would likely not know of the misappropriation until they receive 2582 "bounce" messages from messages they are purported to have sent. 2583 Many users might not understand the significance of these bounce 2584 messages and would not take action. 2586 One countermeasure is to use a user-entered passphrase to encrypt the 2587 private key, although users tend to choose weak passphrases and often 2588 reuse them for different purposes, possibly allowing an attack 2589 against DKIM to be extended into other domains. Nevertheless, the 2590 decoded private key might be briefly available to compromise by 2591 malware when it is entered, or might be discovered via keystroke 2592 logging. The added complexity of entering a passphrase each time one 2593 sends a message would also tend to discourage the use of a secure 2594 passphrase. 2596 A somewhat more effective countermeasure is to send messages through 2597 an outgoing MTA that can authenticate the submitter using existing 2598 techniques (e.g., SMTP Authentication), possibly validate the message 2599 itself (e.g., verify that the header is legitimate and that the 2600 content passes a spam content check), and sign the message using a 2601 key appropriate for the submitter address. Such an MTA can also 2602 apply controls on the volume of outgoing mail each user is permitted 2603 to originate in order to further limit the ability of malware to 2604 generate bulk email. 2606 8.3. Key Server Denial-of-Service Attacks 2608 Since the key servers are distributed (potentially separate for each 2609 domain), the number of servers that would need to be attacked to 2610 defeat this mechanism on an Internet-wide basis is very large. 2611 Nevertheless, key servers for individual domains could be attacked, 2612 impeding the verification of messages from that domain. This is not 2613 significantly different from the ability of an attacker to deny 2614 service to the mail exchangers for a given domain, although it 2615 affects outgoing, not incoming, mail. 2617 A variation on this attack is that if a very large amount of mail 2618 were to be sent using spoofed addresses from a given domain, the key 2619 servers for that domain could be overwhelmed with requests. However, 2620 given the low overhead of verification compared with handling of the 2621 email message itself, such an attack would be difficult to mount. 2623 8.4. Attacks Against the DNS 2625 Since the DNS is a required binding for key services, specific 2626 attacks against the DNS must be considered. 2628 While the DNS is currently insecure [RFC3833], these security 2629 problems are the motivation behind DNS Security (DNSSEC) [RFC4033], 2630 and all users of the DNS will reap the benefit of that work. 2632 DKIM is only intended as a "sufficient" method of proving 2633 authenticity. It is not intended to provide strong cryptographic 2634 proof about authorship or contents. Other technologies such as 2635 OpenPGP [RFC4880] and S/MIME [RFC5751] address those requirements. 2637 A second security issue related to the DNS revolves around the 2638 increased DNS traffic as a consequence of fetching selector-based 2639 data as well as fetching signing domain policy. Widespread 2640 deployment of DKIM will result in a significant increase in DNS 2641 queries to the claimed signing domain. In the case of forgeries on a 2642 large scale, DNS servers could see a substantial increase in queries. 2644 A specific DNS security issue that should be considered by DKIM 2645 verifiers is the name chaining attack described in Section 2.3 of 2646 [RFC3833]. A DKIM verifier, while verifying a DKIM-Signature header 2647 field, could be prompted to retrieve a key record of an attacker's 2648 choosing. This threat can be minimized by ensuring that name 2649 servers, including recursive name servers, used by the verifier 2650 enforce strict checking of "glue" and other additional information in 2651 DNS responses and are therefore not vulnerable to this attack. 2653 8.5. Replay Attacks 2655 In this attack, a spammer sends a message to be spammed to an 2656 accomplice, which results in the message being signed by the 2657 originating MTA. The accomplice resends the message, including the 2658 original signature, to a large number of recipients, possibly by 2659 sending the message to many compromised machines that act as MTAs. 2660 The messages, not having been modified by the accomplice, have valid 2661 signatures. 2663 Partial solutions to this problem involve the use of reputation 2664 services to convey the fact that the specific email address is being 2665 used for spam and that messages from that signer are likely to be 2666 spam. This requires a real-time detection mechanism in order to 2667 react quickly enough. However, such measures might be prone to 2668 abuse, if for example an attacker resent a large number of messages 2669 received from a victim in order to make them appear to be a spammer. 2671 Large verifiers might be able to detect unusually large volumes of 2672 mails with the same signature in a short time period. Smaller 2673 verifiers can get substantially the same volume of information via 2674 existing collaborative systems. 2676 8.6. Limits on Revoking Keys 2678 When a large domain detects undesirable behavior on the part of one 2679 of its users, it might wish to revoke the key used to sign that 2680 user's messages in order to disavow responsibility for messages that 2681 have not yet been verified or that are the subject of a replay 2682 attack. However, the ability of the domain to do so can be limited 2683 if the same key, for scalability reasons, is used to sign messages 2684 for many other users. Mechanisms for explicitly revoking keys on a 2685 per-address basis have been proposed but require further study as to 2686 their utility and the DNS load they represent. 2688 8.7. Intentionally Malformed Key Records 2690 It is possible for an attacker to publish key records in DNS that are 2691 intentionally malformed, with the intent of causing a denial-of- 2692 service attack on a non-robust verifier implementation. The attacker 2693 could then cause a verifier to read the malformed key record by 2694 sending a message to one of its users referencing the malformed 2695 record in a (not necessarily valid) signature. Verifiers MUST 2696 thoroughly verify all key records retrieved from the DNS and be 2697 robust against intentionally as well as unintentionally malformed key 2698 records. 2700 8.8. Intentionally Malformed DKIM-Signature Header Fields 2702 Verifiers MUST be prepared to receive messages with malformed DKIM- 2703 Signature header fields, and thoroughly verify the header field 2704 before depending on any of its contents. 2706 8.9. Information Leakage 2708 An attacker could determine when a particular signature was verified 2709 by using a per-message selector and then monitoring their DNS traffic 2710 for the key lookup. This would act as the equivalent of a "web bug" 2711 for verification time rather than when the message was read. 2713 8.10. Remote Timing Attacks 2715 In some cases, it may be possible to extract private keys using a 2716 remote timing attack [BONEH03]. Implementations should consider 2717 obfuscating the timing to prevent such attacks. 2719 8.11. Reordered Header Fields 2721 Existing standards allow intermediate MTAs to reorder header fields. 2722 If a signer signs two or more header fields of the same name, this 2723 can cause spurious verification errors on otherwise legitimate 2724 messages. In particular, signers that sign any existing DKIM- 2725 Signature fields run the risk of having messages incorrectly fail to 2726 verify. 2728 8.12. RSA Attacks 2730 An attacker could create a large RSA signing key with a small 2731 exponent, thus requiring that the verification key have a large 2732 exponent. This will force verifiers to use considerable computing 2733 resources to verify the signature. Verifiers might avoid this attack 2734 by refusing to verify signatures that reference selectors with public 2735 keys having unreasonable exponents. 2737 In general, an attacker might try to overwhelm a verifier by flooding 2738 it with messages requiring verification. This is similar to other 2739 MTA denial-of-service attacks and should be dealt with in a similar 2740 fashion. 2742 8.13. Inappropriate Signing by Parent Domains 2744 The trust relationship described in Section 3.8 could conceivably be 2745 used by a parent domain to sign messages with identities in a 2746 subdomain not administratively related to the parent. For example, 2747 the ".com" registry could create messages with signatures using an 2748 "i=" value in the example.com domain. There is no general solution 2749 to this problem, since the administrative cut could occur anywhere in 2750 the domain name. For example, in the domain "example.podunk.ca.us" 2751 there are three administrative cuts (podunk.ca.us, ca.us, and us), 2752 any of which could create messages with an identity in the full 2753 domain. 2755 INFORMATIVE NOTE: This is considered an acceptable risk for the 2756 same reason that it is acceptable for domain delegation. For 2757 example, in the example above any of the domains could potentially 2758 simply delegate "example.podunk.ca.us" to a server of their choice 2759 and completely replace all DNS-served information. Note that a 2760 verifier MAY ignore signatures that come from an unlikely domain 2761 such as ".com", as discussed in Section 6.1.1. 2763 8.14. Attacks Involving Addition of Header Fields 2765 Many email implementations do not enforce [RFC5322] with strictness. 2766 As discussed in Section 5.3 DKIM processing is predicated on a valid 2767 mail message as its input. However, DKIM implementers should be 2768 aware of the potential effect of having loose enforcement by email 2769 components interacting with DKIM modules. 2771 For example, a message with multiple From: header fields violates 2772 Section 3.6 of [RFC5322]. With the intent of providing a better user 2773 experience, many agents tolerate these violations and deliver the 2774 message anyway. An MUA then might elect to render to the user the 2775 value of the last, or "top", From: field. This may also be done 2776 simply out of the expectation that there is only one, where a "find 2777 first" algorithm would have the same result. Such code in an MUA can 2778 be exploited to fool the user if it is also known that the other 2779 From: field is the one checked by arriving message filters. Such is 2780 the case with DKIM; although the From: field must be signed, a 2781 malformed message bearing more than one From: field might only have 2782 the first ("bottom") one signed, in an attempt to show the message 2783 with some "DKIM passed" annotation while also rendering the From: 2784 field that was not authenticated. (This can also be taken as a 2785 demonstration that DKIM is not designed to support author 2786 validation.) 2788 A signer wishing to be resistant to this specific attack can include 2789 in the signed header field list an additional instance of each field 2790 that was present at signing. For example, a proper message with one 2791 From: field could be signed using "h=From:From:..." Because of the 2792 way header fields are canonicalized for input to the hash function, 2793 this would prevent additional fields from being added, after signing, 2794 as this would render the signature invalid. 2796 9. References 2798 9.1. Normative References 2800 [FIPS-180-2-2002] 2801 U.S. Department of Commerce, "Secure Hash Standard", FIPS 2802 PUB 180-2, August 2002. 2804 [ITU-X660-1997] 2805 "Information Technology - ASN.1 encoding rules: 2806 Specification of Basic Encoding Rules (BER), Canonical 2807 Encoding Rules (CER) and Distinguished Encoding Rules 2808 (DER)", 1997. 2810 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2811 Extensions (MIME) Part One: Format of Internet Message 2812 Bodies", RFC 2045, November 1996. 2814 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) 2815 Part Three: Message Header Extensions for Non-ASCII Text", 2816 RFC 2047, November 1996. 2818 [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2819 Extensions (MIME) Part Five: Conformance Criteria and 2820 Examples", RFC 2049, November 1996. 2822 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2823 Requirement Levels", BCP 14, RFC 2119, March 1997. 2825 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2826 Standards (PKCS) #1: RSA Cryptography Specifications 2827 Version 2.1", RFC 3447, February 2003. 2829 [RFC3490] Faltstrom, P., Hoffman, P., and A. Costello, 2830 "Internationalizing Domain Names in Applications (IDNA)", 2831 RFC 3490, March 2003. 2833 [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 2834 Specifications: ABNF", RFC 4234, October 2005. 2836 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 2837 October 2008. 2839 [RFC5322] Resnick, P., "Internet Message Format", RFC 5322, 2840 October 2008. 2842 [RFC5598] Crocker, D., "Internet Mail Architecture", RFC 5598, 2843 July 2009. 2845 9.2. Informative References 2847 [BONEH03] "Remote Timing Attacks are Practical", Proceedings 12th 2848 USENIX Security Symposium, 2003. 2850 [RFC1847] Galvin, J., Murphy, S., Crocker, S., and N. Freed, 2851 "Security Multiparts for MIME: Multipart/Signed and 2852 Multipart/Encrypted", RFC 1847, October 1995. 2854 [RFC3766] Orman, H. and P. Hoffman, "Determining Strengths For 2855 Public Keys Used For Exchanging Symmetric Keys", BCP 86, 2856 RFC 3766, April 2004. 2858 [RFC3833] Atkins, D. and R. Austein, "Threat Analysis of the Domain 2859 Name System (DNS)", RFC 3833, August 2004. 2861 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 2862 Procedures for Message Header Fields", BCP 90, RFC 3864, 2863 September 2004. 2865 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 2866 Rose, "DNS Security Introduction and Requirements", 2867 RFC 4033, March 2005. 2869 [RFC4409] Gellens, R. and J. Klensin, "Message Submission for Mail", 2870 RFC 4409, April 2006. 2872 [RFC4686] Fenton, J., "Analysis of Threats Motivating DomainKeys 2873 Identified Mail (DKIM)", RFC 4686, September 2006. 2875 [RFC4870] Delany, M., "Domain-Based Email Authentication Using 2876 Public Keys Advertised in the DNS (DomainKeys)", RFC 4870, 2877 May 2007. 2879 [RFC4871] Allman, E., Callas, J., Delany, M., Libbey, M., Fenton, 2880 J., and M. Thomas, "DomainKeys Identified Mail (DKIM) 2881 Signatures", RFC 4871, May 2007. 2883 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., and R. Thayer, 2884 "OpenPGP Message Format", RFC 4880, November 2007. 2886 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 2887 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 2888 May 2008. 2890 [RFC5451] Kucherawy, M., "Message Header Field for Indicating 2891 Message Authentication Status", RFC 5451, April 2009. 2893 [RFC5751] Ramsdell, B., "Secure/Multipurpose Internet Mail 2894 Extensions (S/MIME) Version 3.1 Message Specification", 2895 RFC 5751, January 2010. 2897 Appendix A. Example of Use (INFORMATIVE) 2899 This section shows the complete flow of an email from submission to 2900 final delivery, demonstrating how the various components fit 2901 together. The key used in this example is shown in Appendix C. 2903 A.1. The User Composes an Email 2905 From: Joe SixPack 2906 To: Suzie Q 2907 Subject: Is dinner ready? 2908 Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) 2909 Message-ID: <;20030712040037.46341.5F8J@football.example.com> 2911 Hi. 2913 We lost the game. Are you hungry yet? 2915 Joe. 2917 Figure 1: The User Composes an Email 2919 A.2. The Email is Signed 2920 This email is signed by the example.com outbound email server and now 2921 looks like this: 2922 DKIM-Signature: v=1; a=rsa-sha256; s=brisbane; d=example.com; 2923 c=simple/simple; q=dns/txt; i=joe@football.example.com; 2924 h=Received : From : To : Subject : Date : Message-ID; 2925 bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=; 2926 b=AuUoFEfDxTDkHlLXSZEpZj79LICEps6eda7W3deTVFOk4yAUoqOB 2927 4nujc7YopdG5dWLSdNg6xNAZpOPr+kHxt1IrE+NahM6L/LbvaHut 2928 KVdkLLkpVaVVQPzeRDI009SO2Il5Lu7rDNH6mZckBdrIx0orEtZV 2929 4bmp/YzhwvcubU4=; 2930 Received: from client1.football.example.com [192.0.2.1] 2931 by submitserver.example.com with SUBMISSION; 2932 Fri, 11 Jul 2003 21:01:54 -0700 (PDT) 2933 From: Joe SixPack 2934 To: Suzie Q 2935 Subject: Is dinner ready? 2936 Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) 2937 Message-ID: <20030712040037.46341.5F8J@football.example.com> 2939 Hi. 2941 We lost the game. Are you hungry yet? 2943 Joe. 2945 The Email is Signed 2947 The signing email server requires access to the private key 2948 associated with the "brisbane" selector to generate this signature. 2950 A.3. The Email Signature is Verified 2952 The signature is normally verified by an inbound SMTP server or 2953 possibly the final delivery agent. However, intervening MTAs can 2954 also perform this verification if they choose to do so. The 2955 verification process uses the domain "example.com" extracted from the 2956 "d=" tag and the selector "brisbane" from the "s=" tag in the DKIM- 2957 Signature header field to form the DNS DKIM query for: 2958 brisbane._domainkey.example.com 2960 Signature verification starts with the physically last Received 2961 header field, the From header field, and so forth, in the order 2962 listed in the "h=" tag. Verification follows with a single CRLF 2963 followed by the body (starting with "Hi."). The email is canonically 2964 prepared for verifying with the "simple" method. The result of the 2965 query and subsequent verification of the signature is stored (in this 2966 example) in the X-Authentication-Results header field line. After 2967 successful verification, the email looks like this: 2969 X-Authentication-Results: shopping.example.net 2970 header.from=joe@football.example.com; dkim=pass 2971 Received: from mout23.football.example.com (192.168.1.1) 2972 by shopping.example.net with SMTP; 2973 Fri, 11 Jul 2003 21:01:59 -0700 (PDT) 2974 DKIM-Signature: v=1; a=rsa-sha256; s=brisbane; d=example.com; 2975 c=simple/simple; q=dns/txt; i=joe@football.example.com; 2976 h=Received : From : To : Subject : Date : Message-ID; 2977 bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=; 2978 b=AuUoFEfDxTDkHlLXSZEpZj79LICEps6eda7W3deTVFOk4yAUoqOB 2979 4nujc7YopdG5dWLSdNg6xNAZpOPr+kHxt1IrE+NahM6L/LbvaHut 2980 KVdkLLkpVaVVQPzeRDI009SO2Il5Lu7rDNH6mZckBdrIx0orEtZV 2981 4bmp/YzhwvcubU4=; 2982 Received: from client1.football.example.com [192.0.2.1] 2983 by submitserver.example.com with SUBMISSION; 2984 Fri, 11 Jul 2003 21:01:54 -0700 (PDT) 2985 From: Joe SixPack 2986 To: Suzie Q 2987 Subject: Is dinner ready? 2988 Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) 2989 Message-ID: <20030712040037.46341.5F8J@football.example.com> 2991 Hi. 2993 We lost the game. Are you hungry yet? 2995 Joe. 2997 Successful verification 2999 Appendix B. Usage Examples (INFORMATIVE) 3001 DKIM signing and validating can be used in different ways, for 3002 different operational scenarios. This Appendix discusses some common 3003 examples. 3005 NOTE: Descriptions in this Appendix are for informational purposes 3006 only. They describe various ways that DKIM can be used, given 3007 particular constraints and needs. In no case are these examples 3008 intended to be taken as providing explanation or guidance 3009 concerning DKIM specification details, when creating an 3010 implementation. 3012 B.1. Alternate Submission Scenarios 3014 In the most simple scenario, a user's MUA, MSA, and Internet 3015 (boundary) MTA are all within the same administrative environment, 3016 using the same domain name. Therefore, all of the components 3017 involved in submission and initial transfer are related. However, it 3018 is common for two or more of the components to be under independent 3019 administrative control. This creates challenges for choosing and 3020 administering the domain name to use for signing, and for its 3021 relationship to common email identity header fields. 3023 B.1.1. Delegated Business Functions 3025 Some organizations assign specific business functions to discrete 3026 groups, inside or outside the organization. The goal, then, is to 3027 authorize that group to sign some mail, but to constrain what 3028 signatures they can generate. DKIM selectors (the "s=" signature 3029 tag) and granularity (the "g=" key tag) facilitate this kind of 3030 restricted authorization. Examples of these outsourced business 3031 functions are legitimate email marketing providers and corporate 3032 benefits providers. 3034 Here, the delegated group needs to be able to send messages that are 3035 signed, using the email domain of the client company. At the same 3036 time, the client often is reluctant to register a key for the 3037 provider that grants the ability to send messages for arbitrary 3038 addresses in the domain. 3040 There are multiple ways to administer these usage scenarios. In one 3041 case, the client organization provides all of the public query 3042 service (for example, DNS) administration, and in another it uses DNS 3043 delegation to enable all ongoing administration of the DKIM key 3044 record by the delegated group. 3046 If the client organization retains responsibility for all of the DNS 3047 administration, the outsourcing company can generate a key pair, 3048 supplying the public key to the client company, which then registers 3049 it in the query service, using a unique selector that authorizes a 3050 specific From header field Local-part. For example, a client with 3051 the domain "example.com" could have the selector record specify 3052 "g=winter-promotions" so that this signature is only valid for mail 3053 with a From address of "winter-promotions@example.com". This would 3054 enable the provider to send messages using that specific address and 3055 have them verify properly. The client company retains control over 3056 the email address because it retains the ability to revoke the key at 3057 any time. 3059 If the client wants the delegated group to do the DNS administration, 3060 it can have the domain name that is specified with the selector point 3061 to the provider's DNS server. The provider then creates and 3062 maintains all of the DKIM signature information for that selector. 3063 Hence, the client cannot provide constraints on the Local-part of 3064 addresses that get signed, but it can revoke the provider's signing 3065 rights by removing the DNS delegation record. 3067 B.1.2. PDAs and Similar Devices 3069 PDAs demonstrate the need for using multiple keys per domain. 3070 Suppose that John Doe wanted to be able to send messages using his 3071 corporate email address, jdoe@example.com, and his email device did 3072 not have the ability to make a Virtual Private Network (VPN) 3073 connection to the corporate network, either because the device is 3074 limited or because there are restrictions enforced by his Internet 3075 access provider. If the device was equipped with a private key 3076 registered for jdoe@example.com by the administrator of the 3077 example.com domain, and appropriate software to sign messages, John 3078 could sign the message on the device itself before transmission 3079 through the outgoing network of the access service provider. 3081 B.1.3. Roaming Users 3083 Roaming users often find themselves in circumstances where it is 3084 convenient or necessary to use an SMTP server other than their home 3085 server; examples are conferences and many hotels. In such 3086 circumstances, a signature that is added by the submission service 3087 will use an identity that is different from the user's home system. 3089 Ideally, roaming users would connect back to their home server using 3090 either a VPN or a SUBMISSION server running with SMTP AUTHentication 3091 on port 587. If the signing can be performed on the roaming user's 3092 laptop, then they can sign before submission, although the risk of 3093 further modification is high. If neither of these are possible, 3094 these roaming users will not be able to send mail signed using their 3095 own domain key. 3097 B.1.4. Independent (Kiosk) Message Submission 3099 Stand-alone services, such as walk-up kiosks and web-based 3100 information services, have no enduring email service relationship 3101 with the user, but users occasionally request that mail be sent on 3102 their behalf. For example, a website providing news often allows the 3103 reader to forward a copy of the article to a friend. This is 3104 typically done using the reader's own email address, to indicate who 3105 the author is. This is sometimes referred to as the "Evite problem", 3106 named after the website of the same name that allows a user to send 3107 invitations to friends. 3109 A common way this is handled is to continue to put the reader's email 3110 address in the From header field of the message, but put an address 3111 owned by the email posting site into the Sender header field. The 3112 posting site can then sign the message, using the domain that is in 3113 the Sender field. This provides useful information to the receiving 3114 email site, which is able to correlate the signing domain with the 3115 initial submission email role. 3117 Receiving sites often wish to provide their end users with 3118 information about mail that is mediated in this fashion. Although 3119 the real efficacy of different approaches is a subject for human 3120 factors usability research, one technique that is used is for the 3121 verifying system to rewrite the From header field, to indicate the 3122 address that was verified. For example: From: John Doe via 3123 news@news-site.com . (Note that such rewriting 3124 will break a signature, unless it is done after the verification pass 3125 is complete.) 3127 B.2. Alternate Delivery Scenarios 3129 Email is often received at a mailbox that has an address different 3130 from the one used during initial submission. In these cases, an 3131 intermediary mechanism operates at the address originally used and it 3132 then passes the message on to the final destination. This mediation 3133 process presents some challenges for DKIM signatures. 3135 B.2.1. Affinity Addresses 3137 "Affinity addresses" allow a user to have an email address that 3138 remains stable, even as the user moves among different email 3139 providers. They are typically associated with college alumni 3140 associations, professional organizations, and recreational 3141 organizations with which they expect to have a long-term 3142 relationship. These domains usually provide forwarding of incoming 3143 email, and they often have an associated Web application that 3144 authenticates the user and allows the forwarding address to be 3145 changed. However, these services usually depend on users sending 3146 outgoing messages through their own service providers' MTAs. Hence, 3147 mail that is signed with the domain of the affinity address is not 3148 signed by an entity that is administered by the organization owning 3149 that domain. 3151 With DKIM, affinity domains could use the Web application to allow 3152 users to register per-user keys to be used to sign messages on behalf 3153 of their affinity address. The user would take away the secret half 3154 of the key pair for signing, and the affinity domain would publish 3155 the public half in DNS for access by verifiers. 3157 This is another application that takes advantage of user-level 3158 keying, and domains used for affinity addresses would typically have 3159 a very large number of user-level keys. Alternatively, the affinity 3160 domain could handle outgoing mail, operating a mail submission agent 3161 that authenticates users before accepting and signing messages for 3162 them. This is of course dependent on the user's service provider not 3163 blocking the relevant TCP ports used for mail submission. 3165 B.2.2. Simple Address Aliasing (.forward) 3167 In some cases, a recipient is allowed to configure an email address 3168 to cause automatic redirection of email messages from the original 3169 address to another, such as through the use of a Unix .forward file. 3170 In this case, messages are typically redirected by the mail handling 3171 service of the recipient's domain, without modification, except for 3172 the addition of a Received header field to the message and a change 3173 in the envelope recipient address. In this case, the recipient at 3174 the final address' mailbox is likely to be able to verify the 3175 original signature since the signed content has not changed, and DKIM 3176 is able to validate the message signature. 3178 B.2.3. Mailing Lists and Re-Posters 3180 There is a wide range of behaviors in services that take delivery of 3181 a message and then resubmit it. A primary example is with mailing 3182 lists (collectively called "forwarders" below), ranging from those 3183 that make no modification to the message itself, other than to add a 3184 Received header field and change the envelope information, to those 3185 that add header fields, change the Subject header field, add content 3186 to the body (typically at the end), or reformat the body in some 3187 manner. The simple ones produce messages that are quite similar to 3188 the automated alias services. More elaborate systems essentially 3189 create a new message. 3191 A Forwarder that does not modify the body or signed header fields of 3192 a message is likely to maintain the validity of the existing 3193 signature. It also could choose to add its own signature to the 3194 message. 3196 Forwarders which modify a message in a way that could make an 3197 existing signature invalid are particularly good candidates for 3198 adding their own signatures (e.g., mailing-list-name@example.net). 3199 Since (re-)signing is taking responsibility for the content of the 3200 message, these signing forwarders are likely to be selective, and 3201 forward or re-sign a message only if it is received with a valid 3202 signature or if they have some other basis for knowing that the 3203 message is not spoofed. 3205 A common practice among systems that are primarily redistributors of 3206 mail is to add a Sender header field to the message, to identify the 3207 address being used to sign the message. This practice will remove 3208 any preexisting Sender header field as required by [RFC5322]. The 3209 forwarder applies a new DKIM-Signature header field with the 3210 signature, public key, and related information of the forwarder. 3212 Appendix C. Creating a Public Key (INFORMATIVE) 3214 The default signature is an RSA signed SHA256 digest of the complete 3215 email. For ease of explanation, the openssl command is used to 3216 describe the mechanism by which keys and signatures are managed. One 3217 way to generate a 1024-bit, unencrypted private key suitable for DKIM 3218 is to use openssl like this: 3219 $ openssl genrsa -out rsa.private 1024 3220 For increased security, the "-passin" parameter can also be added to 3221 encrypt the private key. Use of this parameter will require entering 3222 a password for several of the following steps. Servers may prefer to 3223 use hardware cryptographic support. 3225 The "genrsa" step results in the file rsa.private containing the key 3226 information similar to this: 3227 -----BEGIN RSA PRIVATE KEY----- 3228 MIICXwIBAAKBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkMoGeLnQg1fWn7/zYtIxN2SnFC 3229 jxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v/RtdC2UzJ1lWT947qR+Rcac2gb 3230 to/NMqJ0fzfVjH4OuKhitdY9tf6mcwGjaNBcWToIMmPSPDdQPNUYckcQ2QIDAQAB 3231 AoGBALmn+XwWk7akvkUlqb+dOxyLB9i5VBVfje89Teolwc9YJT36BGN/l4e0l6QX 3232 /1//6DWUTB3KI6wFcm7TWJcxbS0tcKZX7FsJvUz1SbQnkS54DJck1EZO/BLa5ckJ 3233 gAYIaqlA9C0ZwM6i58lLlPadX/rtHb7pWzeNcZHjKrjM461ZAkEA+itss2nRlmyO 3234 n1/5yDyCluST4dQfO8kAB3toSEVc7DeFeDhnC1mZdjASZNvdHS4gbLIA1hUGEF9m 3235 3hKsGUMMPwJBAPW5v/U+AWTADFCS22t72NUurgzeAbzb1HWMqO4y4+9Hpjk5wvL/ 3236 eVYizyuce3/fGke7aRYw/ADKygMJdW8H/OcCQQDz5OQb4j2QDpPZc0Nc4QlbvMsj 3237 7p7otWRO5xRa6SzXqqV3+F0VpqvDmshEBkoCydaYwc2o6WQ5EBmExeV8124XAkEA 3238 qZzGsIxVP+sEVRWZmW6KNFSdVUpk3qzK0Tz/WjQMe5z0UunY9Ax9/4PVhp/j61bf 3239 eAYXunajbBSOLlx4D+TunwJBANkPI5S9iylsbLs6NkaMHV6k5ioHBBmgCak95JGX 3240 GMot/L2x0IYyMLAz6oLWh2hm7zwtb0CgOrPo1ke44hFYnfc= 3241 -----END RSA PRIVATE KEY----- 3243 To extract the public-key component from the private key, use openssl 3244 like this: 3245 $ openssl rsa -in rsa.private -out rsa.public -pubout -outform PEM 3246 This results in the file rsa.public containing the key information 3247 similar to this: 3248 [-----BEGIN PUBLIC KEY----- 3249 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkM 3250 oGeLnQg1fWn7/zYtIxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v/R 3251 tdC2UzJ1lWT947qR+Rcac2gbto/NMqJ0fzfVjH4OuKhitdY9tf6mcwGjaNBcWToI 3252 MmPSPDdQPNUYckcQ2QIDAQAB 3253 -----END PUBLIC KEY----- 3255 This public-key data (without the BEGIN and END tags) is placed in 3256 the DNS: 3258 brisbane IN TXT ("v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ" 3259 "KBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkMoGeLnQg1fWn7/zYt" 3260 "IxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v" 3261 "/RtdC2UzJ1lWT947qR+Rcac2gbto/NMqJ0fzfVjH4OuKhi" 3262 "tdY9tf6mcwGjaNBcWToIMmPSPDdQPNUYckcQ2QIDAQAB") 3264 Appendix D. MUA Considerations 3266 When a DKIM signature is verified, the processing system sometimes 3267 makes the result available to the recipient user's MUA. How to 3268 present this information to the user in a way that helps them is a 3269 matter of continuing human factors usability research. The tendency 3270 is to have the MUA highlight the SDID, in an attempt to show the user 3271 the identity that is claiming responsibility for the message. An MUA 3272 might do this with visual cues such as graphics, or it might include 3273 the address in an alternate view, or it might even rewrite the 3274 original From address using the verified information. Some MUAs 3275 might indicate which header fields were protected by the validated 3276 DKIM signature. This could be done with a positive indication on the 3277 signed header fields, with a negative indication on the unsigned 3278 header fields, by visually hiding the unsigned header fields, or some 3279 combination of these. If an MUA uses visual indications for signed 3280 header fields, the MUA probably needs to be careful not to display 3281 unsigned header fields in a way that might be construed by the end 3282 user as having been signed. If the message has an l= tag whose value 3283 does not extend to the end of the message, the MUA might also hide or 3284 mark the portion of the message body that was not signed. 3286 The aforementioned information is not intended to be exhaustive. The 3287 MUA may choose to highlight, accentuate, hide, or otherwise display 3288 any other information that may, in the opinion of the MUA author, be 3289 deemed important to the end user. 3291 Appendix E. Acknowledgements 3293 The previous IETF version of DKIM [RFC4871] was edited by: Eric 3294 Allman, Jon Callas, Mark Delany, Miles Libbey, Jim Fenton and Michael 3295 Thomas. 3297 That specification was the result of an extended, collaborative 3298 effort, including participation by: Russ Allbery, Edwin Aoki, Claus 3299 Assmann, Steve Atkins, Rob Austein, Fred Baker, Mark Baugher, Steve 3300 Bellovin, Nathaniel Borenstein, Dave Crocker, Michael Cudahy, Dennis 3301 Dayman, Jutta Degener, Frank Ellermann, Patrik Faeltstroem, Mark 3302 Fanto, Stephen Farrell, Duncan Findlay, Elliot Gillum, Olafur 3303 Gu[eth]mundsson, Phillip Hallam-Baker, Tony Hansen, Sam Hartman, 3304 Arvel Hathcock, Amir Herzberg, Paul Hoffman, Russ Housley, Craig 3305 Hughes, Cullen Jennings, Don Johnsen, Harry Katz, Murray S. 3306 Kucherawy, Barry Leiba, John Levine, Charles Lindsey, Simon 3307 Longsdale, David Margrave, Justin Mason, David Mayne, Thierry Moreau, 3308 Steve Murphy, Russell Nelson, Dave Oran, Doug Otis, Shamim Pirzada, 3309 Juan Altmayer Pizzorno, Sanjay Pol, Blake Ramsdell, Christian Renaud, 3310 Scott Renfro, Neil Rerup, Eric Rescorla, Dave Rossetti, Hector 3311 Santos, Jim Schaad, the Spamhaus.org team, Malte S. Stretz, Robert 3312 Sanders, Rand Wacker, Sam Weiler, and Dan Wing. 3314 The earlier DomainKeys was a primary source from which DKIM was 3315 derived. Further information about DomainKeys is at [RFC4870]. 3317 Appendix F. RFC4871bis Changes 3319 F.1. TO DO 3321 o Revise summary Introduction to reflect "authentic labeling" rather 3322 than "message authentication". 3324 o Review interoperability items to consider dropping unused 3325 features. 3327 o Review retention of other parameters, such as l= 3329 o "signatures inside parts shouldn't be processed"? 3331 F.2. DONE 3333 o Incorporate Updates RFC 3335 o Added RFC 5598 reference 3336 o Errata ID: 1376 - Verified - sha value for empty bodies 3338 o Errata ID: 1377 - Verified - no trailing CR-LF 3340 o Errata ID: 1378 - Verified - no default algorithm 3342 o Errata ID: 1379 - Verified - z= ABNF 3344 o Errata ID: 1384 - Verified - clarify relaxed step order 3346 o Errata ID: 1461 - Verified - h= ABNF 3348 o Errata ID: 1487 - Verified - v= ABNF 3350 o Errata ID: 1380 - Held for Document Update - x= fudge factor 3352 o Errata ID: 1381 - Held for Document Update - unknown q= value, 3353 h=/k=/s=/t= value 3355 o Errata ID: 1382 - Held for Document Update - unknown s= values 3356 (dup of 1381) 3358 o Errata ID: 1383 - Held for Document Update - add g= example 3360 o Errata ID: 1386 - Held for Document Update - fix DKIM-Signature 3361 example 3363 o Errata ID: 1532 - Held for Document Update - "v=DKIM1" 3365 o Errata ID: 1596 - Held for Document Update - *value* of the b= tag 3367 o Add Authentication Results RFC 5451 to 6.2 3369 Authors' Addresses 3371 D. Crocker (editor) 3372 Brandenburg InternetWorking 3373 675 Spruce Dr. 3374 Sunnyvale 3375 USA 3377 Phone: +1.408.246.8253 3378 Email: dcrocker@bbiw.net 3379 URI: http://bbiw.net 3380 Tony Hansen (editor) 3381 AT&T Laboratories 3382 200 Laurel Ave. South 3383 Middletown, NJ 07748 3384 USA 3386 Email: tony+dkimov@maillennium.att.com 3388 M. Kucherawy (editor) 3389 Cloudmark 3391 Email: msk@cloudmark.com