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.
RSA and Ed25519 compared
| Property | RSA-2048 | Ed25519 |
|---|---|---|
| Public key in DNS | About 390 characters, needs two TXT strings | 44 characters, one string |
| Signature size | 256 bytes (about 344 base64 characters) | 64 bytes (about 88 base64 characters) |
| Header size | Larger signature header | Smaller signature header |
| Speed of signing | Slower | Faster |
| Security level | Roughly 112 bits | Roughly 128 bits |
| Receiver support | Universal | Partial; some receivers ignore the signature |
| Algorithm tag | a=rsa-sha256, key type k=rsa | a=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?
| Situation | Suggestion |
|---|---|
| Your registrar cannot publish a 2048-bit key | Many can with two strings; use that. Ed25519 is not required for this |
| You use a hosted sender | Ask whether it signs with Ed25519; if it offers dual signing, enable it |
| You run your own MTA and want to be ready | Add a second signature with Ed25519 after testing |
| Most of your recipients are at large providers | Check the providers' documentation for current Ed25519 verification; RSA remains essential |
| You want to drop RSA | Not 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
- Confirm software support in your signer or sending platform.
- Generate an Ed25519 key pair and store the private key securely, with the same care as an RSA private key.
- Choose a new selector and publish the DNS record. Verify with a DKIM checker that the record is valid.
- Enable dual signing for a test stream first, keeping the RSA signature.
- 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.
- 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.
- Roll out to all streams once the tests are clean, and record the selectors in your documentation.
- 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
| Problem | Cause | Fix |
|---|---|---|
| dkim=fail on the Ed25519 signature | Record contains the wrong key format, such as an OpenSSL structure | Publish the raw 32-byte key in base64 |
| No Ed25519 result in headers | Receiver does not support it | Expected; the RSA signature still counts |
| Only RSA is verified at one provider and DMARC passes | Normal | Nothing to fix |
| Both signatures fail after a relay | Intermediate system modified headers or body | Check forwarding and footers; see body hash did not verify |
| DNS lookup error for selector | Selector name typo or record not propagated | Check name and wait for TTL |
| Signer refuses the key | Library without Ed25519 support | Upgrade 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.
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.