Join our Newsletter — 33% off our NHI Course
Foundations & NHI Taxonomy

DKIM Key

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Foundations & NHI Taxonomy

A DKIM Key is the public-private key pair used for DomainKeys Identified Mail. The sending server signs outgoing messages with the private key, and receivers verify the signature using the public key published in a DNS record. A leaked private key lets attackers sign forged mail; weak keys and stale selectors are risks, so rotate keys regularly.

What a DKIM key does

A DKIM key is not a message-content control, it is the cryptographic trust anchor that lets receivers verify that a message was signed by a domain that claims responsibility for it. The private key stays with the sender, while the public key is published in DNS so receiving systems can validate the signature against the visible domain.

That makes the key pair part of email authentication rather than a simple configuration detail. If the private key is exposed, an attacker can create valid-looking signatures for forged mail, which is why DKIM security depends on both key protection and disciplined selector management.

How DKIM keys are published and used

In practice, a DKIM key pair is tied to a selector, which helps receivers find the right public key record in DNS. The sender signs the message at the mail transfer stage, and the recipient checks whether the signature still matches the signed headers and body after transit. This protects against tampering, but only if the signing system and DNS record are both trustworthy.

Key publication is therefore operational as well as cryptographic. If a domain changes mail platforms, adds a new sending service, or retires an old selector, the DNS record set must stay aligned with the active signing path. Otherwise, legitimate mail can fail verification or stale keys can remain usable longer than intended.

Why DKIM key strength and rotation matter

DKIM only provides meaningful assurance when the private key is hard to steal and the public key reflects the current, intended signing key. Weak keys reduce resistance to offline compromise, while long-lived or forgotten selectors increase the chance that an old signing key remains available to attackers or is reused in ways the organisation did not intend.

Key rotation is therefore not a ceremonial hygiene step. It limits the value of any single key, narrows the exposure window after compromise, and gives security teams a clean way to retire older signing material when senders, vendors, or mail flows change. For related email-authentication architecture, see the Email Security Guide and the DMARC, SPF and DKIM Guide.

How DKIM fits into broader email authentication

DKIM is strongest when used with SPF and DMARC, because each mechanism answers a different question about message legitimacy. DKIM helps prove that the message was signed by a domain holder; DMARC then checks alignment and policy, which helps receivers decide how to treat mail that passes or fails authentication.

That broader stack matters because DKIM alone does not stop every abuse case. An attacker who can send from an authorised infrastructure path, or who has captured a private key, may still produce messages that appear legitimate unless policy, alignment, and sender governance are also enforced. The Email Identity and BEC Guide explains how that layering reduces impersonation and invoice-fraud risk, and the Email Authentication Checklist shows how to operationalise it across domains.

Risk and Threat Considerations

DKIM key compromise is dangerous because it converts an email-authentication control into an attacker signing capability. A stolen private key can be used to forge trusted-looking mail, support business email compromise, and preserve sender reputation long enough to bypass user suspicion or downstream filtering.

Failure mechanism: Weak protection of the private key, excessive key age, or poor selector retirement allows malicious signing material to be reused after it should have been revoked.

Impact: Receivers may accept forged messages as authentic, which can enable spoofed invoices, impersonation, malicious links, and persistent abuse of the domain’s mail reputation.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5, NIST SP 800-57 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementCovers lifecycle control of DKIM private keys as authenticators used to prove sender identity.
Recommendation — Rotate, revoke, and protect DKIM private keys under authenticator lifecycle controls.
NIST SP 800-57Key ManagementDirectly addresses cryptographic key lifecycle, rotation, and retirement for DKIM keys.
Recommendation — Apply key lifecycle policy to generate, rotate, retire, and destroy DKIM signing keys.
CIS Controls v8CIS-5 — Account ManagementSupports governance over authorised senders and lifecycle of email-signing access paths.
Recommendation — Track authorised email senders and remove stale signing access when services are retired.
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageA leaked DKIM private key is secret leakage that enables forged mail.
NHI-07 — Long-Lived SecretsStale DKIM selectors create long-lived signing secrets that increase abuse window.
Recommendation — Protect DKIM private keys from disclosure and revoke them immediately if exposed. Shorten DKIM key lifetime and retire obsolete selectors on a fixed schedule.

Practitioner Guidance

Why practitioners should care: DKIM is only as strong as its private key handling and selector lifecycle. Treat key storage, rotation, and retirement as a control owner’s responsibility, not just an email platform setting.

What to watch for: Old selectors that still resolve, unmanaged third-party senders, or signing services that nobody can inventory cleanly are common signs that DKIM governance is drifting. If a key is suspected compromised, rotate it promptly and review whether any signed mail should be treated as potentially forged.

For lifecycle discipline, it helps to keep a complete register of every sender and selector in use, then retire keys as part of vendor offboarding or mail-platform change. That is the simplest way to prevent stale signing material from outliving the system that created it.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org