New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SecurityUpdated 26 Oct 2026

DKIM with Ed25519: Should You Switch from RSA and How to Dual-Sign Safely?

What Ed25519 DKIM signatures are, how they differ from RSA, support among receivers, the risks of Ed25519-only signing, how to publish keys and dual-sign, and how to test and roll out a migration.

KW
Written by Kenji Watanabe
HTML Email Developer
Reviewed by Ishita Rao
  • Published15 Jan 2026
  • Read time6 min
  • Length1,228 words
Share this guide

DKIM signs outgoing messages with a private key and publishes the matching public key in DNS. For most of its history that key has been RSA, and the debate about key length (1024 or 2048 bits) has been the main technical choice. RFC 8463, published in 2018, added a second algorithm: Ed25519, an elliptic-curve signature scheme that produces very small keys and signatures. Its appeal is easy to see. A 2048-bit RSA public key does not fit in a single 255-character DNS string, which causes trouble with many DNS interfaces, while an Ed25519 public key is only 44 characters in its encoded form. Yet adoption among receivers has been uneven, and switching carelessly can leave messages unsigned in the eyes of a receiver that does not understand the new algorithm. This guide explains the differences, the state of support, the safe approach of signing with both algorithms, the record format, a rollout plan and the tests to run. Check the current support of the receivers that matter to you before you change anything.

Ed25519Elliptic-curve signature; 32-byte public key; small DNS record
RSAEstablished; 2048-bit keys are standard; larger DNS record
SupportAll receivers read RSA; Ed25519 support varies and is not universal
AdviceKeep RSA signatures; add Ed25519 as a second signature if you want to adopt it

RSA and Ed25519 compared

PropertyRSA-2048Ed25519
Public key in DNSAbout 390 characters, needs two TXT strings44 characters, one string
Signature size256 bytes (about 344 base64 characters)64 bytes (about 88 base64 characters)
Header sizeLarger signature headerSmaller signature header
Speed of signingSlowerFaster
Security levelRoughly 112 bitsRoughly 128 bits
Receiver supportUniversalPartial; some receivers ignore the signature
Algorithm taga=rsa-sha256, key type k=rsaa=ed25519-sha256, key type k=ed25519

Both are considered secure for DKIM today. The practical difference is not strength but size and support. For key length and rotation of RSA keys see DKIM key rotation, selectors and key length and what a DKIM record looks like.

What happens at a receiver that does not support Ed25519

The standard says that a verifier that does not support an algorithm must treat that signature as if it were absent, not as failed. That is helpful: a message with only an Ed25519 signature, delivered to a receiver without support, is simply unsigned in DKIM terms. If SPF aligns, DMARC can still pass; if SPF does not (for example after forwarding), DMARC fails and the message may be rejected under an enforced policy. This is the reason for the standard advice: do not drop RSA. Sign with RSA, which every receiver can verify, and add Ed25519 as an extra signature. Receivers that understand both verify both, and those that understand only RSA ignore the second. See DMARC alignment.

Dual signing

A message can carry several DKIM-Signature headers, each with its own selector and algorithm. A dual-signed message looks like this in outline:

DKIM-Signature: v=1; a=rsa-sha256;     d=example.com; s=rsa2026;  c=relaxed/relaxed; h=from:to:subject:date; bh=...; b=...
DKIM-Signature: v=1; a=ed25519-sha256; d=example.com; s=ed2026;   c=relaxed/relaxed; h=from:to:subject:date; bh=...; b=...

Use two different selectors, one for each key, so that the DNS records do not collide. The d= domain stays the same so that both signatures align with the From domain. The cost is a larger header, which is of little consequence.

The DNS records

rsa2026._domainkey.example.com.  IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..."
ed2026._domainkey.example.com.   IN TXT "v=DKIM1; k=ed25519; p=11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo="

The Ed25519 value is the base64 encoding of the raw 32-byte public key. Note that this is different from the format that tools such as OpenSSL print by default (a longer structure containing the key), so a record copied from the wrong output will not verify. The key must be exactly the raw bytes. A sending service that supports Ed25519 will generate the record for you; if you run your own signer (OpenDKIM, Rspamd, a library), check that it supports the algorithm and produces the key in the correct form. See TXT record length and registrar quirks.

Should you adopt it?

SituationSuggestion
Your registrar cannot publish a 2048-bit keyMany can with two strings; use that. Ed25519 is not required for this
You use a hosted senderAsk whether it signs with Ed25519; if it offers dual signing, enable it
You run your own MTA and want to be readyAdd a second signature with Ed25519 after testing
Most of your recipients are at large providersCheck the providers' documentation for current Ed25519 verification; RSA remains essential
You want to drop RSANot advised while some receivers lack Ed25519 support

For most senders the benefit of adopting Ed25519 today is small. It is a good addition for operators who like smaller DNS records and headers and for those who prefer to be early, but it should not replace RSA.

Rollout plan

  1. Confirm software support in your signer or sending platform.
  2. Generate an Ed25519 key pair and store the private key securely, with the same care as an RSA private key.
  3. Choose a new selector and publish the DNS record. Verify with a DKIM checker that the record is valid.
  4. Enable dual signing for a test stream first, keeping the RSA signature.
  5. Send test messages to several providers, then read the Authentication-Results headers. Each signature that a receiver verifies appears with a pass; unsupported signatures are ignored. Use the checker and the guide to reading headers.
  6. Review DMARC aggregate reports for DKIM results, see aggregate reports. Some reports list the signing algorithm or selector, which helps you see who verifies what.
  7. Roll out to all streams once the tests are clean, and record the selectors in your documentation.
  8. Plan rotation for both keys, for example every six to twelve months, using the overlap method.

Operational notes

Treat the Ed25519 private key exactly like the RSA one: restrict file permissions, keep it out of source control, and limit which systems can read it. If you sign on several servers, distribute the same key securely or use a separate selector for each server so that a compromise can be contained and revoked by removing one record. Monitor the age of keys and put reminders in a calendar. When you retire a selector, leave the DNS record in place for a few days after the last message signed with it, because delayed messages are verified later, and then remove it so that an old, unused key cannot be abused.

Common problems

ProblemCauseFix
dkim=fail on the Ed25519 signatureRecord contains the wrong key format, such as an OpenSSL structurePublish the raw 32-byte key in base64
No Ed25519 result in headersReceiver does not support itExpected; the RSA signature still counts
Only RSA is verified at one provider and DMARC passesNormalNothing to fix
Both signatures fail after a relayIntermediate system modified headers or bodyCheck forwarding and footers; see body hash did not verify
DNS lookup error for selectorSelector name typo or record not propagatedCheck name and wait for TTL
Signer refuses the keyLibrary without Ed25519 supportUpgrade or use a different signer

Ed25519 is a sound algorithm that makes DKIM records smaller and signing faster, and the safe way to use it is as an addition to RSA. Test with real receivers, watch your reports and keep the option to remove the second signature if a problem appears.

Manage DKIM without the guesswork Add your domain, publish the records we generate and verify them in the dashboard.

Explore the SMTP relay

References and further reading

Frequently asked questions

What is Ed25519 in DKIM?

A signature algorithm defined in RFC 8463. It uses small keys and signatures, so the DNS record fits in a single TXT string.

Should I replace RSA with Ed25519?

No. Some receivers cannot verify Ed25519. Keep an RSA signature and add Ed25519 as a second one.

What happens if a receiver does not support Ed25519?

It ignores that signature as if it were absent. The RSA signature is still verified.

Why does my Ed25519 DKIM record fail?

The most common cause is a public key in the wrong format. DKIM needs the raw 32-byte key in base64, not an OpenSSL structure.

Do I need different selectors for the two keys?

Yes. Use one selector per key so that the DNS records do not collide.

Topics#dkim#ed25519#rsa#dns#authentication
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales