draft-ietf-dkim-base-07.txt   draft-ietf-dkim-base-08.txt 
DKIM E. Allman DKIM E. Allman
Internet-Draft Sendmail, Inc. Internet-Draft Sendmail, Inc.
Expires: June 7, 2007 J. Callas Expires: July 22, 2007 J. Callas
PGP Corporation PGP Corporation
M. Delany M. Delany
M. Libbey M. Libbey
Yahoo! Inc Yahoo! Inc
J. Fenton J. Fenton
M. Thomas M. Thomas
Cisco Systems, Inc. Cisco Systems, Inc.
December 4, 2006 January 18, 2007
DomainKeys Identified Mail (DKIM) Signatures DomainKeys Identified Mail (DKIM) Signatures
draft-ietf-dkim-base-07 draft-ietf-dkim-base-08
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 1, line 41 skipping to change at page 1, line 41
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on June 7, 2007. This Internet-Draft will expire on July 22, 2007.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2006). Copyright (C) The Internet Society (2007).
Abstract Abstract
DomainKeys Identified Mail (DKIM) defines a domain-level DomainKeys Identified Mail (DKIM) defines a domain-level
authentication framework for email using public-key cryptography and authentication framework for email using public-key cryptography and
key server technology to permit verification of the source and key server technology to permit verification of the source and
contents of messages by either Mail Transfer Agents (MTAs) or Mail contents of messages by either Mail Transfer Agents (MTAs) or Mail
User Agents (MUAs). The ultimate goal of this framework is to permit User Agents (MUAs). The ultimate goal of this framework is to permit
a signing domain to assert responsibility for a message, thus a signing domain to assert responsibility for a message, thus
protecting message signer identity and the integrity of the messages protecting message signer identity and the integrity of the messages
skipping to change at page 3, line 12 skipping to change at page 3, line 12
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 Signing Identity . . . . . . . . . . . . . . . . . . . . . 6 1.1 Signing Identity . . . . . . . . . . . . . . . . . . . . . 6
1.2 Scalability . . . . . . . . . . . . . . . . . . . . . . . 6 1.2 Scalability . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Simple Key Management . . . . . . . . . . . . . . . . . . 6 1.3 Simple Key Management . . . . . . . . . . . . . . . . . . 6
2. Terminology and Definitions . . . . . . . . . . . . . . . . 6 2. Terminology and Definitions . . . . . . . . . . . . . . . . 6
2.1 Signers . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1 Signers . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Verifiers . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Verifiers . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 White Space . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 White Space . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Common ABNF Tokens . . . . . . . . . . . . . . . . . . . . 7 2.4 Common ABNF Tokens . . . . . . . . . . . . . . . . . . . . 7
2.5 Imported ABNF Tokens . . . . . . . . . . . . . . . . . . . 8 2.5 Imported ABNF Tokens . . . . . . . . . . . . . . . . . . . 8
2.6 DKIM-Quoted-Printable . . . . . . . . . . . . . . . . . . 8 2.6 DKIM-Quoted-Printable . . . . . . . . . . . . . . . . . . 8
3. Protocol Elements . . . . . . . . . . . . . . . . . . . . . 9 3. Protocol Elements . . . . . . . . . . . . . . . . . . . . . 9
3.1 Selectors . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1 Selectors . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Tag=Value Lists . . . . . . . . . . . . . . . . . . . . . 11 3.2 Tag=Value Lists . . . . . . . . . . . . . . . . . . . . . 11
3.3 Signing and Verification Algorithms . . . . . . . . . . . 12 3.3 Signing and Verification Algorithms . . . . . . . . . . . 12
3.4 Canonicalization . . . . . . . . . . . . . . . . . . . . . 14 3.4 Canonicalization . . . . . . . . . . . . . . . . . . . . . 14
3.5 The DKIM-Signature header field . . . . . . . . . . . . . 18 3.5 The DKIM-Signature header field . . . . . . . . . . . . . 18
3.6 Key Management and Representation . . . . . . . . . . . . 25 3.6 Key Management and Representation . . . . . . . . . . . . 26
3.7 Computing the Message Hashes . . . . . . . . . . . . . . . 30 3.7 Computing the Message Hashes . . . . . . . . . . . . . . . 30
3.8 Signing by Parent Domains . . . . . . . . . . . . . . . . 32 3.8 Signing by Parent Domains . . . . . . . . . . . . . . . . 32
4. Semantics of Multiple Signatures . . . . . . . . . . . . . . 32 4. Semantics of Multiple Signatures . . . . . . . . . . . . . . 33
5. Signer Actions . . . . . . . . . . . . . . . . . . . . . . . 33 4.1 Example Scenarios . . . . . . . . . . . . . . . . . . . . 33
5.1 Determine if the Email Should be Signed and by Whom . . . 33 4.2 Interpretation . . . . . . . . . . . . . . . . . . . . . . 34
5.2 Select a private-key and corresponding selector 5. Signer Actions . . . . . . . . . . . . . . . . . . . . . . . 35
information . . . . . . . . . . . . . . . . . . . . . . . 33 5.1 Determine if the Email Should be Signed and by Whom . . . 35
5.3 Normalize the Message to Prevent Transport Conversions . . 34 5.2 Select a Private Key and Corresponding Selector
5.4 Determine the header fields to Sign . . . . . . . . . . . 34 Information . . . . . . . . . . . . . . . . . . . . . . . 36
5.5 Compute the Message Hash and Signature . . . . . . . . . . 36 5.3 Normalize the Message to Prevent Transport Conversions . . 36
5.6 Insert the DKIM-Signature header field . . . . . . . . . . 37 5.4 Determine the Header Fields to Sign . . . . . . . . . . . 37
6. Verifier Actions . . . . . . . . . . . . . . . . . . . . . . 37 5.5 Compute the Message Hash and Signature . . . . . . . . . . 40
6.1 Extract Signatures from the Message . . . . . . . . . . . 38 5.6 Insert the DKIM-Signature Header Field . . . . . . . . . . 40
6.2 Communicate Verification Results . . . . . . . . . . . . . 43 6. Verifier Actions . . . . . . . . . . . . . . . . . . . . . . 41
6.3 Interpret Results/Apply Local Policy . . . . . . . . . . . 44 6.1 Extract Signatures from the Message . . . . . . . . . . . 41
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . 45 6.2 Communicate Verification Results . . . . . . . . . . . . . 47
7.1 DKIM-Signature Tag Specifications . . . . . . . . . . . . 45 6.3 Interpret Results/Apply Local Policy . . . . . . . . . . . 47
7.2 DKIM-Signature Query Method Registry . . . . . . . . . . . 46 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . 49
7.3 DKIM-Signature Canonicalization Registry . . . . . . . . . 46 7.1 DKIM-Signature Tag Specifications . . . . . . . . . . . . 49
7.4 _domainkey DNS TXT Record Tag Specifications . . . . . . . 47 7.2 DKIM-Signature Query Method Registry . . . . . . . . . . . 49
7.5 DKIM Key Type Registry . . . . . . . . . . . . . . . . . . 48 7.3 DKIM-Signature Canonicalization Registry . . . . . . . . . 50
7.6 DKIM Hash Algorithms Registry . . . . . . . . . . . . . . 48 7.4 _domainkey DNS TXT Record Tag Specifications . . . . . . . 50
7.7 DKIM Service Types Registry . . . . . . . . . . . . . . . 48 7.5 DKIM Key Type Registry . . . . . . . . . . . . . . . . . . 51
7.8 DKIM Selector Flags Registry . . . . . . . . . . . . . . . 49 7.6 DKIM Hash Algorithms Registry . . . . . . . . . . . . . . 51
7.9 DKIM-Signature Header Field . . . . . . . . . . . . . . . 49 7.7 DKIM Service Types Registry . . . . . . . . . . . . . . . 52
8. Security Considerations . . . . . . . . . . . . . . . . . . 49 7.8 DKIM Selector Flags Registry . . . . . . . . . . . . . . . 52
8.1 Misuse of Body Length Limits ("l=" Tag) . . . . . . . . . 49 7.9 DKIM-Signature Header Field . . . . . . . . . . . . . . . 53
8.2 Misappropriated Private Key . . . . . . . . . . . . . . . 50 8. Security Considerations . . . . . . . . . . . . . . . . . . 53
8.3 Key Server Denial-of-Service Attacks . . . . . . . . . . . 51 8.1 Misuse of Body Length Limits ("l=" Tag) . . . . . . . . . 53
8.4 Attacks Against DNS . . . . . . . . . . . . . . . . . . . 51 8.2 Misappropriated Private Key . . . . . . . . . . . . . . . 54
8.5 Replay Attacks . . . . . . . . . . . . . . . . . . . . . . 52 8.3 Key Server Denial-of-Service Attacks . . . . . . . . . . . 54
8.6 Limits on Revoking Keys . . . . . . . . . . . . . . . . . 53 8.4 Attacks Against DNS . . . . . . . . . . . . . . . . . . . 55
8.7 Intentionally malformed Key Records . . . . . . . . . . . 53 8.5 Replay Attacks . . . . . . . . . . . . . . . . . . . . . . 55
8.8 Intentionally Malformed DKIM-Signature header fields . . . 53 8.6 Limits on Revoking Keys . . . . . . . . . . . . . . . . . 56
8.9 Information Leakage . . . . . . . . . . . . . . . . . . . 53 8.7 Intentionally malformed Key Records . . . . . . . . . . . 56
8.10 Remote Timing Attacks . . . . . . . . . . . . . . . . . 53 8.8 Intentionally Malformed DKIM-Signature header fields . . . 56
8.11 Reordered Header Fields . . . . . . . . . . . . . . . . 54 8.9 Information Leakage . . . . . . . . . . . . . . . . . . . 57
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 54 8.10 Remote Timing Attacks . . . . . . . . . . . . . . . . . 57
9.1 Normative References . . . . . . . . . . . . . . . . . . . 54 8.11 Reordered Header Fields . . . . . . . . . . . . . . . . 57
9.2 Informative References . . . . . . . . . . . . . . . . . . 55 8.12 RSA Attacks . . . . . . . . . . . . . . . . . . . . . . 57
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 55 8.13 Inappropriate Signing by Parent Domains . . . . . . . . 57
A. Example of Use (INFORMATIVE) . . . . . . . . . . . . . . . . 57 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.1 The user composes an email . . . . . . . . . . . . . . . . 57 9.1 Normative References . . . . . . . . . . . . . . . . . . . 58
A.2 The email is signed . . . . . . . . . . . . . . . . . . . 57 9.2 Informative References . . . . . . . . . . . . . . . . . . 59
A.3 The email signature is verified . . . . . . . . . . . . . 58 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 59
B. Usage Examples (INFORMATIVE) . . . . . . . . . . . . . . . . 59 A. Example of Use (INFORMATIVE) . . . . . . . . . . . . . . . . 61
B.1 Alternate Submission Scenarios . . . . . . . . . . . . . . 59 A.1 The user composes an email . . . . . . . . . . . . . . . . 61
B.2 Alternate Delivery Scenarios . . . . . . . . . . . . . . . 62 A.2 The email is signed . . . . . . . . . . . . . . . . . . . 61
C. Creating a public key (INFORMATIVE) . . . . . . . . . . . . 64 A.3 The email signature is verified . . . . . . . . . . . . . 62
D. MUA Considerations . . . . . . . . . . . . . . . . . . . . . 65 B. Usage Examples (INFORMATIVE) . . . . . . . . . . . . . . . . 63
E. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 66 B.1 Alternate Submission Scenarios . . . . . . . . . . . . . . 64
F. Edit History . . . . . . . . . . . . . . . . . . . . . . . . 66 B.2 Alternate Delivery Scenarios . . . . . . . . . . . . . . . 66
F.1 Changes since -ietf-06 version . . . . . . . . . . . . . . 67 C. Creating a public key (INFORMATIVE) . . . . . . . . . . . . 68
F.2 Changes since -ietf-05 version . . . . . . . . . . . . . . 67 D. MUA Considerations . . . . . . . . . . . . . . . . . . . . . 70
F.3 Changes since -ietf-04 version . . . . . . . . . . . . . . 68 E. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 70
F.4 Changes since -ietf-03 version . . . . . . . . . . . . . . 68 F. Edit History . . . . . . . . . . . . . . . . . . . . . . . . 71
F.5 Changes since -ietf-02 version . . . . . . . . . . . . . . 69 F.1 Changes since -ietf-07 version . . . . . . . . . . . . . . 71
F.6 Changes since -ietf-01 version . . . . . . . . . . . . . . 70 F.2 Changes since -ietf-06 version . . . . . . . . . . . . . . 72
F.7 Changes since -ietf-00 version . . . . . . . . . . . . . . 71 F.3 Changes since -ietf-05 version . . . . . . . . . . . . . . 73
F.8 Changes since -allman-01 version . . . . . . . . . . . . . 71 F.4 Changes since -ietf-04 version . . . . . . . . . . . . . . 73
F.9 Changes since -allman-00 version . . . . . . . . . . . . . 72 F.5 Changes since -ietf-03 version . . . . . . . . . . . . . . 74
Intellectual Property and Copyright Statements . . . . . . . 73 F.6 Changes since -ietf-02 version . . . . . . . . . . . . . . 75
F.7 Changes since -ietf-01 version . . . . . . . . . . . . . . 76
F.8 Changes since -ietf-00 version . . . . . . . . . . . . . . 76
F.9 Changes since -allman-01 version . . . . . . . . . . . . . 77
F.10 Changes since -allman-00 version . . . . . . . . . . . . 77
Intellectual Property and Copyright Statements . . . . . . . 79
1. Introduction 1. Introduction
[[Note: text in double square brackets (such as this text) will be [[Note: text in double square brackets (such as this text) will be
deleted before publication.]] deleted before publication.]]
DomainKeys Identified Mail (DKIM) defines a mechanism by which email DomainKeys Identified Mail (DKIM) defines a mechanism by which email
messages can be cryptographically signed, permitting a signing domain messages can be cryptographically signed, permitting a signing domain
to claim responsibility for the introduction of a message into the to claim responsibility for the introduction of a message into the
mail stream. Message recipients can verify the signature by querying mail stream. Message recipients can verify the signature by querying
skipping to change at page 5, line 49 skipping to change at page 5, line 49
DKIM: DKIM:
o is compatible with the existing email infrastructure and o is compatible with the existing email infrastructure and
transparent to the fullest extent possible; transparent to the fullest extent possible;
o requires minimal new infrastructure; o requires minimal new infrastructure;
o can be implemented independently of clients in order to reduce o can be implemented independently of clients in order to reduce
deployment time; deployment time;
o does not require the use of an additional trusted third party
(such as a certificate authority or other entity) which might
impose significant costs or introduce delays to deployment;
o can be deployed incrementally; o can be deployed incrementally;
o allows delegation of signing to third parties. o allows delegation of signing to third parties.
1.1 Signing Identity 1.1 Signing Identity
DKIM separates the question of the identity of the signer of the DKIM separates the question of the identity of the signer of the
message from the purported author of the message. In particular, a message from the purported author of the message. In particular, a
signature includes the identity of the signer. Verifiers can use the signature includes the identity of the signer. Verifiers can use the
signing information to decide how they want to process the message. signing information to decide how they want to process the message.
skipping to change at page 6, line 39 skipping to change at page 6, line 36
communicate with anyone else without introduction. communicate with anyone else without introduction.
1.3 Simple Key Management 1.3 Simple Key Management
DKIM differs from traditional hierarchical public-key systems in that DKIM differs from traditional hierarchical public-key systems in that
no Certificate Authority infrastructure is required; the verifier no Certificate Authority infrastructure is required; the verifier
requests the public key from a repository in the domain of the requests the public key from a repository in the domain of the
claimed signer directly rather than from a third party. claimed signer directly rather than from a third party.
The DNS is proposed as the initial mechanism for the public keys. The DNS is proposed as the initial mechanism for the public keys.
Thus, DKIM currently depends on DNS adminstration and the security of Thus, DKIM currently depends on DNS administration and the security
the DNS system. DKIM is designed to be extensible to other key of the DNS system. DKIM is designed to be extensible to other key
fetching services as they become available. fetching services as they become available.
2. Terminology and Definitions 2. Terminology and Definitions
This section defines terms used in the rest of the document. Syntax This section defines terms used in the rest of the document. Syntax
descriptions use the form described in Augmented BNF for Syntax descriptions use the form described in Augmented BNF for Syntax
Specifications [RFC4234]. Specifications [RFC4234].
2.1 Signers 2.1 Signers
Elements in the mail system that sign messages are referred to as Elements in the mail system that sign messages on behalf of a domain
signers. These may be MUAs (Mail User Agents), MSAs (Mail Submission are referred to as signers. These may be MUAs (Mail User Agents),
Agents), MTAs (Mail Transfer Agents), or other agents such as mailing MSAs (Mail Submission Agents), MTAs (Mail Transfer Agents), or other
list exploders. In general any signer will be involved in the agents such as mailing list exploders. In general any signer will be
injection of a message into the message system in some way. The key involved in the injection of a message into the message system in
issue is that a message must be signed before it leaves the some way. The key issue is that a message must be signed before it
administrative domain of the signer. leaves the administrative domain of the signer.
2.2 Verifiers 2.2 Verifiers
Elements in the mail system that verify signatures are referred to as Elements in the mail system that verify signatures are referred to as
verifiers. These may be MTAs, Mail Delivery Agents (MDAs), or MUAs. verifiers. These may be MTAs, Mail Delivery Agents (MDAs), or MUAs.
In most cases it is expected that verifiers will be close to an end In most cases it is expected that verifiers will be close to an end
user (reader) of the message or some consuming agent such as a user (reader) of the message or some consuming agent such as a
mailing list exploder. mailing list exploder.
2.3 White Space 2.3 White Space
skipping to change at page 8, line 7 skipping to change at page 7, line 45
The definition of FWS is identical to that in [RFC2822] except for The definition of FWS is identical to that in [RFC2822] except for
the exclusion of obs-FWS. the exclusion of obs-FWS.
2.4 Common ABNF Tokens 2.4 Common ABNF Tokens
The following ABNF tokens are used elsewhere in this document. The following ABNF tokens are used elsewhere in this document.
hyphenated-word = ALPHA [ *(ALPHA / DIGIT / "-") (ALPHA / DIGIT) ] hyphenated-word = ALPHA [ *(ALPHA / DIGIT / "-") (ALPHA / DIGIT) ]
base64string = 1*(ALPHA / DIGIT / "+" / "/" / LWSP) base64string = 1*(ALPHA / DIGIT / "+" / "/" / LWSP)
[ "=" *LWSP [ "=" *LWSP ] ] [ "=" LWSP [ "=" LWSP ] ]
2.5 Imported ABNF Tokens 2.5 Imported ABNF Tokens
The following tokens are imported from other RFCs as noted. Those The following tokens are imported from other RFCs as noted. Those
RFCs should be considered definitive. RFCs should be considered definitive.
The following tokens are imported from [RFC2821]: The following tokens are imported from [RFC2821]:
o "Local-part" (implementation warning: this permits quoted o "Local-part" (implementation warning: this permits quoted
strings) strings)
skipping to change at page 10, line 48 skipping to change at page 10, line 44
in different regions or on different email servers. in different regions or on different email servers.
Beyond administrative convenience, Selectors make it possible to Beyond administrative convenience, Selectors make it possible to
seamlessly replace public keys on a routine basis. If a domain seamlessly replace public keys on a routine basis. If a domain
wishes to change from using a public key associated with Selector wishes to change from using a public key associated with Selector
"january2005" to a public key associated with Selector "january2005" to a public key associated with Selector
"february2005", it merely makes sure that both public keys are "february2005", it merely makes sure that both public keys are
advertised in the public-key repository concurrently for the advertised in the public-key repository concurrently for the
transition period during which email may be in transit prior to transition period during which email may be in transit prior to
verification. At the start of the transition period, the outbound verification. At the start of the transition period, the outbound
email servers are configured to sign with the "february2005" private- email servers are configured to sign with the "february2005" private
key. At the end of the transition period, the "january2005" public key. At the end of the transition period, the "january2005" public
key is removed from the public-key repository. key is removed from the public-key repository.
INFORMATIVE NOTE: A key may also be revoked as described below. INFORMATIVE NOTE: A key may also be revoked as described below.
The distinction between revoking and removing a key selector The distinction between revoking and removing a key selector
record is subtle. When phasing out keys as described above, a record is subtle. When phasing out keys as described above, a
signing domain would probably simply remove the key record after signing domain would probably simply remove the key record after
the transition period. However, a signing domain could elect to the transition period. However, a signing domain could elect to
revoke the key (but maintain the key record) for a further period. revoke the key (but maintain the key record) for a further period.
There is no defined semantic difference between a revoked key and There is no defined semantic difference between a revoked key and
a removed key. a removed key.
While some domains may wish to make Selector values well known, While some domains may wish to make Selector values well known,
others will want to take care not to allocate Selector names in a way others will want to take care not to allocate Selector names in a way
that allows harvesting of data by outside parties. For example, if that allows harvesting of data by outside parties. For example, if
per-user keys are issued, the domain owner will need to make the per-user keys are issued, the domain owner will need to make the
decision as to whether to associate this Selector directly with the decision as to whether to associate this Selector directly with the
user name, or make it some unassociated random value, such as a user name, or make it some unassociated random value, such as a
fingerprint of the public key. fingerprint of the public key.
Reusing a Selector with a new key (for example, changing the key INFORMATIVE OPERATIONS NOTE: Reusing a Selector with a new key
associated with a user's name) makes it impossible to tell the (for example, changing the key associated with a user's name)
difference between a message that didn't verify because the key is no makes it impossible to tell the difference between a message that
longer valid versus a message that is actually forged. Signers didn't verify because the key is no longer valid versus a message
SHOULD NOT change the key associated with a Selector. When creating that is actually forged. For this reason, signers are ill-advised
a new key, signers SHOULD associate it with a new Selector. to reuse selectors for new keys. A better strategy is to assign
new keys to new selectors.
3.2 Tag=Value Lists 3.2 Tag=Value Lists
DKIM uses a simple "tag=value" syntax in several contexts, including DKIM uses a simple "tag=value" syntax in several contexts, including
in messages and domain signature records. in messages and domain signature records.
Values are a series of strings containing either plain text, "base64" Values are a series of strings containing either plain text, "base64"
text (as defined in [RFC2045], section 6.8), "qp-section" (ibid, text (as defined in [RFC2045], section 6.8), "qp-section" (ibid,
section 6.7), or "dkim-quoted-printable" (as defined in Section 2.6). section 6.7), or "dkim-quoted-printable" (as defined in Section 2.6).
The name of the tag will determine the encoding of each value. The name of the tag will determine the encoding of each value.
skipping to change at page 13, line 40 skipping to change at page 13, line 40
performance and risk. Since short RSA keys more easily succumb to performance and risk. Since short RSA keys more easily succumb to
off-line attacks, signers MUST use RSA keys of at least 1024 bits for off-line attacks, signers MUST use RSA keys of at least 1024 bits for
long-lived keys. Verifiers MUST be able to validate signatures with long-lived keys. Verifiers MUST be able to validate signatures with
keys ranging from 512 bits to 2048 bits, and they MAY be able to keys ranging from 512 bits to 2048 bits, and they MAY be able to
validate signatures with larger keys. Verifier policies may use the validate signatures with larger keys. Verifier policies may use the
length of the signing key as one metric for determining whether a length of the signing key as one metric for determining whether a
signature is acceptable. signature is acceptable.
Factors that should influence the key size choice include: Factors that should influence the key size choice include:
o The practical constraint that large keys may not fit within a 512 o The practical constraint that large (e.g., 4096 bit) keys may not
byte DNS UDP response packet fit within a 512 byte DNS UDP response packet
o The security constraint that keys smaller than 1024 bits are o The security constraint that keys smaller than 1024 bits are
subject to off-line attacks subject to off-line attacks
o Larger keys impose higher CPU costs to verify and sign email o Larger keys impose higher CPU costs to verify and sign email
o Keys can be replaced on a regular basis, thus their lifetime can o Keys can be replaced on a regular basis, thus their lifetime can
be relatively short be relatively short
o The security goals of this specification are modest compared to o The security goals of this specification are modest compared to
typical goals of other systems that employ digital signatures typical goals of other systems that employ digital signatures
skipping to change at page 15, line 46 skipping to change at page 15, line 46
value. value.
o Delete any WSP characters remaining before and after the colon o Delete any WSP characters remaining before and after the colon
separating the header field name from the header field value. The separating the header field name from the header field value. The
colon separator MUST be retained. colon separator MUST be retained.
3.4.3 The "simple" Body Canonicalization Algorithm 3.4.3 The "simple" Body Canonicalization Algorithm
The "simple" body canonicalization algorithm ignores all empty lines The "simple" body canonicalization algorithm ignores all empty lines
at the end of the message body. An empty line is a line of zero at the end of the message body. An empty line is a line of zero
length after removal of the line terminator. If there is no trailing length after removal of the line terminator. If there is no body or
CRLF on the message, a CRLF is added. It makes no other changes to no trailing CRLF on the message body, a CRLF is added. It makes no
the message body. In more formal terms, the "simple" body other changes to the message body. In more formal terms, the
canonicalization algorithm converts "0*CRLF" at the end of the body "simple" body canonicalization algorithm converts "0*CRLF" at the end
to a single "CRLF". of the body to a single "CRLF".
Note that a completely empty or missing body is canonicalized as a
single "CRLF"; that is, the canonicalized length will be 2 octets.
3.4.4 The "relaxed" Body Canonicalization Algorithm 3.4.4 The "relaxed" Body Canonicalization Algorithm
The "relaxed" body canonicalization algorithm: The "relaxed" body canonicalization algorithm:
o Ignores all white space at the end of lines. Implementations MUST o Ignores all white space at the end of lines. Implementations MUST
NOT remove the CRLF at the end of the line. NOT remove the CRLF at the end of the line.
o Reduces all sequences of WSP within a line to a single SP o Reduces all sequences of WSP within a line to a single SP
character. character.
skipping to change at page 17, line 8 skipping to change at page 17, line 11
algorithm is not included as part of the body length count. Signers algorithm is not included as part of the body length count. Signers
of MIME messages that include a body length count SHOULD be sure that of MIME messages that include a body length count SHOULD be sure that
the length extends to the closing MIME boundary string. the length extends to the closing MIME boundary string.
INFORMATIVE IMPLEMENTATION NOTE: A signer wishing to ensure that INFORMATIVE IMPLEMENTATION NOTE: A signer wishing to ensure that
the only acceptable modifications are to add to the MIME postlude the only acceptable modifications are to add to the MIME postlude
would use a body length count encompassing the entire final MIME would use a body length count encompassing the entire final MIME
boundary string, including the final "--CRLF". A signer wishing boundary string, including the final "--CRLF". A signer wishing
to allow additional MIME parts but not modification of existing to allow additional MIME parts but not modification of existing
parts would use a body length count extending through the final parts would use a body length count extending through the final
MIME boundary string, omitting the final "--CRLF". MIME boundary string, omitting the final "--CRLF". Note that this
only works for some MIME types, e.g., multipart/mixed but not
multipart/signed.
A body length count of zero means that the body is completely A body length count of zero means that the body is completely
unsigned. unsigned.
Signers wishing to ensure that no modification of any sort can occur Signers wishing to ensure that no modification of any sort can occur
should specify the "simple" canonicalization algorithm for both should specify the "simple" canonicalization algorithm for both
header and body and omit the body length count. header and body and omit the body length count.
3.4.6 Canonicalization Examples (INFORMATIVE) 3.4.6 Canonicalization Examples (INFORMATIVE)
skipping to change at page 19, line 7 skipping to change at page 19, line 11
One [RFC2045], with the additional conversion of semicolon characters One [RFC2045], with the additional conversion of semicolon characters
to "=3B"; intuitively, this is one line of quoted-printable encoded to "=3B"; intuitively, this is one line of quoted-printable encoded
text. The dkim-quoted-printable syntax is defined in Section 2.6. text. The dkim-quoted-printable syntax is defined in Section 2.6.
Tags on the DKIM-Signature header field along with their type and Tags on the DKIM-Signature header field along with their type and
requirement status are shown below. Unrecognized tags MUST be requirement status are shown below. Unrecognized tags MUST be
ignored. ignored.
v= Version (MUST be included). This tag defines the version of this v= Version (MUST be included). This tag defines the version of this
specification that applies to the signature record. It MUST have specification that applies to the signature record. It MUST have
the value 0.5. the value 0.5. Note that verifiers must do a string comparison
on this value; for example, "1" is not the same as "1.0".
ABNF: ABNF:
sig-v-tag = %x76 [FWS] "=" [FWS] "0.5" sig-v-tag = %x76 [FWS] "=" [FWS] "0.5"
INFORMATIVE NOTE: DKIM-Signature version numbers are INFORMATIVE NOTE: DKIM-Signature version numbers are
expected to increase arithmetically as new versions of this expected to increase arithmetically as new versions of this
specification are released. specification are released.
[[INFORMATIVE NOTE: Upon publication, this version number [[INFORMATIVE NOTE: Upon publication, this version number
should be changed to "1", and this note should be deleted.]] should be changed to "1" (two places), and this note should
be deleted.]]
a= The algorithm used to generate the signature (plain-text; a= The algorithm used to generate the signature (plain-text;
REQUIRED). Verifiers MUST support "rsa-sha1" and "rsa-sha256"; REQUIRED). Verifiers MUST support "rsa-sha1" and "rsa-sha256";
signers SHOULD sign using "rsa-sha256". See Section 3.3 for a signers SHOULD sign using "rsa-sha256". See Section 3.3 for a
description of algorithms. description of algorithms.
ABNF: ABNF:
sig-a-tag = %x61 [FWS] "=" [FWS] sig-a-tag-alg sig-a-tag = %x61 [FWS] "=" [FWS] sig-a-tag-alg
sig-a-tag-alg = sig-a-tag-k "-" sig-a-tag-h sig-a-tag-alg = sig-a-tag-k "-" sig-a-tag-h
skipping to change at page 23, line 15 skipping to change at page 23, line 23
include content that solely benefits the attacker. It is include content that solely benefits the attacker. It is
possible for the appended content to completely replace the possible for the appended content to completely replace the
original content in the end recipient's eyes and to defeat original content in the end recipient's eyes and to defeat
duplicate message detection algorithms. Examples are duplicate message detection algorithms. Examples are
described in Security Considerations (Section 8). To avoid described in Security Considerations (Section 8). To avoid
this attack, signers should be extremely wary of using this this attack, signers should be extremely wary of using this
tag, and verifiers might wish to ignore the tag or remove tag, and verifiers might wish to ignore the tag or remove
text that appears after the specified content length. text that appears after the specified content length.
INFORMATIVE NOTE: The value of the l= tag is constrained to INFORMATIVE NOTE: The value of the l= tag is constrained to
76 decimal digits, which will fit in a 256-bit binary integer 76 decimal digits. This constraint is not intended to
field. This constraint is not intended to predict the size predict the size of future messages or to require
of future messages, but is intended to remind the implementer implementations to use an integer representation large enough
to check the length of this and all other tags during to represent the maximum possible value, but is intended to
verification. Implementers may need to limit the actual remind the implementer to check the length of this and all
value expressed to a value smaller than 10^76, e.g., to allow other tags during verification and to test for integer
a message to fit within the available storage space. overflow when decoding the value. Implementers may need to
limit the actual value expressed to a value smaller than
10^76, e.g., to allow a message to fit within the available
storage space.
ABNF: ABNF:
sig-l-tag = %x6c [FWS] "=" [FWS] 1*76DIGIT sig-l-tag = %x6c [FWS] "=" [FWS] 1*76DIGIT
q= A colon-separated list of query methods used to retrieve the q= A colon-separated list of query methods used to retrieve the
public key (plain-text; OPTIONAL, default is "dns/txt"). Each public key (plain-text; OPTIONAL, default is "dns/txt"). Each
query method is of the form "type[/options]", where the syntax query method is of the form "type[/options]", where the syntax
and semantics of the options depends on the type and specified and semantics of the options depends on the type and specified
options. If there are multiple query mechanisms listed, the options. If there are multiple query mechanisms listed, the
skipping to change at page 24, line 21 skipping to change at page 24, line 31
t= Signature Timestamp (plain-text unsigned decimal integer; t= Signature Timestamp (plain-text unsigned decimal integer;
RECOMMENDED, default is an unknown creation time). The time that RECOMMENDED, default is an unknown creation time). The time that
this signature was created. The format is the number of seconds this signature was created. The format is the number of seconds
since 00:00:00 on January 1, 1970 in the UTC time zone. The since 00:00:00 on January 1, 1970 in the UTC time zone. The
value is expressed as an unsigned integer in decimal ASCII. This value is expressed as an unsigned integer in decimal ASCII. This
value is not constrained to fit into a 31- or 32-bit integer. value is not constrained to fit into a 31- or 32-bit integer.
Implementations SHOULD be prepared to handle values up to at Implementations SHOULD be prepared to handle values up to at
least 10^12 (until approximately AD 200,000; this fits into 40 least 10^12 (until approximately AD 200,000; this fits into 40
bits). To avoid denial of service attacks, implementations MAY bits). To avoid denial of service attacks, implementations MAY
consider any value longer than 12 digits to be infinite. Leap consider any value longer than 12 digits to be infinite. Leap
seconds are not counted. seconds are not counted. Implementations MAY ignore signatures
that have a timestamp in the future.
ABNF: ABNF:
sig-t-tag = %x74 [FWS] "=" [FWS] 1*12DIGIT sig-t-tag = %x74 [FWS] "=" [FWS] 1*12DIGIT
x= Signature Expiration (plain-text unsigned decimal integer; x= Signature Expiration (plain-text unsigned decimal integer;
RECOMMENDED, default is no expiration). The format is the same RECOMMENDED, default is no expiration). The format is the same
as in the "t=" tag, represented as an absolute date, not as a as in the "t=" tag, represented as an absolute date, not as a
time delta from the signing timestamp. The value is expressed as time delta from the signing timestamp. The value is expressed as
an unsigned integer in decimal ASCII, with the same constraints an unsigned integer in decimal ASCII, with the same constraints
skipping to change at page 25, line 20 skipping to change at page 25, line 28
tag. The header field text itself must encode the vertical bar tag. The header field text itself must encode the vertical bar
("|", %x7C) character (i.e., vertical bars in the z= text are ("|", %x7C) character (i.e., vertical bars in the z= text are
metacharacters, and any actual vertical bar characters in a metacharacters, and any actual vertical bar characters in a
copied header field must be encoded). Note that all white space copied header field must be encoded). Note that all white space
must be encoded, including white space between the colon and the must be encoded, including white space between the colon and the
header field value. After encoding, LWSP MAY be added at header field value. After encoding, LWSP MAY be added at
arbitrary locations in order to avoid excessively long lines; arbitrary locations in order to avoid excessively long lines;
such white space is NOT part of the value of the header field, such white space is NOT part of the value of the header field,
and MUST be removed before decoding. and MUST be removed before decoding.
Verifiers MUST NOT use the header field names or copied values The header fields referenced by the h= tag refer to the fields in
for checking the signature in any way. Copied header field the 2822 header of the message, not to any copied fields in the
values are for diagnostic use only. z= tag. Copied header field values are for diagnostic use.
Header fields with characters requiring conversion (perhaps from Header fields with characters requiring conversion (perhaps from
legacy MTAs which are not [RFC2822] compliant) SHOULD be legacy MTAs which are not [RFC2822] compliant) SHOULD be
converted as described in MIME Part Three [RFC2047]. converted as described in MIME Part Three [RFC2047].
ABNF: ABNF:
sig-z-tag = %x7A [FWS] "=" [FWS] sig-z-tag-copy sig-z-tag = %x7A [FWS] "=" [FWS] sig-z-tag-copy
*( [FWS] "|" sig-z-tag-copy ) *( [FWS] "|" sig-z-tag-copy )
sig-z-tag-copy = hdr-name ":" qp-hdr-value sig-z-tag-copy = hdr-name ":" qp-hdr-value
qp-hdr-value = dkim-quoted-printable ; with "|" encoded qp-hdr-value = dkim-quoted-printable ; with "|" encoded
skipping to change at page 26, line 15 skipping to change at page 26, line 30
a trusted third party. However, DKIM can achieve a sufficient level a trusted third party. However, DKIM can achieve a sufficient level
of security, with significantly enhanced scalability, by simply of security, with significantly enhanced scalability, by simply
having the verifier query the purported signer's DNS entry (or some having the verifier query the purported signer's DNS entry (or some
security-equivalent) in order to retrieve the public key. security-equivalent) in order to retrieve the public key.
DKIM keys can potentially be stored in multiple types of key servers DKIM keys can potentially be stored in multiple types of key servers
and in multiple formats. The storage and format of keys are and in multiple formats. The storage and format of keys are
irrelevant to the remainder of the DKIM algorithm. irrelevant to the remainder of the DKIM algorithm.
Parameters to the key lookup algorithm are the type of the lookup Parameters to the key lookup algorithm are the type of the lookup
(the "q=" tag), the domain of the responsible signer (the "d=" tag of (the "q=" tag), the domain of the signer (the "d=" tag of the DKIM-
the DKIM-Signature header field), and the Selector (the "s=" tag). Signature header field), and the Selector (the "s=" tag).
public_key = dkim_find_key(q_val, d_val, s_val) public_key = dkim_find_key(q_val, d_val, s_val)
This document defines a single binding, using DNS TXT records to This document defines a single binding, using DNS TXT records to
distribute the keys. Other bindings may be defined in the future. distribute the keys. Other bindings may be defined in the future.
3.6.1 Textual Representation 3.6.1 Textual Representation
It is expected that many key servers will choose to present the keys It is expected that many key servers will choose to present the keys
in an otherwise unstructured text format (for example, an XML form in an otherwise unstructured text format (for example, an XML form
skipping to change at page 26, line 40 skipping to change at page 27, line 9
The overall syntax is a tag-list as described in Section 3.2. The The overall syntax is a tag-list as described in Section 3.2. The
current valid tags are described below. Other tags MAY be present current valid tags are described below. Other tags MAY be present
and MUST be ignored by any implementation that does not understand and MUST be ignored by any implementation that does not understand
them. them.
v= Version of the DKIM key record (plain-text; RECOMMENDED, default v= Version of the DKIM key record (plain-text; RECOMMENDED, default
is "DKIM1"). If specified, this tag MUST be set to "DKIM1" is "DKIM1"). If specified, this tag MUST be set to "DKIM1"
(without the quotes). This tag MUST be the first tag in the (without the quotes). This tag MUST be the first tag in the
record. Records beginning with a "v=" tag with any other value record. Records beginning with a "v=" tag with any other value
MUST be discarded. MUST be discarded. Note that verifiers must do a string
comparison on this value; for example, "DKIM1" is not the same as
"DKIM1.0".
ABNF: ABNF:
key-v-tag = %x76 [FWS] "=" [FWS] "DKIM1" key-v-tag = %x76 [FWS] "=" [FWS] "DKIM1"
g= granularity of the key (plain-text; OPTIONAL, default is "*"). g= granularity of the key (plain-text; OPTIONAL, default is "*").
This value MUST match the Local-part of the "i=" tag of the DKIM- This value MUST match the Local-part of the "i=" tag of the DKIM-
Signature header field (or its default value of the empty string Signature header field (or its default value of the empty string
if "i=" is not specified), with a "*" character matching a if "i=" is not specified), with a single, optional "*" character
sequence of zero or more arbitrary characters ("wildcarding"). matching a sequence of zero or more arbitrary characters
("wildcarding"). An email with a signing address that does not
match the value of this tag constitutes a failed verification.
The intent of this tag is to constrain which signing address can The intent of this tag is to constrain which signing address can
legitimately use this Selector. An email with a signing address legitimately use this Selector, for example, when delegating a
that does not match the value of this tag constitutes a failed key to a third party that should only be used for special
verification. Wildcarding allows matching for addresses such as purposes. Wildcarding allows matching for addresses such as
"user+*". An empty "g=" value never matches any addresses. "user+*" or "*-offer". An empty "g=" value never matches any
addresses.
ABNF: ABNF:
key-g-tag = %x67 [FWS] "=" [FWS] key-g-tag-lpart key-g-tag = %x67 [FWS] "=" [FWS] key-g-tag-lpart
key-g-tag-lpart = [dot-atom-text] ["*"] [dot-atom-text] key-g-tag-lpart = [dot-atom-text] ["*" [dot-atom-text] ]
[[NON-NORMATIVE DISCUSSION POINT: "*" is legal in a "dot- [[NON-NORMATIVE DISCUSSION POINT: "*" is legal in a "dot-
atom-text". This should probably use a different character atom-text". This should probably use a different character
for wildcarding. Unfortunately, the options are non-mnemonic for wildcarding. Unfortunately, the options are non-mnemonic
(e.g., "@", "(", ":"). Alternatively we could insist on (e.g., "@", "(", ":"). Alternatively we could insist on
escaping a "*" intended as a literal "*" in the address.]] escaping a "*" intended as a literal "*" in the address.]]
h= Acceptable hash algorithms (plain-text; OPTIONAL, defaults to h= Acceptable hash algorithms (plain-text; OPTIONAL, defaults to
allowing all algorithms). A colon-separated list of hash allowing all algorithms). A colon-separated list of hash
algorithms that might be used. Signers and Verifiers MUST algorithms that might be used. Signers and Verifiers MUST
skipping to change at page 28, line 12 skipping to change at page 28, line 26
ABNF: ABNF:
key-k-tag = %x76 [FWS] "=" [FWS] key-k-tag-type key-k-tag = %x76 [FWS] "=" [FWS] key-k-tag-type
key-k-tag-type = "rsa" / x-key-k-tag-type key-k-tag-type = "rsa" / x-key-k-tag-type
x-key-k-tag-type = hyphenated-word ; for future extension x-key-k-tag-type = hyphenated-word ; for future extension
n= Notes that might be of interest to a human (qp-section; OPTIONAL, n= Notes that might be of interest to a human (qp-section; OPTIONAL,
default is empty). No interpretation is made by any program. default is empty). No interpretation is made by any program.
This tag should be used sparingly in any key server mechanism This tag should be used sparingly in any key server mechanism
that has space limitations (notably DNS). that has space limitations (notably DNS). This is intended for
use by administrators, not end users.
ABNF: ABNF:
key-n-tag = %x6e [FWS] "=" [FWS] qp-section key-n-tag = %x6e [FWS] "=" [FWS] qp-section
p= Public-key data (base64; REQUIRED). An empty value means that p= Public-key data (base64; REQUIRED). An empty value means that
this public key has been revoked. The syntax and semantics of this public key has been revoked. The syntax and semantics of
this tag value before being encoded in base64 is defined by the this tag value before being encoded in base64 is defined by the
k= tag. k= tag.
skipping to change at page 28, line 45 skipping to change at page 29, line 19
s= Service Type (plain-text; OPTIONAL; default is "*"). A colon- s= Service Type (plain-text; OPTIONAL; default is "*"). A colon-
separated list of service types to which this record applies. separated list of service types to which this record applies.
Verifiers for a given service type MUST ignore this record if the Verifiers for a given service type MUST ignore this record if the
appropriate type is not listed. Currently defined service types appropriate type is not listed. Currently defined service types
are: are:
* matches all service types * matches all service types
email electronic mail (not necessarily limited to SMTP) email electronic mail (not necessarily limited to SMTP)
This tag is intended to permit signers to constrain the use of This tag is intended to constrain the use of keys for other
delegated keys, e.g., where a company is willing to delegate the purposes, should use of DKIM be defined by other services in the
right to send mail in their name to an outsourcer, but not to future.
send IM or make VoIP calls. (This of course presumes that these
keys are used in other services in the future.)
ABNF: ABNF:
key-s-tag = %x73 [FWS] "=" [FWS] key-s-tag-type key-s-tag = %x73 [FWS] "=" [FWS] key-s-tag-type
0*( [FWS] ":" [FWS] key-s-tag-type 0*( [FWS] ":" [FWS] key-s-tag-type )
key-s-tag-type = "email" / "*" / x-key-s-tag-type key-s-tag-type = "email" / "*" / x-key-s-tag-type
x-key-s-tag-type = hyphenated-word ; for future extension x-key-s-tag-type = hyphenated-word ; for future extension
t= Flags, represented as a colon-separated list of names (plain- t= Flags, represented as a colon-separated list of names (plain-
text; OPTIONAL, default is no flags set). The defined flags are: text; OPTIONAL, default is no flags set). The defined flags are:
y This domain is testing DKIM. Verifiers MUST NOT treat y This domain is testing DKIM. Verifiers MUST NOT treat
messages from signers in testing mode differently from messages from signers in testing mode differently from
unsigned email, even should the signature fail to verify. unsigned email, even should the signature fail to verify.
Verifiers MAY wish to track testing mode results to assist Verifiers MAY wish to track testing mode results to assist
skipping to change at page 30, line 34 skipping to change at page 31, line 9
computing two cryptographic hashes over the message. Signers will computing two cryptographic hashes over the message. Signers will
choose the parameters of the signature as described in Signer Actions choose the parameters of the signature as described in Signer Actions
(Section 5); verifiers will use the parameters specified in the (Section 5); verifiers will use the parameters specified in the
"DKIM-Signature" header field being verified. In the following "DKIM-Signature" header field being verified. In the following
discussion, the names of the tags in the "DKIM-Signature" header discussion, the names of the tags in the "DKIM-Signature" header
field which either exists (when verifying) or will be created (when field which either exists (when verifying) or will be created (when
signing) are used. Note that canonicalization (Section 3.4) is only signing) are used. Note that canonicalization (Section 3.4) is only
used to prepare the email for signing or verifying; it does not used to prepare the email for signing or verifying; it does not
affect the transmitted email in any way. affect the transmitted email in any way.
The signer or verifier MUST compute two hashes, one over the body of The signer/verifier MUST compute two hashes, one over the body of the
the message and one over the selected header fields of the message. message and one over the selected header fields of the message.
Signers MUST compute them in the order shown. Verifiers MAY compute Signers MUST compute them in the order shown. Verifiers MAY compute
them in any order convenient to the verifier, provided that the them in any order convenient to the verifier, provided that the
result is semantically identical to the semantics that would be the result is semantically identical to the semantics that would be the
case had they been computed in this order. case had they been computed in this order.
In hash step 1, the signer or verifier MUST hash the message body, In hash step 1, the signer/verifier MUST hash the message body,
canonicalized using the body canonicalization algorithm specified in canonicalized using the body canonicalization algorithm specified in
the "c=" tag and truncated to the length specified in the "l=" tag. the "c=" tag and then truncated to the length specified in the "l="
That hash value is then converted to base64 form and inserted into tag. That hash value is then converted to base64 form and inserted
the "bh=" tag of the DKIM-Signature: header field. into (signers) or compared to (verifiers) the "bh=" tag of the DKIM-
Signature: header field.
In hash step 2, the signer or verifier MUST pass the following to the In hash step 2, the signer/verifier MUST pass the following to the
hash algorithm in the indicated order. hash algorithm in the indicated order.
1. The header fields specified by the "h=" tag, in the order 1. The header fields specified by the "h=" tag, in the order
specified in that tag, and canonicalized using the header specified in that tag, and canonicalized using the header
canonicalization algorithm specified in the "c=" tag. Each canonicalization algorithm specified in the "c=" tag. Each
header field MUST be terminated with a single CRLF. header field MUST be terminated with a single CRLF.
2. The "DKIM-Signature" header field that exists (verifying) or will 2. The "DKIM-Signature" header field that exists (verifying) or will
be inserted (signing) in the message, with the value of the "b=" be inserted (signing) in the message, with the value of the "b="
tag deleted (i.e., treated as the empty string), canonicalized tag deleted (i.e., treated as the empty string), canonicalized
skipping to change at page 31, line 32 skipping to change at page 32, line 5
rest of the header fields and MUST be canonicalized as specified in rest of the header fields and MUST be canonicalized as specified in
the "c=" (canonicalization) tag. The DKIM-Signature header field the "c=" (canonicalization) tag. The DKIM-Signature header field
MUST NOT be included in its own h= tag, although other DKIM-Signature MUST NOT be included in its own h= tag, although other DKIM-Signature
header fields MAY be signed (see Section 4). header fields MAY be signed (see Section 4).
When calculating the hash on messages that will be transmitted using When calculating the hash on messages that will be transmitted using
base64 or quoted-printable encoding, signers MUST compute the hash base64 or quoted-printable encoding, signers MUST compute the hash
after the encoding. Likewise, the verifier MUST incorporate the after the encoding. Likewise, the verifier MUST incorporate the
values into the hash before decoding the base64 or quoted-printable values into the hash before decoding the base64 or quoted-printable
text. However, the hash MUST be computed before transport level text. However, the hash MUST be computed before transport level
encodings such as SMTP "dot-stuffing." encodings such as SMTP "dot-stuffing" (the modification of lines
beginning with a "." to avoid confusion with the SMTP end-of-message
marker, as specified in [RFC2821]).
With the exception of the canonicalization procedure described in With the exception of the canonicalization procedure described in
Section 3.4, the DKIM signing process treats the body of messages as Section 3.4, the DKIM signing process treats the body of messages as
simply a string of octets. DKIM messages MAY be either in plain-text simply a string of octets. DKIM messages MAY be either in plain-text
or in MIME format; no special treatment is afforded to MIME content. or in MIME format; no special treatment is afforded to MIME content.
Message attachments in MIME format MUST be included in the content Message attachments in MIME format MUST be included in the content
which is signed. which is signed.
More formally, the algorithm for the signature is: More formally, the algorithm for the signature is:
body-hash = hash-alg(canon_body) body-hash = hash-alg(canon_body)
skipping to change at page 32, line 33 skipping to change at page 33, line 10
of the record to exactly the domain of the signing identity. If the of the record to exactly the domain of the signing identity. If the
referenced key record contains the "s" flag as part of the t= tag, referenced key record contains the "s" flag as part of the t= tag,
the domain of the signing identity (i= flag) MUST be the same as that the domain of the signing identity (i= flag) MUST be the same as that
of the d= domain. If this flag is absent, the domain of the signing of the d= domain. If this flag is absent, the domain of the signing
identity MUST be the same as, or a subdomain of, the d= domain. Key identity MUST be the same as, or a subdomain of, the d= domain. Key
records which are not intended for use with subdomains SHOULD specify records which are not intended for use with subdomains SHOULD specify
the "s" flag in the t= tag. the "s" flag in the t= tag.
4. Semantics of Multiple Signatures 4. Semantics of Multiple Signatures
4.1 Example Scenarios
There are many reasons that a message might have multiple signatures.
For example, a given signer might sign multiple times, perhaps with
different hashing or signing algorithms during a transition phase.
INFORMATIVE EXAMPLE: Suppose SHA-256 is in the future found to be
insufficiently strong, and DKIM usage transitions to SHA-1024. A
signer might immediately sign using the newer algorithm, but
continue to sign using the older algorithm for interoperability
with verifiers that had not yet upgraded. The signer would do
this by adding two DKIM-Signature header fields, one using each
algorithm. Older verifiers that did not recognize SHA-1024 as an
acceptable algorithm would skip that signature and use the older
algorithm; newer verifiers could use either signature at their
option, and all other things being equal might not even attempt to
verify the other signature.
Similarly, a signer might sign a message including all headers and no
"l=" tag (to satisfy strict verifiers) and a second time with a
limited set of headers and an "l=" tag (in anticipation of possible
message modifications in route to other verifiers). Verifiers could
then choose which signature they preferred.
INFORMATIVE EXAMPLE: A verifier might receive a message with two
signatures, one covering more of the message than the other. If
the signature covering more of the message verified, then the
verifier could make one set of policy decisions; if that signature
failed but the signature covering less of the message verified,
the verifier might make a different set of policy decisions.
Of course, a message might also have multiple signatures because it
passed through multiple signers. A common case is expected to be
that of a signed message that passes through a mailing list that also
signs all messages. Assuming both of those signatures verify, a
recipient might choose to accept the message if either of those
signatures were known to come from trusted sources.
INFORMATIVE EXAMPLE: Recipients might choose to whitelist mailing
lists to which they have subscribed and which have acceptable
anti-abuse policies so as to accept messages sent to that list
even from unknown authors. They might also subscribe to less
trusted mailing lists (e.g., those without anti-abuse protection)
and be willing to accept all messages from specific authors, but
insist on doing additional abuse scanning for other messages.
Another related example of multiple signers might be forwarding
services, such as those commonly associated with academic alumni
sites.
INFORMATIVE EXAMPLE: A recipient might have an address at
alumni.example.edu, a site that has anti-abuse protection that is
somewhat less effective than the recipient would prefer. Such a
recipient might have specific authors whose messages would be
trusted absolutely, but messages from unknown authors which had
passed the forwarder's scrutiny would have only medium trust.
4.2 Interpretation
A signer that is adding a signature to a message merely creates a new A signer that is adding a signature to a message merely creates a new
DKIM-Signature header, using the usual semantics of the h= option. A DKIM-Signature header, using the usual semantics of the h= option. A
signer MAY sign previously existing DKIM-Signature header fields signer MAY sign previously existing DKIM-Signature header fields
using the method described in section Section 5.4 to sign trace using the method described in section Section 5.4 to sign trace
header fields. header fields.
INFORMATIVE NOTE: Signers should be cognizant that signing DKIM- INFORMATIVE NOTE: Signers should be cognizant that signing DKIM-
Signature header fields may result in signature failures with Signature header fields may result in signature failures with
intermediaries that do not recognize that DKIM-Signature header intermediaries that do not recognize that DKIM-Signature header
fields are trace header fields and unwittingly reorder them, thus fields are trace header fields and unwittingly reorder them, thus
breaking such signatures. breaking such signatures. For this reason, signing existing DKIM-
Signature header fields is unadvised, albeit legal.
INFORMATIVE NOTE: If a header field with multiple instances is INFORMATIVE NOTE: If a header field with multiple instances is
signed, those header fields are always signed from the bottom up. signed, those header fields are always signed from the bottom up.
Thus, it is not possible to sign only specific DKIM-Signature Thus, it is not possible to sign only specific DKIM-Signature
header fields. For example, if the message being signed already header fields. For example, if the message being signed already
contains three DKIM-Signature header fields A, B, and C, it is contains three DKIM-Signature header fields A, B, and C, it is
possible to sign all of them, B and C only, or C only, but not A possible to sign all of them, B and C only, or C only, but not A
only, B only, A and B only, or A and C only. only, B only, A and B only, or A and C only.
When evaluating a message with multiple signatures, a verifier should A signer MAY add more than one DKIM-Signature header field using
evaluate signatures independently and on their own merits. For different parameters. For example, during a transition period a
example, a verifier that by policy chooses not to accept signatures signer might want to produce signatures using two different hash
with deprecated cryptographic algorithms should consider such algorithms.
signatures invalid. As with messages with a single signature,
verifiers are at liberty to use the presence of valid signatures as
an input to local policy; likewise, the interpretation of multiple
valid signatures in combination is a local policy decision of the
verifier.
Signers SHOULD NOT remove any DKIM-Signature header fields from Signers SHOULD NOT remove any DKIM-Signature header fields from
messages they are signing, even if they know that the signatures messages they are signing, even if they know that the signatures
cannot be verified. cannot be verified.
When evaluating a message with multiple signatures, a verifier SHOULD
evaluate signatures independently and on their own merits. For
example, a verifier that by policy chooses not to accept signatures
with deprecated cryptographic algorithms would consider such
signatures invalid. Verifiers MAY process signatures in any order of
their choice; for example, some verifiers might choose to process
signatures corresponding to the From field in the message header
before other signatures. See Section 6.1 for more information about
signature choices.
Verifiers SHOULD ignore failed signatures as though they were not
present in the message. Verifiers SHOULD continue to check
signatures until a signature successfully verifies to the
satisfaction of the verifier. To limit potential denial-of-service
attacks, verifiers MAY limit the total number of signatures they will
attempt to verify.
5. Signer Actions 5. Signer Actions
The following steps are performed in order by signers. The following steps are performed in order by signers.
5.1 Determine if the Email Should be Signed and by Whom 5.1 Determine if the Email Should be Signed and by Whom
A signer can obviously only sign email for domains for which it has a A signer can obviously only sign email for domains for which it has a
private-key and the necessary knowledge of the corresponding public private key and the necessary knowledge of the corresponding public
key and Selector information. However there are a number of other key and Selector information. However there are a number of other
reasons beyond the lack of a private key why a signer could choose reasons beyond the lack of a private key why a signer could choose
not to sign an email. not to sign an email.
INFORMATIVE NOTE: Signing modules may be incorporated into any INFORMATIVE NOTE: Signing modules may be incorporated into any
portion of the mail system as deemed appropriate, including an portion of the mail system as deemed appropriate, including an
MUA, a SUBMISSION server, or an MTA. Wherever implemented, MUA, a SUBMISSION server, or an MTA. Wherever implemented,
signers should beware of signing (and thereby asserting signers should beware of signing (and thereby asserting
responsibility for) messages that may be problematic. In responsibility for) messages that may be problematic. In
particular, within a trusted enclave the signing address might be particular, within a trusted enclave the signing address might be
skipping to change at page 33, line 49 skipping to change at page 36, line 5
authenticated and authorized. authenticated and authorized.
INFORMATIVE IMPLEMENTER ADVICE: SUBMISSION servers should not INFORMATIVE IMPLEMENTER ADVICE: SUBMISSION servers should not
sign Received header fields if the outgoing gateway MTA obfuscates sign Received header fields if the outgoing gateway MTA obfuscates
Received header fields, for example to hide the details of Received header fields, for example to hide the details of
internal topology. internal topology.
If an email cannot be signed for some reason, it is a local policy If an email cannot be signed for some reason, it is a local policy
decision as to what to do with that email. decision as to what to do with that email.
5.2 Select a private-key and corresponding selector information 5.2 Select a Private Key and Corresponding Selector Information
This specification does not define the basis by which a signer should This specification does not define the basis by which a signer should
choose which private-key and Selector information to use. Currently, choose which private key and Selector information to use. Currently,
all Selectors are equal as far as this specification is concerned, so all Selectors are equal as far as this specification is concerned, so
the decision should largely be a matter of administrative the decision should largely be a matter of administrative
convenience. Distribution and management of private-keys is also convenience. Distribution and management of private keys is also
outside the scope of this document. outside the scope of this document.
INFORMATIVE OPERATIONS ADVICE: A signer should not sign with a INFORMATIVE OPERATIONS ADVICE: A signer should not sign with a
private key when the Selector containing the corresponding public private key when the Selector containing the corresponding public
key is expected to be revoked or removed before the verifier has key is expected to be revoked or removed before the verifier has
an opportunity to validate the signature. The signer should an opportunity to validate the signature. The signer should
anticipate that verifiers may choose to defer validation, perhaps anticipate that verifiers may choose to defer validation, perhaps
until the message is actually read by the final recipient. In until the message is actually read by the final recipient. In
particular, when rotating to a new key pair, signing should particular, when rotating to a new key pair, signing should
immediately commence with the new private key and the old public immediately commence with the new private key and the old public
skipping to change at page 34, line 45 skipping to change at page 37, line 5
bare CR or LF characters (used by some systems as a local line bare CR or LF characters (used by some systems as a local line
separator convention) MUST be converted to the SMTP-standard CRLF separator convention) MUST be converted to the SMTP-standard CRLF
sequence before the message is signed. Any conversion of this sort sequence before the message is signed. Any conversion of this sort
SHOULD be applied to the message actually sent to the recipient(s), SHOULD be applied to the message actually sent to the recipient(s),
not just to the version presented to the signing algorithm. not just to the version presented to the signing algorithm.
More generally, the signer MUST sign the message as it is expected to More generally, the signer MUST sign the message as it is expected to
be received by the verifier rather than in some local or internal be received by the verifier rather than in some local or internal
form. form.
5.4 Determine the header fields to Sign 5.4 Determine the Header Fields to Sign
The From header field MUST be signed (that is, included in the h= tag The From header field MUST be signed (that is, included in the h= tag
of the resulting DKIM-Signature header field). Signers SHOULD NOT of the resulting DKIM-Signature header field). Signers SHOULD NOT
sign an existing header field likely to be legitimately modified or sign an existing header field likely to be legitimately modified or
removed in transit. In particular, [RFC2821] explicitly permits removed in transit. In particular, [RFC2821] explicitly permits
modification or removal of the "Return-Path" header field in transit. modification or removal of the "Return-Path" header field in transit.
Signers MAY include any other header fields present at the time of Signers MAY include any other header fields present at the time of
signing at the discretion of the signer. signing at the discretion of the signer.
INFORMATIVE OPERATIONS NOTE: The choice of which header fields to INFORMATIVE OPERATIONS NOTE: The choice of which header fields to
skipping to change at page 36, line 27 skipping to change at page 38, line 33
then the resulting DKIM-Signature header field should read: then the resulting DKIM-Signature header field should read:
DKIM-Signature: ... h=Received : Received : ... DKIM-Signature: ... h=Received : Received : ...
and Received header fields <C> and <B> will be signed in that and Received header fields <C> and <B> will be signed in that
order. order.
Signers should be careful of signing header fields that might have Signers should be careful of signing header fields that might have
additional instances added later in the delivery process, since such additional instances added later in the delivery process, since such
header fields might be inserted after the signed instance or header fields might be inserted after the signed instance or
otherwise reordered. Trace header fields (such as Received and DKIM- otherwise reordered. Trace header fields (such as Received) and
Signature) and Resent-* blocks are the only fields prohibited by Resent-* blocks are the only fields prohibited by [RFC2822] from
[RFC2822] from being reordered. being reordered. In particular, since DKIM-Signature header fields
may be reordered by some intermediate MTAs, signing existing DKIM-
Signature header fields is error-prone.
INFORMATIVE ADMONITION: Despite the fact that [RFC2822] permits INFORMATIVE ADMONITION: Despite the fact that [RFC2822] permits
header fields to be reordered (with the exception of Received header fields to be reordered (with the exception of Received
header fields), reordering of signed header fields with multiple header fields), reordering of signed header fields with multiple
instances by intermediate MTAs will cause DKIM signatures to be instances by intermediate MTAs will cause DKIM signatures to be
broken; such anti-social behavior should be avoided. broken; such anti-social behavior should be avoided.
INFORMATIVE IMPLEMENTER'S NOTE: Although not required by this INFORMATIVE IMPLEMENTER'S NOTE: Although not required by this
specification, all end-user visible header fields should be signed specification, all end-user visible header fields should be signed
to avoid possible "indirect spamming." For example, if the to avoid possible "indirect spamming." For example, if the
"Subject" header field is not signed, a spammer can resend a "Subject" header field is not signed, a spammer can resend a
previously signed mail, replacing the legitimate subject with a previously signed mail, replacing the legitimate subject with a
one-line spam. one-line spam.
5.4.1 Recommended Signature Content
In order to maximize compatibility with a variety of verifiers, it is
recommended that signers follow the practices outlined in this
section when signing a message. However, these are generic
recommendations applying to the general case; specific senders may
wish to modify these guidelines as required by their unique
situations. Verifiers MUST be capable of verifying signatures even
if one or more of the recommended header fields is not signed (with
the exception of From, which must always be signed) or if one or more
of the disrecommended header fields is signed. Note that verifiers
do have the option of ignoring signatures that do not cover a
sufficient portion of the header or body, just as they may ignore
signatures from an identity they do not trust.
The following header fields SHOULD be included in the signature, if
they are present in the message being signed:
o From (REQUIRED in all signatures)
o Sender, Reply-To
o Subject
o Date, Message-ID
o To, Cc
o MIME-Version
o Content-Type, Content-Transfer-Encoding, Content-ID, Content-
Description
o Resent-Date, Resent-From, Resent-Sender, Resent-To, Resent-cc,
Resent-Message-ID
o In-Reply-To, References
o List-Id, List-Help, List-Unsubscribe, List-Subscribe, List-Post,
List-Owner, List-Archive
The following header fields SHOULD NOT be included in the signature:
o Return-Path
o Received
o Comments, Keywords
o Bcc, Resent-Bcc
o DKIM-Signature
Optional header fields (those not mentioned above) normally SHOULD
NOT be included in the signature, because of the potential for
additional header fields of the same name to be legitimately added or
reordered prior to verification. There are likely to be legitimate
exceptions to this rule, because of the wide variety of application-
specific header fields which may be applied to a message, some of
which are unlikely to be duplicated, modified, or reordered.
Signers SHOULD include all or nearly all of the body content when
specifying the body length count (l= tag) in the signature. In
particular, signers SHOULD NOT specify a body length of 0 since this
may be interpreted as a meaningless signature by some verifiers.
5.5 Compute the Message Hash and Signature 5.5 Compute the Message Hash and Signature
The signer MUST compute the message hash as described in Section 3.7 The signer MUST compute the message hash as described in Section 3.7
and then sign it using the selected public-key algorithm. This will and then sign it using the selected public-key algorithm. This will
result in a DKIM-Signature header field which will include the body result in a DKIM-Signature header field which will include the body
hash and a signature of the header hash, where that header includes hash and a signature of the header hash, where that header includes
the DKIM-Signature header field itself. the DKIM-Signature header field itself.
Entities such as mailing list managers that implement DKIM and which Entities such as mailing list managers that implement DKIM and which
modify the message or a header field (for example, inserting modify the message or a header field (for example, inserting
unsubscribe information) before retransmitting the message SHOULD unsubscribe information) before retransmitting the message SHOULD
check any existing signature on input and MUST make such check any existing signature on input and MUST make such
modifications before re-signing the message. modifications before re-signing the message.
The signer MAY elect to limit the number of bytes of the body that The signer MAY elect to limit the number of bytes of the body that
will be included in the hash and hence signed. The length actually will be included in the hash and hence signed. The length actually
hashed should be inserted in the "l=" tag of the "DKIM-Signature" hashed should be inserted in the "l=" tag of the "DKIM-Signature"
header field. header field.
5.6 Insert the DKIM-Signature header field 5.6 Insert the DKIM-Signature Header Field
Finally, the signer MUST insert the "DKIM-Signature:" header field Finally, the signer MUST insert the "DKIM-Signature:" header field
created in the previous step prior to transmitting the email. The created in the previous step prior to transmitting the email. The
"DKIM-Signature" header field MUST be the same as used to compute the "DKIM-Signature" header field MUST be the same as used to compute the
hash as described above, except that the value of the "b=" tag MUST hash as described above, except that the value of the "b=" tag MUST
be the appropriately signed hash computed in the previous step, be the appropriately signed hash computed in the previous step,
signed using the algorithm specified in the "a=" tag of the "DKIM- signed using the algorithm specified in the "a=" tag of the "DKIM-
Signature" header field and using the private key corresponding to Signature" header field and using the private key corresponding to
the Selector given in the "s=" tag of the "DKIM-Signature" header the Selector given in the "s=" tag of the "DKIM-Signature" header
field, as chosen above in Section 5.2 field, as chosen above in Section 5.2
skipping to change at page 37, line 44 skipping to change at page 41, line 22
INFORMATIVE IMPLEMENTATION NOTE: The easiest way to achieve this INFORMATIVE IMPLEMENTATION NOTE: The easiest way to achieve this
is to insert the "DKIM-Signature" header field at the beginning of is to insert the "DKIM-Signature" header field at the beginning of
the header block. In particular, it may be placed before any the header block. In particular, it may be placed before any
existing Received header fields. This is consistent with treating existing Received header fields. This is consistent with treating
"DKIM-Signature" as a trace header field. "DKIM-Signature" as a trace header field.
6. Verifier Actions 6. Verifier Actions
Since a signer MAY remove or revoke a public key at any time, it is Since a signer MAY remove or revoke a public key at any time, it is
recommended that verification occur in a timely manner with the most recommended that verification occur in a timely manner. In many
timely place being during acceptance by the border MTA. configurations, the most timely place is during acceptance by the
border MTA or shortly thereafter. In particular, deferring
verification until the message is accessed by the end user is
discouraged.
A border or intermediate MTA MAY verify the message signature(s). An A border or intermediate MTA MAY verify the message signature(s). An
MTA who has performed verification MAY communicate the result of that MTA who has performed verification MAY communicate the result of that
verification by adding a verification header field to incoming verification by adding a verification header field to incoming
messages. This considerably simplifies things for the user, who can messages. This considerably simplifies things for the user, who can
now use an existing mail user agent. Most MUAs have the ability to now use an existing mail user agent. Most MUAs have the ability to
filter messages based on message header fields or content; these filter messages based on message header fields or content; these
filters would be used to implement whatever policy the user wishes filters would be used to implement whatever policy the user wishes
with respect to unsigned mail. with respect to unsigned mail.
skipping to change at page 44, line 28 skipping to change at page 48, line 10
a verifier system should make, but an authenticated email presents an a verifier system should make, but an authenticated email presents an
opportunity to a receiving system that unauthenticated email cannot. opportunity to a receiving system that unauthenticated email cannot.
Specifically, an authenticated email creates a predictable identifier Specifically, an authenticated email creates a predictable identifier
by which other decisions can reliably be managed, such as trust and by which other decisions can reliably be managed, such as trust and
reputation. Conversely, unauthenticated email lacks a reliable reputation. Conversely, unauthenticated email lacks a reliable
identifier that can be used to assign trust and reputation. It is identifier that can be used to assign trust and reputation. It is
reasonable to treat unauthenticated email as lacking any trust and reasonable to treat unauthenticated email as lacking any trust and
having no positive reputation. having no positive reputation.
In general verifiers SHOULD NOT reject messages solely on the basis In general verifiers SHOULD NOT reject messages solely on the basis
of a lack of signature or an unverifiable signature. However, if the of a lack of signature or an unverifiable signature; such rejection
verifier does opt to reject such messages, and the verifier runs would cause severe interoperability problems. However, if the
synchronously with the SMTP session and a signature is missing or verifier does opt to reject such messages (for example, when
does not verify, the MTA SHOULD reject the message with an error such communicating with a peer who, by prior agreement, agrees to only
as: send signed messages), and the verifier runs synchronously with the
SMTP session and a signature is missing or does not verify, the MTA
SHOULD use a 550/5.7.x reply code, for example:
550 5.7.1 Unsigned messages not accepted 550 5.7.1 Unsigned messages not accepted
550 5.7.5 Message signature incorrect 550 5.7.5 Message signature incorrect
If it is not possible to fetch the public key, perhaps because the If it is not possible to fetch the public key, perhaps because the
key server is not available, a temporary failure message MAY be key server is not available, a temporary failure message MAY be
generated, such as: generated using a 451/4.7.5 reply code, such as:
451 4.7.5 Unable to verify signature - key server unavailable 451 4.7.5 Unable to verify signature - key server unavailable
Temporary failures such as inability to access the key server or Temporary failures such as inability to access the key server or
other external service are the only conditions that SHOULD use a 4xx other external service are the only conditions that SHOULD use a 4xx
SMTP reply code. In particular, cryptographic signature verification SMTP reply code. In particular, cryptographic signature verification
failures MUST NOT return 4xx SMTP replies. failures MUST NOT return 4xx SMTP replies.
Once the signature has been verified, that information MUST be Once the signature has been verified, that information MUST be
conveyed to higher level systems (such as explicit allow/white lists conveyed to higher level systems (such as explicit allow/white lists
skipping to change at page 45, line 20 skipping to change at page 49, line 4
before display to the end user. before display to the end user.
While the symptoms of a failed verification are obvious -- the While the symptoms of a failed verification are obvious -- the
signature doesn't verify -- establishing the exact cause can be more signature doesn't verify -- establishing the exact cause can be more
difficult. If a Selector cannot be found, is that because the difficult. If a Selector cannot be found, is that because the
Selector has been removed or was the value changed somehow in Selector has been removed or was the value changed somehow in
transit? If the signature line is missing is that because it was transit? If the signature line is missing is that because it was
never there, or was it removed by an over-zealous filter? For never there, or was it removed by an over-zealous filter? For
diagnostic purposes, the exact reason why the verification fails diagnostic purposes, the exact reason why the verification fails
SHOULD be made available to the policy module and possibly recorded SHOULD be made available to the policy module and possibly recorded
in the system logs. However in terms of presentation to the end in the system logs. If the email cannot be verified, then it SHOULD
user, the result SHOULD be presented as a simple binary result: be rendered the same as all unverified email regardless of whether it
either the email is verified or it is not. If the email cannot be looks like it was signed or not.
verified, then it SHOULD be rendered the same as all unverified email
regardless of whether it looks like it was signed or not.
7. IANA Considerations 7. IANA Considerations
DKIM introduces some new namespaces that require IANA registry. DKIM introduces some new namespaces that require IANA registry. In
all cases, new values are assigned only for Standards Track RFCs
approved by the IESG.
7.1 DKIM-Signature Tag Specifications 7.1 DKIM-Signature Tag Specifications
A DKIM-Signature provides for a list of tag specifications. IANA is A DKIM-Signature provides for a list of tag specifications. IANA is
requested to establish the DKIM Signature Tag Specification Registry, requested to establish the DKIM Signature Tag Specification Registry,
for tag specifications that can be used in DKIM-Signature fields and for tag specifications that can be used in DKIM-Signature fields and
that have been specified in any published RFC. that have been specified in any published RFC.
The initial entries in the registry comprise: The initial entries in the registry comprise:
skipping to change at page 51, line 51 skipping to change at page 55, line 19
were to be sent using spoofed addresses from a given domain, the key were to be sent using spoofed addresses from a given domain, the key
servers for that domain could be overwhelmed with requests. However, servers for that domain could be overwhelmed with requests. However,
given the low overhead of verification compared with handling of the given the low overhead of verification compared with handling of the
email message itself, such an attack would be difficult to mount. email message itself, such an attack would be difficult to mount.
8.4 Attacks Against DNS 8.4 Attacks Against DNS
Since DNS is a required binding for key services, specific attacks Since DNS is a required binding for key services, specific attacks
against DNS must be considered. against DNS must be considered.
While the DNS is currently insecure [RFC3833], it is expected that While the DNS is currently insecure [RFC3833], these security
the security problems should and will be solved by DNSSEC [RFC4033], problems are the motivation behind DNSSEC [RFC4033], and all users of
and all users of the DNS will reap the benefit of that work. the DNS will reap the benefit of that work.
Secondly, the types of DNS attacks relevant to DKIM are very costly
and are far less rewarding than DNS attacks on other Internet
protocols. For example, attacking A records (to force users to a
phishing site) is likely to be a more lucrative reason to poison DNS
caches. None the less, the security of DKIM is strongly tied to the
security of DNS.
To systematically thwart the intent of DKIM, an attacker must conduct
a very costly and very extensive attack on many parts of the DNS over
an extended period. No one knows for sure how attackers will
respond, however the cost/benefit of conducting prolonged DNS attacks
of this nature is expected to be uneconomical.
Finally, DKIM is only intended as a "sufficient" method of proving DKIM is only intended as a "sufficient" method of proving
authenticity. It is not intended to provide strong cryptographic authenticity. It is not intended to provide strong cryptographic
proof about authorship or contents. Other technologies such as proof about authorship or contents. Other technologies such as
OpenPGP [RFC2440] and S/MIME [RFC3851] address those requirements. OpenPGP [RFC2440] and S/MIME [RFC3851] address those requirements.
A second security issue related to the DNS revolves around the A second security issue related to the DNS revolves around the
increased DNS traffic as a consequence of fetching Selector-based increased DNS traffic as a consequence of fetching Selector-based
data as well as fetching signing domain policy. Widespread data as well as fetching signing domain policy. Widespread
deployment of DKIM will result in a significant increase in DNS deployment of DKIM will result in a significant increase in DNS
queries to the claimed signing domain. In the case of forgeries on a queries to the claimed signing domain. In the case of forgeries on a
large scale, DNS servers could see a substantial increase in queries. large scale, DNS servers could see a substantial increase in queries.
A specific DNS security issue which should be considered by DKIM
verifiers is the name chaining attack described in section 2.3 of the
DNS Threat Analysis [RFC3833]. A DKIM verifier, while verifying a
DKIM-Signature header field, could be prompted to retrieve a key
record of an attacker's choosing. This threat can be minimized by
ensuring that name servers, including recursive name servers, used by
the verifier enforce strict checking of "glue" and other additional
information in DNS responses and are therefore not vulnerable to this
attack.
8.5 Replay Attacks 8.5 Replay Attacks
In this attack, a spammer sends a message to be spammed to an In this attack, a spammer sends a message to be spammed to an
accomplice, which results in the message being signed by the accomplice, which results in the message being signed by the
originating MTA. The accomplice resends the message, including the originating MTA. The accomplice resends the message, including the
original signature, to a large number of recipients, possibly by original signature, to a large number of recipients, possibly by
sending the message to many compromised machines that act as MTAs. sending the message to many compromised machines that act as MTAs.
The messages, not having been modified by the accomplice, have valid The messages, not having been modified by the accomplice, have valid
signatures. signatures.
Partial solutions to this problem involve the use of reputation Partial solutions to this problem involve the use of reputation
services to convey the fact that the specific email address is being services to convey the fact that the specific email address is being
used for spam, and that messages from that signer are likely to be used for spam, and that messages from that signer are likely to be
spam. This requires a real-time detection mechanism in order to spam. This requires a real-time detection mechanism in order to
react quickly enough. However, such measures might be prone to react quickly enough. However, such measures might be prone to
abuse, if for example an attacker resent a large number of messages abuse, if for example an attacker resent a large number of messages
received from a victim in order to make them appear to be a spammer. received from a victim in order to make them appear to be a spammer.
skipping to change at page 54, line 10 skipping to change at page 57, line 23
In some cases it may be possible to extract private keys using a In some cases it may be possible to extract private keys using a
remote timing attack [BONEH03]. Implementations should consider remote timing attack [BONEH03]. Implementations should consider
obfuscating the timing to prevent such attacks. obfuscating the timing to prevent such attacks.
8.11 Reordered Header Fields 8.11 Reordered Header Fields
Existing standards allow intermediate MTAs to reorder header fields. Existing standards allow intermediate MTAs to reorder header fields.
If a signer signs two or more header fields of the same name, this If a signer signs two or more header fields of the same name, this
can cause spurious verification errors on otherwise legitimate can cause spurious verification errors on otherwise legitimate
messages. messages. In particular, signers that sign any existing DKIM-
Signature fields run the risk of having messages incorrectly fail to
verify.
8.12 RSA Attacks
An attacker could create a large RSA signing key with a small
exponent, thus requiring that the verification key have a large
exponent. This will force verifiers to use considerable computing
resources to verify the signature. Verifiers might avoid this attack
by refusing to verify signatures that reference selectors with public
keys having unreasonable exponents.
In general, an attacker might try to overwhelm a verifier by flooding
it with messages requiring verification. This is similar to other
MTA denial-of-service attacks and should be dealt with in a similar
fashion.
8.13 Inappropriate Signing by Parent Domains
The trust relationship described in Section 3.8 could conceivably be
used by a parent domain to sign messages with identities in a
subdomain not administratively related to the parent. For example,
the ".com" registry could create messages with signatures using an
"i=" value in the example.com domain. There is no general solution
to this problem, since the administrative cut could occur anywhere in
the domain name. For example, in the domain "example.podunk.ca.us"
there are three administrative cuts (podunk.ca.us, ca.us, and us),
any of which could create messages with an identity in the full
domain.
INFORMATIVE NOTE: This is considered an acceptable risk for the
same reason that it is acceptable for domain delegation. For
example, in the example above any of the domains could potentially
simply delegate "example.podunk.ca.us" to a server of their choice
and completely replace all DNS-served information.
9. References 9. References
9.1 Normative References 9.1 Normative References
[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Extensions (MIME) Part One: Format of Internet Message
Bodies", RFC 2045, November 1996. Bodies", RFC 2045, November 1996.
[RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions)
skipping to change at page 58, line 13 skipping to change at page 62, line 13
looks like this: looks like this:
DKIM-Signature: a=rsa-sha256; s=brisbane; d=example.com; DKIM-Signature: a=rsa-sha256; s=brisbane; d=example.com;
c=simple; q=dns/txt; i=joe@football.example.com; c=simple; q=dns/txt; i=joe@football.example.com;
h=Received : From : To : Subject : Date : Message-ID; h=Received : From : To : Subject : Date : Message-ID;
bh=jpltwNFTq83Bkjt/Y2ekyqr/+i296daNkFZSdaz8VCY=; bh=jpltwNFTq83Bkjt/Y2ekyqr/+i296daNkFZSdaz8VCY=;
b=bnUoMBPJ5wBigyZG2V4OG2JxLWJATkSkb9Ig+8OAu3cE2x/er+B b=bnUoMBPJ5wBigyZG2V4OG2JxLWJATkSkb9Ig+8OAu3cE2x/er+B
7Tp1a1kEwZKdOtlTHlvF4JKg6RZUbN5urRJoaiD4RiSbf8D6fmMHt 7Tp1a1kEwZKdOtlTHlvF4JKg6RZUbN5urRJoaiD4RiSbf8D6fmMHt
zEn8/OHpTCcdLOJaTp8/mKz69/RpatVBas2OqWas7jrlaLGfHdBkt zEn8/OHpTCcdLOJaTp8/mKz69/RpatVBas2OqWas7jrlaLGfHdBkt
Hs6fxOzzAB7Wro=; Hs6fxOzzAB7Wro=;
Received: from dsl-10.2.3.4.football.example.com [10.2.3.4] Received: from client1.football.example.com [192.0.2.1]
by submitserver.example.com with SUBMISSION; by submitserver.example.com with SUBMISSION;
Fri, 11 Jul 2003 21:01:54 -0700 (PDT) Fri, 11 Jul 2003 21:01:54 -0700 (PDT)
From: Joe SixPack <joe@football.example.com> From: Joe SixPack <joe@football.example.com>
To: Suzie Q <suzie@shopping.example.net> To: Suzie Q <suzie@shopping.example.net>
Subject: Is dinner ready? Subject: Is dinner ready?
Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT)
Message-ID: <20030712040037.46341.5F8J@football.example.com> Message-ID: <20030712040037.46341.5F8J@football.example.com>
Hi. Hi.
We lost the game. Are you hungry yet? We lost the game. Are you hungry yet?
Joe. Joe.
The signing email server requires access to the private-key The signing email server requires access to the private key
associated with the "brisbane" Selector to generate this signature. associated with the "brisbane" Selector to generate this signature.
A.3 The email signature is verified A.3 The email signature is verified
The signature is normally verified by an inbound SMTP server or The signature is normally verified by an inbound SMTP server or
possibly the final delivery agent. However, intervening MTAs can possibly the final delivery agent. However, intervening MTAs can
also perform this verification if they choose to do so. The also perform this verification if they choose to do so. The
verification process uses the domain "example.com" extracted from the verification process uses the domain "example.com" extracted from the
"d=" tag and the Selector "brisbane" from the "s=" tag in the "DKIM- "d=" tag and the Selector "brisbane" from the "s=" tag in the "DKIM-
Signature" header field to form the DNS DKIM query for: Signature" header field to form the DNS DKIM query for:
skipping to change at page 59, line 18 skipping to change at page 63, line 18
by shopping.example.net with SMTP; by shopping.example.net with SMTP;
Fri, 11 Jul 2003 21:01:59 -0700 (PDT) Fri, 11 Jul 2003 21:01:59 -0700 (PDT)
DKIM-Signature: a=rsa-sha256; s=brisbane; d=example.com; DKIM-Signature: a=rsa-sha256; s=brisbane; d=example.com;
c=simple; q=dns/txt; i=joe@football.example.com; c=simple; q=dns/txt; i=joe@football.example.com;
h=Received : From : To : Subject : Date : Message-ID; h=Received : From : To : Subject : Date : Message-ID;
bh=jpltwNFTq83Bkjt/Y2ekyqr/+i296daNkFZSdaz8VCY=; bh=jpltwNFTq83Bkjt/Y2ekyqr/+i296daNkFZSdaz8VCY=;
b=bnUoMBPJ5wBigyZG2V4OG2JxLWJATkSkb9Ig+8OAu3cE2x/er+B b=bnUoMBPJ5wBigyZG2V4OG2JxLWJATkSkb9Ig+8OAu3cE2x/er+B
7Tp1a1kEwZKdOtlTHlvF4JKg6RZUbN5urRJoaiD4RiSbf8D6fmMHt 7Tp1a1kEwZKdOtlTHlvF4JKg6RZUbN5urRJoaiD4RiSbf8D6fmMHt
zEn8/OHpTCcdLOJaTp8/mKz69/RpatVBas2OqWas7jrlaLGfHdBkt zEn8/OHpTCcdLOJaTp8/mKz69/RpatVBas2OqWas7jrlaLGfHdBkt
Hs6fxOzzAB7Wro=; Hs6fxOzzAB7Wro=;
Received: from dsl-10.2.3.4.network.example.com [10.2.3.4] Received: from client1.football.example.com [192.0.2.1]
by submitserver.example.com with SUBMISSION; by submitserver.example.com with SUBMISSION;
Fri, 11 Jul 2003 21:01:54 -0700 (PDT) Fri, 11 Jul 2003 21:01:54 -0700 (PDT)
From: Joe SixPack <joe@football.example.com> From: Joe SixPack <joe@football.example.com>
To: Suzie Q <suzie@shopping.example.net> To: Suzie Q <suzie@shopping.example.net>
Subject: Is dinner ready? Subject: Is dinner ready?
Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT)
Message-ID: <20030712040037.46341.5F8J@football.example.com> Message-ID: <20030712040037.46341.5F8J@football.example.com>
Hi. Hi.
We lost the game. Are you hungry yet? We lost the game. Are you hungry yet?
Joe. Joe.
INFORMATIVE NOTE: The key used to compute this signature is shown
in Appendix C.
Appendix B. Usage Examples (INFORMATIVE) Appendix B. Usage Examples (INFORMATIVE)
DKIM signing and validating can be used in different ways, for DKIM signing and validating can be used in different ways, for
different operational scenarios. This Appendix discusses some common different operational scenarios. This Appendix discusses some common
examples. examples.
NOTE: Descriptions in this Appendix are for informational NOTE: Descriptions in this Appendix are for informational
purposes only. They describe various ways that DKIM can be used, purposes only. They describe various ways that DKIM can be used,
given particular constraints and needs. In no case are these given particular constraints and needs. In no case are these
examples intended to be taken as providing explanation or guidance examples intended to be taken as providing explanation or guidance
skipping to change at page 64, line 13 skipping to change at page 68, line 17
address being used to sign the message. This practice will remove address being used to sign the message. This practice will remove
any preexisting Sender header field as required by [RFC2822]. The any preexisting Sender header field as required by [RFC2822]. The
forwarder applies a new DKIM-Signature header field with the forwarder applies a new DKIM-Signature header field with the
signature, public key, and related information of the forwarder. signature, public key, and related information of the forwarder.
Appendix C. Creating a public key (INFORMATIVE) Appendix C. Creating a public key (INFORMATIVE)
The default signature is an RSA signed SHA256 digest of the complete The default signature is an RSA signed SHA256 digest of the complete
email. For ease of explanation, the openssl command is used to email. For ease of explanation, the openssl command is used to
describe the mechanism by which keys and signatures are managed. One describe the mechanism by which keys and signatures are managed. One
way to generate a 1024 bit, unencrypted private-key suitable for way to generate a 1024 bit, unencrypted private key suitable for
DKIM, is to use openssl like this: DKIM, is to use openssl like this:
$ openssl genrsa -out rsa.private 1024 $ openssl genrsa -out rsa.private 1024
For increased security, the "-passin" parameter can also be added to For increased security, the "-passin" parameter can also be added to
encrypt the private key. Use of this parameter will require entering encrypt the private key. Use of this parameter will require entering
a password for several of the following steps. Servers may prefer to a password for several of the following steps. Servers may prefer to
use hardware cryptographic support. use hardware cryptographic support.
The "genrsa" step results in the file rsa.private containing the key The "genrsa" step results in the file rsa.private containing the key
skipping to change at page 64, line 42 skipping to change at page 68, line 46
gAYIaqlA9C0ZwM6i58lLlPadX/rtHb7pWzeNcZHjKrjM461ZAkEA+itss2nRlmyO gAYIaqlA9C0ZwM6i58lLlPadX/rtHb7pWzeNcZHjKrjM461ZAkEA+itss2nRlmyO
n1/5yDyCluST4dQfO8kAB3toSEVc7DeFeDhnC1mZdjASZNvdHS4gbLIA1hUGEF9m n1/5yDyCluST4dQfO8kAB3toSEVc7DeFeDhnC1mZdjASZNvdHS4gbLIA1hUGEF9m
3hKsGUMMPwJBAPW5v/U+AWTADFCS22t72NUurgzeAbzb1HWMqO4y4+9Hpjk5wvL/ 3hKsGUMMPwJBAPW5v/U+AWTADFCS22t72NUurgzeAbzb1HWMqO4y4+9Hpjk5wvL/
eVYizyuce3/fGke7aRYw/ADKygMJdW8H/OcCQQDz5OQb4j2QDpPZc0Nc4QlbvMsj eVYizyuce3/fGke7aRYw/ADKygMJdW8H/OcCQQDz5OQb4j2QDpPZc0Nc4QlbvMsj
7p7otWRO5xRa6SzXqqV3+F0VpqvDmshEBkoCydaYwc2o6WQ5EBmExeV8124XAkEA 7p7otWRO5xRa6SzXqqV3+F0VpqvDmshEBkoCydaYwc2o6WQ5EBmExeV8124XAkEA
qZzGsIxVP+sEVRWZmW6KNFSdVUpk3qzK0Tz/WjQMe5z0UunY9Ax9/4PVhp/j61bf qZzGsIxVP+sEVRWZmW6KNFSdVUpk3qzK0Tz/WjQMe5z0UunY9Ax9/4PVhp/j61bf
eAYXunajbBSOLlx4D+TunwJBANkPI5S9iylsbLs6NkaMHV6k5ioHBBmgCak95JGX eAYXunajbBSOLlx4D+TunwJBANkPI5S9iylsbLs6NkaMHV6k5ioHBBmgCak95JGX
GMot/L2x0IYyMLAz6oLWh2hm7zwtb0CgOrPo1ke44hFYnfc= GMot/L2x0IYyMLAz6oLWh2hm7zwtb0CgOrPo1ke44hFYnfc=
-----END RSA PRIVATE KEY----- -----END RSA PRIVATE KEY-----
To extract the public-key component from the private-key, use openssl To extract the public-key component from the private key, use openssl
like this: like this:
$ openssl rsa -in rsa.private -out rsa.public -pubout -outform PEM $ openssl rsa -in rsa.private -out rsa.public -pubout -outform PEM
This results in the file rsa.public containing the key information This results in the file rsa.public containing the key information
similar to this: similar to this:
-----BEGIN PUBLIC KEY----- -----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkM MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkM
oGeLnQg1fWn7/zYtIxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v/R oGeLnQg1fWn7/zYtIxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v/R
tdC2UzJ1lWT947qR+Rcac2gbto/NMqJ0fzfVjH4OuKhitdY9tf6mcwGjaNBcWToI tdC2UzJ1lWT947qR+Rcac2gbto/NMqJ0fzfVjH4OuKhitdY9tf6mcwGjaNBcWToI
MmPSPDdQPNUYckcQ2QIDAQAB MmPSPDdQPNUYckcQ2QIDAQAB
-----END PUBLIC KEY----- -----END PUBLIC KEY-----
skipping to change at page 65, line 20 skipping to change at page 69, line 22
-----END PUBLIC KEY----- -----END PUBLIC KEY-----
This public-key data (without the BEGIN and END tags) is placed in This public-key data (without the BEGIN and END tags) is placed in
the DNS. With the signature, canonical email contents, and public the DNS. With the signature, canonical email contents, and public
key, a verifying system can test the validity of the signature. The key, a verifying system can test the validity of the signature. The
openssl invocation to verify a signature looks like this: openssl invocation to verify a signature looks like this:
openssl dgst -verify rsa.public -sha256 -signature signature.file \ openssl dgst -verify rsa.public -sha256 -signature signature.file \
<input.file <input.file
Once a private-key has been generated, the openssl command can be Once a private key has been generated, the openssl command can be
used to sign an appropriately prepared email, like this: used to sign an appropriately prepared email, like this:
$ openssl dgst -sign rsa.private -sha256 <input.file $ openssl dgst -sign rsa.private -sha256 <input.file
This results in signature data similar to this when represented in This results in signature data similar to this when represented as a
Base64 [MIME] format: base64string:
aoiDeX42BB/gP4ScqTdIQJcpAObYr+54yvctqc4rSEFYby9+omKD3pJ/TVxATeTz aoiDeX42BB/gP4ScqTdIQJcpAObYr+54yvctqc4rSEFYby9+omKD3pJ/TVxATeTz
msybuW3WZiamb+mvn7f3rhmnozHJ0yORQbnn4qJQhPbbPbWEQKW09AMJbyz/0lsl msybuW3WZiamb+mvn7f3rhmnozHJ0yORQbnn4qJQhPbbPbWEQKW09AMJbyz/0lsl
How this signature is added to the email is discussed elsewhere in How this signature is added to the email is discussed elsewhere in
this document. this document.
The final record entered into a DNS zone file would be: The final record entered into a DNS zone file would be:
brisbane IN TXT ("v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ" brisbane IN TXT ("v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ"
skipping to change at page 66, line 33 skipping to change at page 70, line 38
The aforementioned information is not intended to be exhaustive. The The aforementioned information is not intended to be exhaustive. The
MUA may choose to highlight, accentuate, hide, or otherwise display MUA may choose to highlight, accentuate, hide, or otherwise display
any other information that may, in the opinion of the MUA author, be any other information that may, in the opinion of the MUA author, be
deemed important to the end user. deemed important to the end user.
Appendix E. Acknowledgements Appendix E. Acknowledgements
The authors wish to thank Russ Allbery, Edwin Aoki, Claus Assmann, The authors wish to thank Russ Allbery, Edwin Aoki, Claus Assmann,
Steve Atkins, Rob Austein, Fred Baker, Mark Baugher, Steve Bellovin, Steve Atkins, Rob Austein, Fred Baker, Mark Baugher, Steve Bellovin,
Nathaniel Borenstein, Dave Crocker, Michael Cudahy, Dennis Dayman, Nathaniel Borenstein, Dave Crocker, Michael Cudahy, Dennis Dayman,
Jutta Degener, Patrik Faltstrom, Mark Fanto, Stephen Farrell, Duncan Jutta Degener, Frank Ellermann, Patrik Faltstrom, Mark Fanto, Stephen
Findlay, Elliot Gillum, Phillip Hallam-Baker, Tony Hansen, Sam Farrell, Duncan Findlay, Elliot Gillum, Olafur Gu[eth]mundsson,
Hartman, Arvel Hathcock, Amir Herzberg, Paul Hoffman, Russ Housley, Phillip Hallam-Baker, Tony Hansen, Sam Hartman, Arvel Hathcock, Amir
Craig Hughes, Don Johnsen, Harry Katz, Murray S. Kucherawy, Barry Herzberg, Paul Hoffman, Russ Housley, Craig Hughes, Cullen Jennings,
Leiba, John Levine, Simon Longsdale, David Margrave, Justin Mason, Don Johnsen, Harry Katz, Murray S. Kucherawy, Barry Leiba, John
David Mayne, Steve Murphy, Russell Nelson, Dave Oran, Doug Otis, Levine, Charles Lindsey, Simon Longsdale, David Margrave, Justin
Shamim Pirzada, Juan Altmayer Pizzorno, Sanjay Pol, Blake Ramsdell, Mason, David Mayne, Steve Murphy, Russell Nelson, Dave Oran, Doug
Christian Renaud, Scott Renfro, Neil Rerup, Eric Rescorla, Dave Otis, Shamim Pirzada, Juan Altmayer Pizzorno, Sanjay Pol, Blake
Rossetti, Hector Santos, Jim Schaad, the Spamhaus.org team, Malte S. Ramsdell, Christian Renaud, Scott Renfro, Neil Rerup, Eric Rescorla,
Stretz, Robert Sanders, Rand Wacker, Sam Weiler, and Dan Wing for Dave Rossetti, Hector Santos, Jim Schaad, the Spamhaus.org team,
their valuable suggestions and constructive criticism. Malte S. Stretz, Robert Sanders, Rand Wacker, Sam Weiler, and Dan
Wing for their valuable suggestions and constructive criticism.
The DomainKeys specification was a primary source from which this The DomainKeys specification was a primary source from which this
specification has been derived. Further information about DomainKeys specification has been derived. Further information about DomainKeys
is at [RFC-DK]. is at [RFC-DK].
Appendix F. Edit History Appendix F. Edit History
[[This section to be removed before publication.]] [[This section to be removed before publication.]]
F.1 Changes since -ietf-06 version F.1 Changes since -ietf-07 version
The following changes were made between draft-ietf-dkim-base-07 and
draft-ietf-dkim-base-08:
o Drop reference to "trusted third party" in section 1; it was
redundant with existing bullet points and created confusion.
o Drop the wording on re-using keys from normative to an operational
note.
o Add a sentence to 3.4.3 to clarify how empty or missing bodies are
canonicalized.
o Section 3.5, t= tag: note that a verifier MAY ignore signatures
with a timestamp in the future.
o Section 3.5, z= tag: dropped the MUST NOT wording.
o Clarify the description of g= in section 3.6.1.
o Mention that n= is not intended for end-user use in section 3.6.1.
o Modify wording of s= in section 3.6.1 so as to not imply possible
future uses.
o Add a reference to RFC 2821 in section 3.7 to describe dot-
stuffing.
o Fairly extensive update of section 4 as requested during IESG
review.
o DKIM-Signature is not a "trace header field" as defined by RFC
2822 (section 5.4).
o Add sentence in section 5.4 to discourage signing of existing
DKIM-Signature header fields.
o Added section 5.4.1 describing recommended headers for signing per
IESG review.
o Dropped comment about presenting binary result to end user in
section 6.3 (out of scope, and by IESG request).
o Clarify that SMTP-level rejects are discouraged, but that if they
are used they should use the indicated reply codes (section 6.3).
o Add text to section 7 (IANA Considerations) to make it clear that
registry updates require a standards-track document.
o Rewrote section 8.4 per request by Security Area review.
o Add sentence in section 8.11 to emphasize that signing existing
DKIM-Signature header fields may result in incorrect validation
failures, as requested by Security Area review.
o Added section 8.14 (RSA Attacks) based on DNS-dir review from
Olafur Gu[eth]mundsson.
o Added section 8.15 (Inappropriate Signing by Parent Domains).
F.2 Changes since -ietf-06 version
The following changes were made between draft-ietf-dkim-base-06 and The following changes were made between draft-ietf-dkim-base-06 and
draft-ietf-dkim-base-07: draft-ietf-dkim-base-07:
o Added section 8.11 regarding header reordering. o Added section 8.11 regarding header reordering.
o Added informative note to section 3.3 regarding use of sha256. o Added informative note to section 3.3 regarding use of sha256.
o Added informative rationale to section 3.6.1, "p=", regarding key o Added informative rationale to section 3.6.1, "p=", regarding key
revocation. revocation.
skipping to change at page 67, line 29 skipping to change at page 73, line 5
o Minor modification of the second informative note in section 6.1 o Minor modification of the second informative note in section 6.1
regarding DoS attacks. regarding DoS attacks.
o Added explicit mention of v= to section 6.1.2, step 5. o Added explicit mention of v= to section 6.1.2, step 5.
o Updated paragraph 3 of section 8.4 regarding DNS attacks. o Updated paragraph 3 of section 8.4 regarding DNS attacks.
o Added section 7.9 (DKIM-Signature IANA Registry) per IANA request. o Added section 7.9 (DKIM-Signature IANA Registry) per IANA request.
F.2 Changes since -ietf-05 version F.3 Changes since -ietf-05 version
The following changes were made between draft-ietf-dkim-base-05 and The following changes were made between draft-ietf-dkim-base-05 and
draft-ietf-dkim-base-06: draft-ietf-dkim-base-06:
o Fix an error in an example in Appendix C. o Fix an error in an example in Appendix C.
o Substantial updates to Appendixes B and D. o Substantial updates to Appendixes B and D.
o Clarify ABNF for tag-value. o Clarify ABNF for tag-value.
skipping to change at page 68, line 7 skipping to change at page 73, line 29
o Add normative reference to SHA1/SHA256 FIPS publication 180-2. o Add normative reference to SHA1/SHA256 FIPS publication 180-2.
o Several minor edits based on AD Review. o Several minor edits based on AD Review.
o Move discussion of not re-using a selector (i.e., changing the o Move discussion of not re-using a selector (i.e., changing the
public key for a single selector) from informational to normative. public key for a single selector) from informational to normative.
o Assorted wordsmithing based on external review. o Assorted wordsmithing based on external review.
F.3 Changes since -ietf-04 version F.4 Changes since -ietf-04 version
The following changes were made between draft-ietf-dkim-base-04 and The following changes were made between draft-ietf-dkim-base-04 and
draft-ietf-dkim-base-05: draft-ietf-dkim-base-05:
o Clarified definition of "plain text" in section 3.2 (issue 1316). o Clarified definition of "plain text" in section 3.2 (issue 1316).
o Added some clarification about multiple listings of non-existent o Added some clarification about multiple listings of non-existent
header field names in h= in section 5.4 (issue 1316). header field names in h= in section 5.4 (issue 1316).
o Finished filling out IANA registries in section 7 (issue 1320). o Finished filling out IANA registries in section 7 (issue 1320).
skipping to change at page 68, line 29 skipping to change at page 74, line 5
o Clarified handling of bare CR and LF in section 5.3 (issue 1326). o Clarified handling of bare CR and LF in section 5.3 (issue 1326).
o Listed the required tags in section 6.1.1 as an informational note o Listed the required tags in section 6.1.1 as an informational note
(issue 1330). (issue 1330).
o Changed IDNA reference from 3492 to 3490 (issue 1331). o Changed IDNA reference from 3492 to 3490 (issue 1331).
o Changed the reference for WSP to 4234; changed the definition of o Changed the reference for WSP to 4234; changed the definition of
SWSP to exclude bare CR and LF (issue 1332). SWSP to exclude bare CR and LF (issue 1332).
F.4 Changes since -ietf-03 version F.5 Changes since -ietf-03 version
The following changes were made between draft-ietf-dkim-base-03 and The following changes were made between draft-ietf-dkim-base-03 and
draft-ietf-dkim-base-04: draft-ietf-dkim-base-04:
o Re-worded Abstract to avoid use of "prove" and "non-repudiation". o Re-worded Abstract to avoid use of "prove" and "non-repudiation".
o Use dot-atom-text instead of dot-atom to avoid inclusion of CFWS. o Use dot-atom-text instead of dot-atom to avoid inclusion of CFWS.
o Capitalize Selector throughout. o Capitalize Selector throughout.
skipping to change at page 69, line 29 skipping to change at page 75, line 4
o Add several examples; update some others. o Add several examples; update some others.
o Considerable minor editorial updating to clarify language, delete o Considerable minor editorial updating to clarify language, delete
redundant text, fix spelling errors, etc. redundant text, fix spelling errors, etc.
Still to be resolved: Still to be resolved:
o How does "simple" body canonicalization interact with BINARYMIME o How does "simple" body canonicalization interact with BINARYMIME
data? data?
o Deal with "relaxed" body canonicalizations, especially in regard o Deal with "relaxed" body canonicalizations, especially in regard
to bare CRs and NLs. to bare CRs and NLs.
o How to handle "*" in g= dot-atom-text (which allows "*" as a o How to handle "*" in g= dot-atom-text (which allows "*" as a
literal character). literal character).
o The IANA Considerations need to be completed and cleaned up. o The IANA Considerations need to be completed and cleaned up.
F.5 Changes since -ietf-02 version F.6 Changes since -ietf-02 version
The following changes were made between draft-ietf-dkim-base-02 and The following changes were made between draft-ietf-dkim-base-02 and
draft-ietf-dkim-base-03: draft-ietf-dkim-base-03:
o Section 5.2: changed key expiration text to be informational; o Section 5.2: changed key expiration text to be informational;
drop "seven day" wording in favor of something vaguer. drop "seven day" wording in favor of something vaguer.
o Don't indicate that the "i=" tag value should be passed to the key o Don't indicate that the "i=" tag value should be passed to the key
lookup service; this can be added as an extension if required. lookup service; this can be added as an extension if required.
skipping to change at page 70, line 39 skipping to change at page 76, line 13
may contain the content. may contain the content.
o Use dkim-quoted-printable as the encoding used in z= rather than o Use dkim-quoted-printable as the encoding used in z= rather than
referring to RFC2045, since they are different. referring to RFC2045, since they are different.
o Rewrite description of g= tag in the key record. o Rewrite description of g= tag in the key record.
o Deleted use of Domain in ABNF, which permits address-literals; o Deleted use of Domain in ABNF, which permits address-literals;
define domain-name to act in stead. define domain-name to act in stead.
F.6 Changes since -ietf-01 version F.7 Changes since -ietf-01 version
The following changes were made between draft-ietf-dkim-base-01 and The following changes were made between draft-ietf-dkim-base-01 and
draft-ietf-dkim-base-02: draft-ietf-dkim-base-02:
o Change wording on "x=" tag in DKIM-Signature header field o Change wording on "x=" tag in DKIM-Signature header field
regarding verifier handling of expired signatures from MUST to MAY regarding verifier handling of expired signatures from MUST to MAY
(per 20 April Jabber session). Also, make it clear that received (per 20 April Jabber session). Also, make it clear that received
time is to be preferred over current time if reliably available. time is to be preferred over current time if reliably available.
o Several changes to limit wording that would intrude into verifier o Several changes to limit wording that would intrude into verifier
skipping to change at page 71, line 21 skipping to change at page 76, line 44
o Change "q=dns" query access method to "q=dnstxt" to emphasize the o Change "q=dns" query access method to "q=dnstxt" to emphasize the
use of the TXT record. The expectation is that a later extension use of the TXT record. The expectation is that a later extension
will define "q=dnsdkk" to indicate use of a DKK record. (Per 18 will define "q=dnsdkk" to indicate use of a DKK record. (Per 18
May Jabber session.) May Jabber session.)
o Several typos fixed, including removing a paragraph that implied o Several typos fixed, including removing a paragraph that implied
that the DKIM-Signature header field should be hashed with the that the DKIM-Signature header field should be hashed with the
body (it should not). body (it should not).
F.7 Changes since -ietf-00 version F.8 Changes since -ietf-00 version
The following changes were made between draft-ietf-dkim-base-00 and The following changes were made between draft-ietf-dkim-base-00 and
draft-ietf-dkim-base-01: draft-ietf-dkim-base-01:
o Added section 8.9 (Information Leakage). o Added section 8.9 (Information Leakage).
o Replace section 4 (Multiple Signatures) with much less vague text. o Replace section 4 (Multiple Signatures) with much less vague text.
o Fixed ABNF for base64string. o Fixed ABNF for base64string.
skipping to change at page 71, line 45 skipping to change at page 77, line 22
o Changed signing algorithm to use separate hash of the body of the o Changed signing algorithm to use separate hash of the body of the
message; this is represented as the "bh=" tag in the DKIM- message; this is represented as the "bh=" tag in the DKIM-
Signature header field. Signature header field.
o Changed "z=" tag so that it need not have the same header field o Changed "z=" tag so that it need not have the same header field
names as the "h=" tag. names as the "h=" tag.
o Significant wordsmithing. o Significant wordsmithing.
F.8 Changes since -allman-01 version F.9 Changes since -allman-01 version
The following changes were made between draft-allman-dkim-base-01 and The following changes were made between draft-allman-dkim-base-01 and
draft-ietf-dkim-base-00: draft-ietf-dkim-base-00:
o Remove references to Sender Signing Policy document. Such o Remove references to Sender Signing Policy document. Such
consideration is implicitly included in Section 6.3. consideration is implicitly included in Section 6.3.
o Added ABNF for all tags. o Added ABNF for all tags.
o Updated references (still includes some references to expired o Updated references (still includes some references to expired
drafts, notably ID-AUTH-RES. drafts, notably ID-AUTH-RES.
o Significant wordsmithing. o Significant wordsmithing.
F.9 Changes since -allman-00 version F.10 Changes since -allman-00 version
The following changes were made between draft-allman-dkim-base-00 and The following changes were made between draft-allman-dkim-base-00 and
draft-allman-dkim-base-01: draft-allman-dkim-base-01:
o Changed "c=" tag to separate out header from body o Changed "c=" tag to separate out header from body
canonicalization. canonicalization.
o Eliminated "nowsp" canonicalization in favor of "relaxed", which o Eliminated "nowsp" canonicalization in favor of "relaxed", which
is somewhat less relaxed (but more secure) than "nowsp". is somewhat less relaxed (but more secure) than "nowsp".
skipping to change at page 73, line 46 skipping to change at page 79, line 46
This document and the information contained herein are provided on an This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Copyright Statement Copyright Statement
Copyright (C) The Internet Society (2006). This document is subject Copyright (C) The Internet Society (2007). This document is subject
to the rights, licenses and restrictions contained in BCP 78, and to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights. except as set forth therein, the authors retain all their rights.
Acknowledgment Acknowledgment
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is currently provided by the
Internet Society. Internet Society.
 End of changes. 79 change blocks. 
215 lines changed or deleted 479 lines changed or added

This html diff was produced by rfcdiff 1.33. The latest version is available from http://tools.ietf.org/tools/rfcdiff/