concept Domains & DNS
DKIM email signatures
DKIM (DomainKeys Identified Mail) associates a signing domain with selected canonicalized email headers and message content through a cryptographic signature.
What it means
DKIM lets a signer attach a cryptographic signature that receivers can verify using a public key published in DNS. The signature authenticates selected message content and the signing domain (d=), not necessarily the human-visible From domain or the sender’s good intent. Key selection uses the DKIM selector and signing domain. DKIM standard Algorithm guidance
Try it
Simulation — follow a synthetic DKIM verification. Use d=example.com, selector mail and matching public-key fixture. Modify signed bytes or select an unavailable key to see why verification no longer succeeds. Set visible From to another domain: DKIM can still validate independently, although DMARC alignment is another question. Choose Verify fixture, explore the two steps and Reset. No real private keys or mail are involved.
DKIM signature fixture
Change a selector, published-key fixture or signed content and examine one synthetic verification result.
The fixture has a matching public key at mail._domainkey.example.com and the selected canonicalized signed content is intact. This indicates a DKIM pass for d=example.com, not alignment with the author. No real cryptographic verification was performed.
| Observation | Model value |
|---|---|
| Key lookup | mail._domainkey.example.com |
| Canonical input | unchanged |
| Key fixture | matching |
| Visible From | aligned |
| Result | pass |
| DMARC alignment | Not assessed |
Local, bounded educational fixture. No DNS, mail, certificate, network, socket or external request is performed.
About this model
The matching key is available at the DNS name formed from the selected s= and d= values, not at a special hard-coded selector. This is a declared verification outcome, not RSA/EdDSA cryptography, full canonicalization or live DNS. From-domain alignment is evaluated separately by DMARC.
See the article’s protocol sources and model limits. The scene does not alter a real system.
How the mechanism works
The verifier reads algorithm, canonicalization, signed-header list and body hash metadata, obtains a key by selector and signing domain, and checks a signature over canonicalized data. Canonicalization exists because certain harmless transport changes should not automatically invalidate signatures; changes that affect signed canonicalized bytes can invalidate them. Whether a particular edit matters depends on the actual canonicalization and signed components, not a universal rule that any whitespace change always breaks DKIM.
Selectors support key rotation and delegation of signing operations. A sender can publish distinct public keys under multiple selectors while gradually rotating active signatures. Missing or incorrect key material can lead to nonverification. An attacker is not prevented from signing mail with a domain they themselves control; recipients also need alignment/policy context when interpreting the author identity.
A DKIM selector rotation
Imagine a signed message with d=example.com and s=m2. The verifier looks for public-key material at m2._domainkey.example.com. If the matching-key fixture is available and the canonicalized signed material remains unchanged, the synthetic result is pass. Choosing s=mail would simply choose a different DNS key location; neither selector name has special verification powers.
Now change signed bytes: verification fails even if the selected key is still matching. If the key is unavailable, the toy verifier reports that it cannot complete the check rather than claiming it has proved a bad signature. A DKIM pass proves the chosen signing-domain assertion within DKIM's protocol rules; a different visible From domain still needs a separate DMARC alignment decision. No real keys are loaded into this page.
Valid signature, wrong identity for DMARC
Suppose a message with From receipts.example.test carries a valid DKIM signature with d=another.test. Verification can legitimately pass for that signer, but DMARC alignment with the visible From domain is a different question. Another message could keep the same From domain but alter a signed header or body, causing DKIM verification to fail. The selector in s= chooses a DNS key under _domainkey for the signing domain; it is not a prescribed mailbox name, and rotating keys requires overlapping deployment considerations. DKIM identifiers Key security
In practice
For an authorized sender, inventory signing systems, selectors, public-key DNS records and private-key custody. Verify a representative message’s signature, canonicalized fields and alignment separately. Stop before deleting an old selector used by in-flight mail. Do not place private keys into public TXT records, tickets or educational input fields.
Limits and common mistakes
The fixture uses predeclared cryptographic outcomes, not a real signature algorithm or canonicalizer. It intentionally omits MIME complexities, key strengths, replay conditions and domain alignment. A pass cannot be used as a production DKIM validator, and DKIM alone is not confidentiality or human identity assurance.
Key takeaways
DKIM answers whether a specified signer’s selected message data verified. It does not itself decide From-domain alignment, recipient trust or delivery acceptance.
Frequently asked questions
Editorial questions, answered from the sources listed for this article.
Can DKIM pass when From belongs to another domain?
Yes. DKIM authenticates its signing d= domain; DMARC evaluates whether a successful signing identity aligns with the author domain.
Does the DKIM selector have to be named mail?
No. A selector chooses a namespace for the signing domain’s DNS public key. In this synthetic lab, a matching key is associated with whichever valid selector you enter.
Does DKIM encrypt the email message?
No. It produces a digital signature; the message content is not made confidential by DKIM.
Can DKIM sign only selected headers?
Yes. The signature declares covered header fields and the body hash under its canonicalization rules; unsupported assumptions about unsigned fields are unsafe.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- RFC6376 / STD76 — DomainKeys Identified Mail (DKIM) Signatures
DKIM signature verification, selector and canonicalization rules (RFC 6376). DKIM identity/signing/canonicalization; metadata lists updates8301/8463/8553/8616. HTML endpoint429 in one attempt; official info page including text was retrieved.
Checked .
- Cryptographic Algorithm and Key Usage Update to DKIM
Updated DKIM cryptographic strength requirements. DKIM algorithm/key constraints; do not recommend stale algorithms or call fake fixtures crypto validation.
Checked .