Suped

What is the purpose of the DKIM 'p=' tag in the public key record?

DKIM, which stands for DomainKeys Identified Mail, is a critical email authentication standard. It acts like a digital signature for your emails, allowing receiving mail servers to verify that an email was actually sent by the owner of the domain it claims to come from and that its content hasn't been tampered with in transit. This verification is achieved through a pair of cryptographic keys: a private key that signs the email and a public key published in your domain's DNS records.

The public key is stored in a special DNS TXT record, often called the DKIM record. This record contains several tags, each serving a specific purpose. The most important of these is the p= tag.

Suped DMARC monitor
Free forever, no credit card required
Get started for free
Trusted by teams securing millions of inboxes
Company logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logo

What is the p= tag?

The p= tag in a DKIM record stands for 'public key'. Its value is the base64-encoded public key data that corresponds to the private key used for signing your outgoing emails. This public key is the essential piece of information that receiving mail servers need to validate your DKIM signature.

www.emailonacid.com logo
Email on Acid says:
Visit website
A DKIM signature helps mailbox providers verify you as the sender while preventing phishing attacks known as email spoofing.

When an email provider like Gmail or Outlook receives an email with a DKIM signature, it performs a lookup to find the public key and verify the message's authenticity. Without the public key data in the p= tag, this entire verification process would fail.

How the p= tag facilitates DKIM verification

The process of DKIM verification relies entirely on the information provided by the p= tag. Here is a simplified breakdown of the steps involved:

  • Signing: When you send an email, your server uses a private key to create a unique digital signature. This signature is added to the email's headers.
  • Lookup: The receiving mail server sees the DKIM signature in the header. It then performs a DNS lookup to find the DKIM TXT record for your domain, as specified in the signature.
  • Extraction: From this DNS record, the server extracts the public key data from the p= tag.
  • Verification: The server uses this public key to validate the email's signature. If the signature is valid, it proves two things: the email was authorized by the domain owner and key parts of the email haven't been altered.

This validation process is a core part of modern email security, helping to build trust and protect against common threats like spoofing and phishing.

Structure of a DKIM record

While p= is the most critical component for verification, a DKIM record contains other tags that provide important context. A typical record looks something like this:

v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3...;

v=DKIM1: This specifies the DKIM version being used. It is almost always 'DKIM1'.

k=rsa: This indicates the key type. 'rsa' (RSA) is the most common encryption algorithm used.

p=...: This contains the public key data itself. If this tag is missing or empty, DKIM authentication will fail because receivers will have no way to verify the signature.

In summary, the p= tag is the heart of the DKIM public key record. It provides the essential cryptographic information that allows the world's email servers to confirm your identity as a legitimate sender, protecting your reputation and your recipients from harm.

Start improving your email deliverability today

Get started