8463
PROPOSED STANDARD
A New Cryptographic Signature Method for DomainKeys Identified Mail (DKIM)
Authors: J. Levine
Date: September 2018
Area: art
Working Group: dcrup
Stream: IETF
Updates:
RFC 6376
Abstract
This document adds a new signing algorithm, Ed25519-SHA256, to "DomainKeys Identified Mail (DKIM) Signatures" (RFC 6376). DKIM verifiers are required to implement this algorithm.
RFC 8463
PROPOSED STANDARD
Errata Exist
Internet Engineering Task Force (IETF) J. Levine
Request for Comments: 8463 Taughannock Networks
Updates: <a href="./rfc6376">6376</a> September 2018
Category: Standards Track
ISSN: 2070-1721
<span class="h1">A New Cryptographic Signature Method for</span>
<span class="h1">DomainKeys Identified Mail (DKIM)</span>
Abstract
This document adds a new signing algorithm, Ed25519-SHA256, to
"DomainKeys Identified Mail (DKIM) Signatures" (<a href="./rfc6376">RFC 6376</a>). DKIM
verifiers are required to implement this algorithm.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="https://www.rfc-editor.org/info/rfc8463">https://www.rfc-editor.org/info/rfc8463</a>.
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Levine Standards Track [Page 1]</span>
<span id="page-2" ></span>
<span class="grey"><a href="./rfc8463">RFC 8463</a> DKIM Crypto Update September 2018</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Conventions Used in This Document . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-3">3</a>. Ed25519-SHA256 Signing Algorithm . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-4">4</a>. Signature and Key Syntax . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-4.1">4.1</a>. Signature Syntax . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-4.2">4.2</a>. Key Syntax . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-5">5</a>. Choice and Strength of Keys and Algorithms . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-6">6</a>. Transition Considerations . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-7">7</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-8">8</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-8.1">8.1</a>. "DKIM Key Type" Registry . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-9">9</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-9.1">9.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-9.2">9.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#appendix-A">Appendix A</a>. Example of a Signed Message . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#appendix-A.1">A.1</a>. Secret Keys . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#appendix-A.2">A.2</a>. Public Key DNS Records . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#appendix-A.3">A.3</a>. Signed Message . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
DKIM [<a href="./rfc6376" title=""DomainKeys Identified Mail (DKIM) Signatures"">RFC6376</a>] signs email messages by creating hashes of selected
message header fields and body and signing the header hash with a
digital signature. Message recipients fetch the signature
verification key from the DNS. The defining documents specify a
single signing algorithm, RSA [<a href="./rfc3447" title=""Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1"">RFC3447</a>] (which has since been
obsoleted by [<a href="./rfc8017" title=""PKCS #1: RSA Cryptography Specifications Version 2.2"">RFC8017</a>]).
This document adds a new, stronger signing algorithm, Edwards-Curve
Digital Signature Algorithm, using the Curve25519 curve (Ed25519),
which has much shorter keys than RSA for similar levels of security.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Conventions Used in This Document</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
<a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>] [<a href="./rfc8174" title=""Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"">RFC8174</a>] when, and only when, they appear in all
capitals, as shown here.
Syntax descriptions use Augmented BNF (ABNF) [<a href="./rfc5234" title=""Augmented BNF for Syntax Specifications: ABNF"">RFC5234</a>]. The ABNF
tokens sig-a-tag-k and key-k-tag-type are imported from [<a href="./rfc6376" title=""DomainKeys Identified Mail (DKIM) Signatures"">RFC6376</a>].
<span class="grey">Levine Standards Track [Page 2]</span>
<span id="page-3" ></span>
<span class="grey"><a href="./rfc8463">RFC 8463</a> DKIM Crypto Update September 2018</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Ed25519-SHA256 Signing Algorithm</span>
The Ed25519-SHA256 signing algorithm computes a message hash as
defined in <a href="./rfc6376#section-3">Section 3 of [RFC6376]</a> using SHA-256 [<a href="#ref-FIPS-180-4-2015">FIPS-180-4-2015</a>] as
the hash-alg. It signs the hash with the PureEdDSA variant Ed25519,
as defined in <a href="./rfc8032#section-5.1">RFC 8032, Section 5.1</a> [<a href="./rfc8032" title=""Edwards-Curve Digital Signature Algorithm (EdDSA)"">RFC8032</a>]. Example keys and
signatures in <a href="#appendix-A">Appendix A</a> are based on the test vectors in <a href="./rfc8032#section-7.1">RFC 8032,
Section 7.1</a> [<a href="./rfc8032" title=""Edwards-Curve Digital Signature Algorithm (EdDSA)"">RFC8032</a>].
The DNS record for the verification public key has a "k=ed25519" tag
to indicate that the key is an Ed25519 rather than an RSA key.
This is an additional DKIM signature algorithm added to <a href="./rfc6376#section-3.3">Section 3.3
of [RFC6376]</a> as envisioned in <a href="#section-3.3.4">Section 3.3.4</a> of that document.
Note: since Ed25519 public keys are 256 bits long, the base64-encoded
key is only 44 octets, so DNS key record data will generally fit in a
single 255-byte TXT string and work even with DNS provisioning
software that doesn't handle multistring TXT records.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Signature and Key Syntax</span>
The syntax of DKIM signatures and DKIM keys are updated as follows.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Signature Syntax</span>
The syntax of DKIM algorithm tags in <a href="./rfc6376#section-3.5">Section 3.5 of [RFC6376]</a> is
updated by adding this rule to the existing rule for sig-a-tag-k:
ABNF:
sig-a-tag-k =/ "ed25519"
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Key Syntax</span>
The syntax of DKIM key tags in <a href="./rfc6376#section-3.6.1">Section 3.6.1 of [RFC6376]</a> is updated
by adding this rule to the existing rule for key-k-tag-type:
ABNF:
key-k-tag-type =/ "ed25519"
The p= value in the key record is the Ed25519 public key encoded in
base64. Since the key is 256 bits long, the base64 text is 44 octets
long. See <a href="#appendix-A.2">Appendix A.2</a> for a sample key record using the public key
in <a href="./rfc8032#section-7.1">[RFC8032], Section 7.1</a>, Test 1.
<span class="grey">Levine Standards Track [Page 3]</span>
<span id="page-4" ></span>
<span class="grey"><a href="./rfc8463">RFC 8463</a> DKIM Crypto Update September 2018</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Choice and Strength of Keys and Algorithms</span>
<a href="./rfc6376#section-3.3">Section 3.3 of [RFC6376]</a> describes DKIM's hash and signature
algorithms. It is updated as follows:
Signers SHOULD implement and verifiers MUST implement the
Ed25519-SHA256 algorithm.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Transition Considerations</span>
For backward compatibility, signers can add multiple signatures that
use old and new signing algorithms. Since there can only be a single
key record in the DNS for each selector, the signatures have to use
different selectors, although they can use the same d= and i=
identifiers.
The example message in <a href="#appendix-A">Appendix A</a> has two signatures with the same d=
and i= identifiers but different a= algorithms and s= selectors.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
All of the security advice in [<a href="./rfc6376" title=""DomainKeys Identified Mail (DKIM) Signatures"">RFC6376</a>] continues to apply, except
that the security advice about Ed25519 in <a href="./rfc8032#section-8">Section 8 of [RFC8032]</a>
supplants the advice about RSA threats.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. IANA Considerations</span>
IANA has updated a registry as follows.
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. "DKIM Key Type" Registry</span>
The following value has been added to the "DKIM Key Type" registry:
+---------+-----------+--------+
| TYPE | REFERENCE | STATUS |
+---------+-----------+--------+
| ed25519 | [<a href="./rfc8032" title=""Edwards-Curve Digital Signature Algorithm (EdDSA)"">RFC8032</a>] | active |
+---------+-----------+--------+
Table 1: Value Added to the "DKIM Key Type" Registry
<span class="grey">Levine Standards Track [Page 4]</span>
<span id="page-5" ></span>
<span class="grey"><a href="./rfc8463">RFC 8463</a> DKIM Crypto Update September 2018</span>
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References</span>
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. Normative References</span>
[<a id="ref-FIPS-180-4-2015">FIPS-180-4-2015</a>]
National Institute of Standards and Technology, "Secure
Hash Standard (SHS)", FIPS PUB 180-4,
DOI 10.6028/NIST.FIPS.180-4, August 2015,
<<a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">http://nvlpubs.nist.gov/nistpubs/FIPS/</a>
<a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">NIST.FIPS.180-4.pdf</a>>.
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC5234">RFC5234</a>] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>,
DOI 10.17487/RFC5234, January 2008,
<<a href="https://www.rfc-editor.org/info/rfc5234">https://www.rfc-editor.org/info/rfc5234</a>>.
[<a id="ref-RFC6376">RFC6376</a>] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed.,
"DomainKeys Identified Mail (DKIM) Signatures", STD 76,
<a href="./rfc6376">RFC 6376</a>, DOI 10.17487/RFC6376, September 2011,
<<a href="https://www.rfc-editor.org/info/rfc6376">https://www.rfc-editor.org/info/rfc6376</a>>.
[<a id="ref-RFC8017">RFC8017</a>] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch,
"PKCS #1: RSA Cryptography Specifications Version 2.2",
<a href="./rfc8017">RFC 8017</a>, DOI 10.17487/RFC8017, November 2016,
<<a href="https://www.rfc-editor.org/info/rfc8017">https://www.rfc-editor.org/info/rfc8017</a>>.
[<a id="ref-RFC8032">RFC8032</a>] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital
Signature Algorithm (EdDSA)", <a href="./rfc8032">RFC 8032</a>,
DOI 10.17487/RFC8032, January 2017,
<<a href="https://www.rfc-editor.org/info/rfc8032">https://www.rfc-editor.org/info/rfc8032</a>>.
[<a id="ref-RFC8174">RFC8174</a>] Leiba, B., "Ambiguity of Uppercase vs Lowercase in <a href="./rfc2119">RFC</a>
<a href="./rfc2119">2119</a> Key Words", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc8174">RFC 8174</a>, DOI 10.17487/RFC8174,
May 2017, <<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>>.
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. Informative References</span>
[<a id="ref-RFC3447">RFC3447</a>] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
Standards (PKCS) #1: RSA Cryptography Specifications
Version 2.1", <a href="./rfc3447">RFC 3447</a>, DOI 10.17487/RFC3447, February
2003, <<a href="https://www.rfc-editor.org/info/rfc3447">https://www.rfc-editor.org/info/rfc3447</a>>.
<span class="grey">Levine Standards Track [Page 5]</span>
<span id="page-6" ></span>
<span class="grey"><a href="./rfc8463">RFC 8463</a> DKIM Crypto Update September 2018</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Example of a Signed Message</span>
This is a small message with both RSA-SHA256 and Ed25519-SHA256 DKIM
signatures. The signatures are independent of each other, so either
signature would be valid if the other were not present.
<span class="h3"><a class="selflink" id="appendix-A.1" href="#appendix-A.1">A.1</a>. Secret Keys</span>
Ed25519 secret key in base64. This is the secret key from <a href="./rfc8032#section-7.1">[RFC8032],
Section 7.1</a>, Test 1, converted from hex to base64.
nWGxne/9WmC6hEr0kuwsxERJxWl7MmkZcDusAxyuf2A=
RSA secret key in PEM format.
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDkHlOQoBTzWRiGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQi
Y/J16JYi0Qvx/byYzCNb3W91y3FutACDfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqM
KrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3Ip3G+2kryOTIKT+l/K4w3QIDAQAB
AoGAH0cxOhFZDgzXWhDhnAJDw5s4roOXN4OhjiXa8W7Y3rhX3FJqmJSPuC8N9vQm
6SVbaLAE4SG5mLMueHlh4KXffEpuLEiNp9Ss3O4YfLiQpbRqE7Tm5SxKjvvQoZZe
zHorimOaChRL2it47iuWxzxSiRMv4c+j70GiWdxXnxe4UoECQQDzJB/0U58W7RZy
6enGVj2kWF732CoWFZWzi1FicudrBFoy63QwcowpoCazKtvZGMNlPWnC7x/6o8Gc
uSe0ga2xAkEA8C7PipPm1/1fTRQvj1o/dDmZp243044ZNyxjg+/OPN0oWCbXIGxy
WvmZbXriOWoSALJTjExEgraHEgnXssuk7QJBALl5ICsYMu6hMxO73gnfNayNgPxd
WFV6Z7ULnKyV7HSVYF0hgYOHjeYe9gaMtiJYoo0zGN+L3AAtNP9huqkWlzECQE1a
licIeVlo1e+qJ6Mgqr0Q7Aa7falZ448ccbSFYEPD6oFxiOl9Y9se9iYHZKKfIcst
o7DUw1/hz2Ck4N5JrgUCQQCyKveNvjzkkd8HjYs0SwM0fPjK16//5qDZ2UiDGnOe
uEzxBDAr518Z8VFbR41in3W4Y3yCDgQlLlcETrS+zYcL
-----END RSA PRIVATE KEY-----
<span class="h3"><a class="selflink" id="appendix-A.2" href="#appendix-A.2">A.2</a>. Public Key DNS Records</span>
The public key p= value in the first record is the public key from
<a href="./rfc8032#section-7.1">[RFC8032], Section 7.1</a>, Test 1, converted from hex to base64.
brisbane._domainkey.football.example.com. IN TXT (
"v=DKIM1; k=ed25519; p=11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=")
test._domainkey.football.example.com. IN TXT (
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkHlOQoBTzWR"
"iGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQiY/J16JYi0Qvx/byYzCNb3W91y3FutAC"
"DfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqMKrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3"
"Ip3G+2kryOTIKT+l/K4w3QIDAQAB")
<span class="grey">Levine Standards Track [Page 6]</span>
<span id="page-7" ></span>
<span class="grey"><a href="./rfc8463">RFC 8463</a> DKIM Crypto Update September 2018</span>
<span class="h3"><a class="selflink" id="appendix-A.3" href="#appendix-A.3">A.3</a>. Signed Message</span>
The text in each line of the message starts at the first position
except for the continuation lines on the DKIM-Signature header
fields, which start with a single space. A blank line follows the
"Joe." line.
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed;
d=football.example.com; [email protected];
q=dns/txt; s=brisbane; t=1528637909; h=from : to :
subject : date : message-id : from : subject : date;
bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=;
b=/gCrinpcQOoIfuHNQIbq4pgh9kyIK3AQUdt9OdqQehSwhEIug4D11Bus
Fa3bT3FY5OsU7ZbnKELq+eXdp1Q1Dw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=football.example.com; [email protected];
q=dns/txt; s=test; t=1528637909; h=from : to : subject :
date : message-id : from : subject : date;
bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=;
b=F45dVWDfMbQDGHJFlXUNB2HKfbCeLRyhDXgFpEL8GwpsRe0IeIixNTe3
DhCVlUrSjV4BwcVcOF6+FF3Zo9Rpo1tFOeS9mPYQTnGdaSGsgeefOsk2Jz
dA+L10TeYt9BgDfQNZtKdN1WO//KgIqXP7OdEFE4LjFYNcUxZQ4FADY+8=
From: Joe SixPack <joe@football.example.com>
To: Suzie Q <suzie@shopping.example.net>
Subject: Is dinner ready?
Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT)
Message-ID: <20030712040037.46341.5F8J@football.example.com>
Hi.
We lost the game. Are you hungry yet?
Joe.
Author's Address
John Levine
Taughannock Networks
PO Box 727
Trumansburg, NY 14886
United States of America
Phone: +883.5100.01196712
Email: [email protected]
Levine Standards Track [Page 7]
Annotations
Select text to annotate