Defining Elliptic Curve Cryptography Algorithms for use with DKIMNIST
100 Bureau Dr.
GaithersburgMD20899USA+1 301-975-8439scott.rose@nist.gov
Applications
Internet Engineering Task ForceInternet-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 string, but a DNS TXT RR allows for multiple strings, so the key can be broken into "chunks" to
allow it to be served. 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 two new algorithms for DKIM: ECDSA and Edwards-Curve Digital
Signature Algorithm (EdDSA) Ed25519 . This document also defines a new hash algorithm (sha512) as well.
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.
The SHA-512 hash algorithm is also now defined for use with DKIM using the mnemonic 'sha512' for the
"h=" DKIM key tag and "a=" sig-a-tag-h DKIM signature tag.
All of these newly defined algorithms MUST be used with either SHA-256 or SHA-512 as the hash algorithm. The SHA-1
hash algorithm MUST NOT be used. The previously defined algorithm (RSA) MAY be used with the SHA-512
hash algorithm.
NOTE: Any other hash algorithms? SHA-3?
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 and
SHOULD implement the SHA-512 hash algorithm.
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.
Recommendations for Key Management Part 1: General
National Institute of Standards and Technology