Defining Elliptic Curve Cryptography Algorithms for use with DKIMNIST
100 Bureau Dr.
GaithersburgMD20899USA+1 301-975-8439scott.rose@nist.gov
Applications
DCRUPInternet-DraftAuthenticationEmail
DomainKeys Identified Mail (DKIM) uses digital signature to associate a message with a given
sending domain. Currently, there is only one cryptography algorithm defined for use with DKIM
(RSA). This document defines four new elliptic curve cryptography algorithms for use with
DKIM. This will allow for algorithm agility if a weakness is found in RSA, and allows for
smaller key length to provide the same digital signature strength.
DomainKeys Identified Mail (DKIM) uses digital signatures to associate
a sending domain with a given message. Each DKIM signed email message as a digital signature in
its header, that can be validated by a receiver by obtaining the appropriate public key stored
in the DNS. Currently, DKIM has only one cryptographic algorithm defined for
use (RSA) and two digital signature algorithms (RSA/SHA-1 and RSA/SHA-256). In the past, 1024-bit
RSA keys were common, equating to (roughly) a security key strength of 80 bits .
Today, a minimum of 112 bits is recommended, which equates to 2048 bit RSA keys.
The public portion of 2048 bit RSA keys are still small enough to fit into a DNS TXT RR without
issues in performance. The encoded public key is too large to fit into the maximum allowed characters
in a single string, but a DNS TXT RR allows for multiple strings, so the key can be broken into "chunks" to
allow it to be served. However, some code components may not correctly handle TXT RRs with multiple strings which
will result in errors in validation.
Elliptic Curve Cryptography (ECC) has shown to have the same (roughly)
equivalent key strength with
smaller sizes. A 224 to 255 bit ECDSA key has (roughly) the same key strength as a 2048 bit RSA
key (112 bits of strength). This means smaller keys can be used to achieve the same DKIM security
strength, as well as being easier to manage in the DNS.
Having additional digital signature algorithms defined for use with DKIM also permits algorithm
agility. If a weakness is discovered in one digital signature algorithm, email senders can quickly
migrate to another algorithm without waiting for a standards action and subsequent software update.
This document defines a ECDSA as a new algorithms for DKIM. This document also defines a new hash algorithm for
use with DKIM signatures.
This document updates the IANA registry with new values for the algorithms.
This document does not change the DKIM key or signature formats, but only defines new algorithm values
using those formats.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119.
For ECDSA, the SHA-1 hash algorithm MUST NOT be used.
The original definition of DKIM signatues and keys are defined in . The following
are changes to the definition to include the new digital signature algorithm and secure hash algorithm.
The original definition of the textual representation of DKIM keys is found in section 3.6.1 of .
The only changes to the definition is below. The entire key:tag definition is included for clarity.
All other tags:value pairs are unchanged. References to the definitions below have also been updated to
reflect the current state of the art.
Acceptable hash algorithms (plain-text; OPTIONAL, defaults to
"sha256"). A colon-separated list of hash
algorithms that might be used. Unrecognized algorithms MUST be
ignored. Refer to Section 3.3 for a discussion of the hash
algorithms implemented by Signers and Verifiers. The set of
algorithms listed in this tag in each record is an operational
choice made by the Signer.
ABNF:
Key type (plain-text; OPTIONAL, default is "rsa"). Signers and
Verifiers MUST support the "rsa" key type. The "rsa" key type
indicates that an ASN.1 DER-encoded RSAPublicKey
(see , Sections 3.1 and A.1.1) is being used in the "p="
tag. The "ecdsa256" key type indicates an ASN.1 DER-encoded PublicKey
(see , Section 2.2) is being used in the "p=" tag.
(Note: the "p=" tag further encodes the value using the base64 algorithm.) Unrecognized key types MUST be ignored.
The original definition of the textual representation of DKIM signatures is found in section 3.5 of .
The only changes to the definition is below. The entire key:tag definition is included for clarity.
All other tags:value pairs are unchanged. References to the definitions below have also been updated to
reflect the current state of the art.
The algorithm used to generate the signature (plain-text;
REQUIRED). Verifiers MUST support "rsa-sha1" and "rsa-sha256" and SHOULD support "ecdsa256-sha256";
Signers MUST NOT use "sha1" with "ecdsa256".
See Section 3.3 for a
description of RSA and Section 6 for a brief description of ECDSA.
New algorithms for an established protocols take some time to gain wide deployment. There
will be a period of time where new algorithms are in operation side by side with older
algorithms. There will also be a sizable percentage of DKIM validators that will not
understand new algorithms until they are upgraded. This will lead to a period of time
where multiple DKIM signature algorithms are in use for a sender. Email administrators MAY
want to also sign with RSA/SHA-1 or RSA/SHA-256 for a period of time. This period of time
is difficult to measure, but DMARC aggregate reports could provide a
view on DKIM validation rates by receivers.
These requirements are for DKIM verifiers (as defined it ). These entities would be the consumers of any end-to-end
email security policy and would be the entity responsible for validating DKIM signatures.
DKIM verifiers claiming conformance to this document MUST implement all of the above cryptographic algorithms.
This document does NOT change the behavior of the core DKIM specification in that verifiers MUST
ignore unknown algorithms in DKIM signatures.
This document defines the use of new elliptic curve cryptographic algorithms for use with DomainKey
Identified Mail (DKIM). This document is not a discussion of the relative strengths or weaknesses of these
algorithms, but only defines their use.
There is a risk for mail receivers that do not understand or implement the new algorithms. Attackers could
modify or spoof messages from sending zones using one of the newly defined algorithms and it would not be
detectable as an attack by ECC-ignorant receivers. Likewise, ECC-ignorant receivers may mark valid DKIM
signed email messages as invalid due to unknown algorithms.
ITU-T Recommendation X.680 (2002) | ISO/IEC 8825-1:2002, Information Technology - ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules
(DER)
Digital Signature StandardNational Institute of Standards and Technology
Recommendations for Key Management Part 1: General
National Institute of Standards and Technology