Body octets entering SHA-256
Hello,·team.↵ Meet·at·10.↵No l=: entire canonical body
A body hash is included in the signed DKIM header, which is itself included in the signature calculation.
FOLLOW THE SIGNED DATA · FICTIONAL MESSAGES AND DNS
These are tags in the DKIM-Signature header. Open an underlined term for an explanation and an example.
A body-hash match and a valid header signature are both needed; unsigned data lie outside that protection.
Hello,·team.↵ Meet·at·10.↵No l=: entire canonical body
h=from:subjectFrom:·Offers·<offers@brand.example>↵
Subject:·Meeting·notes↵Subject is selected
X-Route:·original↵X-Route is not selected
Signed bh=mtWvvw/KmkZ8V67tU75C7b7ZB/JLAYAwFzjpOVEOdsU=Received hash=mtWvvw/KmkZ8V67tU75C7b7ZB/JLAYAwFzjpOVEOdsU=DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.org; s=mail; h=from:subject; bh=mtWvvw/KmkZ8V67tU75C7b7ZB/JLAYAwFzjpOVEOdsU=; b=↓ Private-key signing creates b= ↓b=b4KIjwYPXR91Ds2E53MQnBKs…From must be signed. This fixture has one occurrence of each field. In general h= is processed in listed order, selecting matching fields from the bottom upward without reuse; repeated names can also assert that no further occurrence exists.
l= counts octets after canonicalization. Content beyond l= is not validated by this signature; a receiver may reject the signature for unsigned content. The length-limited option here is a teaching example, not a recommendation.
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=
bh= binds the covered body bytes into the signed header input. h= controls which message headers are signed; b= contains the resulting signature.
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.
The signing key authenticates the combined selected input.
Key idea: bh= carries the canonicalized body hash.
bh= carries the canonicalized body hash.
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.