Two hashes and a signature
What gets checked
The sender hashes the body and puts that hash (bh=) in the DKIM-Signature header. Then it signs a list of headers it names (h=), plus the signature header itself, with its private key. A receiver recomputes the body hash, rebuilds the signed headers and checks the signature with the public key published at selector._domainkey.domain.
So a changed body fails at the first step, and a changed signed header at the second. That is why the account number can’t be swapped in transit.
What it doesn’t cover
Headers left out of h=. If Reply-To isn’t signed, it can be changed without breaking anything, and your reply goes wherever it says.
The l= tag. It limits the signature to the first N bytes of the body. Anything appended afterwards still verifies. RFC 6376 warns about it; most large senders no longer use it.
What “verified” means for a payment
A valid signature from your supplier’s domain shows their mail system sent this text. It can’t show who was using the mailbox: most costly supplier fraud comes from a real, hacked account, and those messages are signed too. That is why the last step is always a phone call to a number you already had.
Canonicalisation, briefly
Mail servers reformat messages slightly. “Simple” hashes the bytes exactly; “relaxed” first squeezes runs of whitespace and lower-cases header names, so harmless reformatting survives. Neither lets a word change.
Paste a real message into the header analyzer to run the same check on it.
Sources and further reading
- RFC 6376: DomainKeys Identified Mail (DKIM) SignaturesIETF, 2011
- RFC 8301: Cryptographic Algorithm and Key Usage Update to DKIMIETF, 2018
- RFC 8463: A New Cryptographic Signature Method for DKIM (Ed25519)IETF, 2018
- l-Tag DKIM Vulnerability: What Can You Do to Secure Your Email?EasyDMARC
- The hidden threat: how misconfigured DKIM enables replay attacksRed Sift