auth.dkim.weak_key

DKIM RSA Key Too Small

What we check

We read the RSA key length from the published DKIM records. RFC 8301 sets a hard floor: signers must use at least 1024-bit keys, and verifiers must not treat signatures from keys under 1024 bits as valid. We flag keys below the recommended 2048-bit standard.

What this finding means

A DKIM key on this domain is shorter than 2048 bits. Short RSA keys can be factored with modern computing resources — and a factored key lets an attacker forge valid DKIM signatures for your domain, defeating the protection entirely. Keys under 1024 bits are rejected outright by conformant verifiers.

Historically, 512-bit keys were common because their short base64 fit older DNS panels' 255-character limit. That constraint is long gone: DNS TXT records can hold a 2048-bit key across concatenated strings.

Why it matters

How to fix

  1. Generate a new 2048-bit RSA key at your provider or MTA (Microsoft 365, Google Workspace, OpenDKIM, rspamd all support this).

  2. Publish the new public key, ideally under a new selector so you can rotate without a gap:

    selector2._domainkey.example.com.  IN  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..."
    
  3. Switch your signer to the new selector, confirm outgoing mail verifies, then retire the old key.

How it's graded

A DKIM RSA key below the minimum carries a 20-point deduction in the Authentication category. See Grading Methodology for the full scoring model.

Evidence example

$ dig +short TXT selector1._domainkey.example.com | tr -d '"'
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ...   ← 1024-bit key
Key length: 1024 bits (RFC 8301 recommends 2048)

References