[Articles](https://mailglo.com/articles/) / [DKIM and DMARC](https://mailglo.com/articles/topic/dkim-and-dmarc/)

For AI agents: [llms.txt, the index of guides and public pages](https://mailglo.com/llms.txt)

# Is a 1024-bit DKIM key still safe?

It meets the standard's minimum, but it's no longer a sound choice: switch to 2048 bits now. A researcher factored a public 896-bit challenge number in September 2026. He wrote that 1024-bit RSA keys are now "vulnerable to many actors with data center-level fleets of GPUs."

## Why the key length matters

An RSA DKIM key is a key pair. Your mail service signs with the private key, and receivers check the signature with the public key in DNS. Anyone who works out the private key from the public one can sign mail as your domain. If a receiver accepts that forged signature and the From address shows your domain, the message passes DMARC, even under `p=reject`. Spam filters may still catch it, but DMARC won't stop it.

RFC 8301 set the rule in January 2018: signers "MUST use RSA keys of at least 1024 bits" and "SHOULD use RSA keys of at least 2048 bits." The researcher, Stephen Weis, wrote that his result "does not impact the security of deployed RSA-2048 keys." Google recommends 2048 bits for Workspace, and 1024 only when a DNS host can't take the longer key.

## Check it on a real domain

Yahoo publishes keys of both lengths. We measured two of them on 5 December 2026. The first line defines a short command for this example. It reads the `p=` key from Yahoo's records and prints its length, using `dig`, `base64` and `openssl`:

```
$ key() { dig +short TXT "$1" | grep '^"' | tr -d '" \t\n' | sed -E 's/^(.*;)?p=([^;]*).*$/\2/' | base64 -d | openssl pkey -pubin -inform DER -noout -text | grep -m1 'Public-Key'; }
$ key s1024._domainkey.yahoo.com
Public-Key: (1024 bit)
$ key s2048._domainkey.yahoo.com
Public-Key: (2048 bit)
```

To check your own key, you need its selector, the name it sits under. DNS can't list a domain's selectors, so take it from a message you sent to an outside mailbox. Open the received copy's headers (in Gmail, **More › Show original**) and find each `DKIM-Signature` line. Its `s=` value is the selector and `d=` is the domain. A signature with `s=google; d=example.com` means the key is at `google._domainkey.example.com`.

A message can have several signatures. Check a message from each service you use. Then enter the `d=` domain in the [domain check](https://mailglo.com/check/), and if the key doesn't show, type the `s=` selector next to **Signing keys** and choose **Check key**. Each key shows its type, its length and a verdict: a usable 2048-bit RSA key says **Strong**, and a shorter one says **Weak key**. The `key` command above is written for Yahoo's two records only. For your own keys, use the domain check.

## Should I go past 2048 bits?

No. 2048 bits is the step to take now. A 3072-bit or 4096-bit key adds margin against classical attacks, but it doesn't protect against quantum computers. Under NIST's final IR 8547, the RSA signatures approved today are deprecated after 2030 and disallowed after 2035. That schedule applies to both 2048-bit and 4096-bit keys. Google Workspace and Microsoft 365 offer keys of up to 2048 bits. Post-quantum DKIM is still a draft.

The NSA's December 2026 post-quantum advisory doesn't mention DKIM. A signature is checked when the message arrives, so mail already delivered can't be forged later. [What the NSA's post-quantum advisory changes for your email](https://mailglo.com/blog/nsa-post-quantum-advisory-email/) covers the parts of email it does reach.

## Move to 2048 bits

### Google Workspace

1. In the Admin console, go to **Apps › Google Workspace › Gmail › Authenticate email**. Pick your domain under **Selected domain**, then select **Generate New Record**. Choose 2048 bits and a prefix your domain doesn't use yet, such as `google2048`, then select **Generate**.
2. At your DNS host, add a TXT record with the **DNS Host name** and **TXT record value** Google shows. Wait until the domain check shows the new selector as RSA, 2048 bits, **Strong**.
3. Select **Start authentication**. Signing with the new key can take up to 48 hours to start.
4. Send a message to an outside mailbox. In its headers, the new selector should be in `s=`, with `dkim=pass` for your domain.
5. Keep the old key until a delivered message passes with the new selector. If none does, keep it, and check the new record and the Admin console before you try again.
6. Once one passes, leave the old key in DNS a few more days, while mail signed with it may still arrive. Then publish the old selector with an empty `p=`, which tells receivers the key is revoked.

### Microsoft 365

Microsoft 365 holds both keys and publishes them for you through your two CNAME records, so don't change those records.

1. Signing must already be on for the domain. The Microsoft 365 article under **Related** shows how. Connect with `Connect-ExchangeOnline`, then run `Rotate-DkimSigningConfig -Identity example.com -KeySize 2048`, with your domain in place of `example.com`.
2. Four days later, run `Get-DkimSigningConfig -Identity example.com | Format-List Selector1KeySize,Selector2KeySize,SelectorAfterRotateOnDate,RotateOnDate`. After the `RotateOnDate`, the selector named in `SelectorAfterRotateOnDate` should be at 2048.
3. Send a message to an outside mailbox and check that `s=` names that selector, with `dkim=pass` for your domain.
4. If the other selector still shows 1024, run the same rotation again, so that neither key stays at 1024 bits.

### Any other service

Ask it for a 2048-bit key under a new selector, and publish what it gives you. Before you switch signing to it, the domain check should show it as RSA, 2048 bits, **Strong**. Then send a test message, as in step 4 for Google Workspace. Keep the old key until the received copy shows `dkim=pass` for the new selector, then leave time for mail signed with the old key to arrive.

- **You published the old key as a TXT record:** follow step 6 for Google Workspace.
- **The old selector is a CNAME to the service:** the service holds that key. Don't replace the CNAME. Ask the service to retire the old key.

### If the old key may be compromised

Don't wait. Revoke a key you publish yourself at once, or ask the service that holds it to. On Microsoft 365, contact Microsoft support at once: a normal rotation keeps using the old key for four days.

A 2048-bit key, encoded, is longer than the 255 characters one string in a TXT record can hold. If your DNS host rejects it, follow its help for long TXT values. It must stay one record made of several strings, not two records. Receivers join the strings before use.

## Sources

- [RFC 8301, section 3.2](https://www.rfc-editor.org/rfc/rfc8301#section-3.2): key sizes for DKIM signers and verifiers. January 2018.
- Stephen A. Weis, [RSA-896](https://saweis.net/posts/rsa-896): the factorization and what it means for 1024-bit and 2048-bit keys. 19 September 2026.
- NIST, [IR 8547](https://nvlpubs.nist.gov/nistpubs/ir/2026/NIST.IR.8547.pdf), *Transition to Post-Quantum Cryptography Standards*, sections 3.2 and 4: the dates for RSA. 27 October 2026.
- NSA, *Immediate Actions to Push Toward Post-Quantum* ([PP-26-4956](https://media.defense.gov/2026/Dec/01/2004039413/-1/-1/0/CSA_Immediate_Actions_Push_Toward_PQC.PDF)). December 2026.
- [RFC 6376, section 3.6.1](https://www.rfc-editor.org/rfc/rfc6376#section-3.6.1): an empty `p=` means the key is revoked; [section 3.6.2.2](https://www.rfc-editor.org/rfc/rfc6376#section-3.6.2.2): the strings of a TXT record are joined. September 2011.
- [RFC 9989, section 4.4](https://www.rfc-editor.org/rfc/rfc9989#section-4.4): a valid DKIM signature aligned with the From domain counts for DMARC. May 2026.
- Google: [Set up DKIM](https://support.google.com/a/answer/174124), key length options and choosing a prefix. Read on 4 December 2026.
- Microsoft: [Set up DKIM to sign mail from your cloud domain](https://learn.microsoft.com/en-us/defender-office-365/email-authentication-dkim-configure), rotating keys and changing their length. Updated 3 July 2026, read on 4 December 2026.

First published 5 Dec 2026.

Last updated 6 Dec 2026: Why 2048 bits is the step to take now, and why a longer RSA key doesn't protect against quantum computers.
