Your domain's DKIM keys are rotated yearly and still 1024-bit RSA — as the lead, what key-length, algorithm and rotation-cadence policy would you set instead?
answer
- secrecy beats frequency
- a floor, then an extra
- two algorithms, two selectors
- events, not only dates
- one named owner
basics
~20 sMake 2048-bit RSA the floor, add an Ed25519 signature beside it only if you can run two selectors per rotation, and keep a cadence you will really execute, yearly or faster, plus event triggers, under one named owner.
solid answer
~50 sStart with the floor: every signer, outside senders included, moves to 2048-bit RSA, which RFC 8301 recommends. Ed25519 (RFC 8463, September 2018) is an addition for now, not a replacement: RFC 8463 has verifiers MUST implement it, but RSA is the signature every conforming verifier must be able to check, so you sign twice under two selectors and double the rotation work. Cadence is a judgment: RFC 5863 rates key secrecy above frequency and prefers a key held in hardware and changed yearly to one changed hourly in software. Yearly can stay if custody is sound and the runbook is rehearsed; shorten it if the key lives in software across many hosts. Add off-cycle triggers: a key holder leaves, a signing host is compromised, a key is exposed, an outside sender's contract ends. One named person owns each key, with an inventory and a calendar.
go deeper
Recall that RFC 8301 recommends 2048-bit RSA and that an Ed25519 DKIM signature is today added beside the RSA one rather than replacing it.
Explain why dual signing needs two selectors and why RFC 5863 ranks key secrecy above rotation frequency.
Define the off-cycle triggers, such as a departing key holder or compromised host, and wire them to the same rehearsed runbook as the scheduled rotation.
Weigh the cost of each rotation and a second algorithm against the exposure they remove, and make the floor binding on outside senders too.
## The decisions on the table A domain that rotates **DKIM** keys once a year and still signs with **1024-bit RSA** is compliant but behind. A lead owns four decisions here, and none has one right answer. | Decision | Options | What drives it | |---|---|---| | RSA key length | 1024, 2048, up to 4096 | RFC 8301's MUST and SHOULD, record size | | Second algorithm | RSA only, or RSA plus Ed25519 | verifier support, operational cost | | Cadence | months to a year, plus triggers | key custody, how rehearsed the procedure is | | Ownership | one team, split DNS and mail duties, outside senders | who holds keys and who edits DNS | ## Key length RFC 8301 (January 2018) requires at least 1024 bits and recommends at least 2048, and verifiers MUST handle 1024 to 4096. **2048 bits as the domain-wide floor** is the defensible default: it meets the SHOULD and stays inside what every conforming verifier handles. The policy has to reach every signer, including **outside sending services** that sign as the domain, because the weakest signer sets the domain's real exposure. ## Adding Ed25519 RFC 8463 (September 2018) adds `ed25519-sha256`, with key records marked `k=ed25519`. Signers SHOULD implement it and verifiers MUST, and its public key fits easily in one DNS string. The decision is whether to run it **beside** RSA: - **For it**: a second algorithm in place before it is needed, so a future move away from RSA is a switch rather than a project. - **Against it, for now**: a verifier that has not implemented RFC 8463 cannot use that signature and relies on the RSA one, so at those receivers the RSA signature still has to carry the message. - **The cost**: RFC 8463 section 6 has the two signatures use **different selectors**, since one selector holds one key record. Every rotation then rolls two keys. - **What it does not change**: DMARC needs one aligned pass, so a second signature adds resilience, not a stronger verdict. ## Cadence RFC 5863 section 3.1 frames it: refreshing keys at regular intervals is "highly desirable" but "of considerably less importance" than keeping the private key secret, and a key in tamper-proof hardware changed once a year is "considerably more desirable" than one changed hourly but held in software. So: 1. Decide **custody first**: where the private key lives and who can reach it. 2. Pick a **regular interval** that the team actually executes and practises. A procedure run once every five years fails when a leak forces it. 3. Define **off-cycle triggers** that override the calendar: - a person who held the key leaves (RFC 5863 wants their keys withdrawn); - a signing host or the key store is compromised, or the key is exposed; - an outside sender's contract ends; - the policy floor rises, as with the move from 1024 bits. A shorter interval bounds how long an unnoticed leak stays useful; each rotation still costs a coordinated change across DNS and mail, which RFC 5863 section 3.2 notes are often run by different staff. ## Ownership - **One named owner per key**: RFC 5863 wants responsibility for a signing key vested in a single named individual. - **A separate key per signer**, so one signer's leak or retirement touches only its own selector and stays auditable. - **Outside senders generate and hold their own keys**, which RFC 5863 section 3.4 prefers; the policy then requires them to meet the key floor and rotate. - **An inventory**: selector, algorithm, length, signing hosts, owner, created and next-rotation dates. ## Knowing the policy works - DMARC aggregate reports name the `selector` on every DKIM row (required since RFC 9990, May 2026), so a forgotten 1024-bit selector still signing shows up. - Test messages from each signer confirm the algorithm and selector actually used. - A dated record of each completed rotation, scheduled or triggered, shows the cadence is real and not just written down. - A yearly review of the inventory catches signers that drifted below the floor, owners who left and selectors that should have become gravestones.
- Would you rotate DKIM keys monthly to be safe?Only if custody is weak and the change is fully automated. RFC 5863 values secrecy above frequency, and every rotation is a coordinated DNS and mail change with its own risk of breaking signatures. A hardware-held key rotated yearly, with real event triggers, is the better trade.
- When would you sign with Ed25519 alone and drop the RSA signature?Not while verifiers that lack RFC 8463 support still receive your mail, because they would see no usable signature. Dropping RSA is a later decision, made when the receivers you care about verify Ed25519 and the RSA signature has stopped adding deliveries.
- Rotating every hour makes a software-held key safe.
- RFC 6376 requires a new DKIM key at least once a year.
- Ed25519 can replace RSA now, because RFC 8463 requires verifiers to support it.
- RSA and Ed25519 keys can share one selector's record.
- Outside senders are on their own keys, so their key length is not our policy.