ProtoStackv0.1

Interactive Protocol Visualizer

Security & AuthProfessional trackIntermediateOSI: Application LayerStandard: RFC 6376

DKIM

— DomainKeys Identified Mail

DKIM adds a DKIM-Signature header to outgoing mail containing a hash of the body and a signature over selected headers. Receivers fetch the signer public key from DNS, so a message signed by a domain can be validated even after it travels through relays.

Read first: SMTP, DNSContent reviewed 2026-11-18

Interactive Session: How DKIM Works

Step through the packet exchange sequence between nodes.

Interactive Execution Sandbox

Interact with a live or clearly-labelled simulated instance of DKIM.

Threat Model & Attack Simulation

How this protocol is attacked in practice, what defenders can see, and which control stops it.

Threat model & attack simulation

Simulated

Defensive education. Every step runs in this page; no traffic is generated or sent.

Attack library

Weak DKIM key and signed-message replay

Spoofing

Short DKIM keys can be factored, and a captured signed message can be replayed if the body is unchanged.

Attackersimulated
DKIMtarget
Attack step 1 of 3
Inspect the selector

The attacker fetches the public key and finds a short key.

What a defender can see

DKIM keys below 2048 bits.

Impact if unmitigated

Delivered spoofed mail with a valid signature.

Defences that matter
  • Use 2048-bit keys and rotate them
  • DMARC alignment and enforcement
  • Reject old or duplicate signatures

This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.

Protocol Specification & Architecture

Key characteristics, real-world deployment patterns, and trade-offs.

Core Technical Features

  • RSA or Ed25519 signature carried in the DKIM-Signature header
  • Body hash (bh=) plus a signed list of header fields (h=)
  • Public key published as a DNS TXT record at selector._domainkey.domain
  • Survives forwarding when the relay does not modify signed content

Real-World Use Cases

  • Proving that a bank really sent a notification email
  • Stopping message modification and domain spoofing in transit
  • Providing the DKIM alignment signal used by DMARC

Advantages & Strengths

  • Signature verification works without any prior contact between sender and receiver
  • Keys are published in DNS, so no certificate authority is needed

Limitations & Vulnerabilities

  • Mailing lists that rewrite subject lines break the signature
  • A valid signature alone says nothing about the sender reputation