Receiving server
d=example.org; s=mailConstructs mail._domainkey.example.orgThe receiver resolves the selector under the signing domain and verifies the signature.
FOLLOW THE SIGNED DATA · FICTIONAL MESSAGES AND DNS
Both checks must succeed. Missing/revoked keys, a different key, and temporary DNS failure are different paths.
d=example.org; s=mailConstructs mail._domainkey.example.orgv=DKIM1; k=rsa; p=MIIBCgKCAQEAy5XL15qo9i3R…Matching public keyHello,·team.↵ Meet·at·10.↵
Signed bh=mtWvvw/KmkZ8V67tU75C7b7ZB/JLAYAwFzjpOVEOdsU=New hash=mtWvvw/KmkZ8V67tU75C7b7ZB/JLAYAwFzjpOVEOdsU=✓ Body hash matchesb=b4KIjwYPXR91Ds2E53MQnBKs…Selected headers + original DKIM-Signature, with b= empty✓ Header-signature input matchesThe signed bh= stays inside the header-signature input. Changing only the body can fail its hash while the header signature still verifies.
Static view: prevalidated RSA/SHA-256 fixture.
Real RSA-2048/SHA-256 test signatures. Names, DNS answers and messages are fictional. Private keys are never included in these public assets. Long values below are shown in full.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.org; s=mail; h=from:subject; bh=mtWvvw/KmkZ8V67tU75C7b7ZB/JLAYAwFzjpOVEOdsU=; b=b4KIjwYPXR91Ds2E53MQnBKsht2g21BdDvcP42Wsg+hHIpx+ikEr/hrDsIL+VBljbwHbF+uP3n/nfZNGZLb4h+JV1tPcvO6pxpXrf+x3w7UiTY4E3gbvzRhXpsTda8AeeXsAJMD/xUrPKRluvwJRmnW7v8tskn6rqADZwdBCHwvfPjBoJQkuh5kdj3/DZtMTnD0AnV5o1dVyyxBKRG/oq+VlIL+7jIZEbQ7gFfVnyOh/86LsLF2M00BqKLhnkQWeyBIjLJXXwdaa6d1YpP+Kg9zmlE0AZMIfwPuxjitZsK3pJB71Qm6TE2MpWx08P4sJadmKBHSUb3xdXKquxDbpKA==MIIBCgKCAQEAy5XL15qo9i3RKdEPV5B4dPlNClTlWs9D5X1yW9m0Sdz8fhPuZYrC5R7X3D3WxsWY47v3p+mBwan/GSQzDF6y5T1wjygkZXPeposIf72M6kWgmRO4Shaz+Moq1hOEKPU29+CLkD+lznEhQsD8jBiHLM6wMSZQpc0BorecKtwDbdXDAY1WOvwmyq+wdskzZxadr0uLKUrGY/5ePyRhmbVJQdjKstATsJHrMvwXPhvATUpkIAnsYu1KNLkbXIwGjU04+ZXG/X8rREQCvIAIFWY27vLvuixn8rrF/tuTVoYNMy+tVgmBAvTTLi+IZaIfnOgtVUtZnzPQCx3B0LQMb4Be8wIDAQABfrom:Offers·<offers@brand.example>↵ subject:Meeting·notes↵ dkim-signature:v=1;·a=rsa-sha256;·c=relaxed/relaxed;·d=example.org;·s=mail;·h=from:subject;·bh=mtWvvw/KmkZ8V67tU75C7b7ZB/JLAYAwFzjpOVEOdsU=;·b=
A DKIM pass requires both the body-hash check and the signature check. It does not guarantee delivery or safe content.
Bounded ASCII/CRLF teaching examples. These are not a complete mail parser, DKIM implementation or DNS lookup service. Shortened hash/key/signature labels expand to actual values in the fixture details.
Recompute the canonical body hash and verify the signature. A pass establishes signed-input integrity, not delivery safety.
Key idea: Query mail._domainkey.example.org for the illustrated selector.
Query mail._domainkey.example.org for the illustrated selector.
Examples are illustrative. Consult the linked RFC and its errata for implementation details.
Mail transport moves a message between servers. The message format describes its contents. Authentication adds checks; it does not make every message safe.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.