Encrypting email to someone has always had the same awkward first step: you need their public key, and there has never been a universal, trustworthy place to look it up. Two DNS record types try to solve that by publishing the key in the domain's own zone, protected by DNSSEC. OPENPGPKEY carries PGP keys and SMIMEA carries S/MIME certificates, and both are close cousins of DANE's TLSA record. This guide explains how each record is constructed, how a sender finds the right one, why DNSSEC is not optional here, and the honest state of client support as of November 2026.
The problem both records solve
To send encrypted mail to alice@example.com, you need Alice's public key, and you need confidence it is really hers and not an attacker's substitute. Traditionally that meant key servers, web-of-trust signatures, or manual fingerprint checks, none of which scale or work for ordinary users. The idea behind OPENPGPKEY and SMIMEA is to let the domain that owns the mailbox publish the key in DNS, so any sender can fetch it automatically during composition, with DNSSEC providing the assurance that the answer was not tampered with in transit.
How the record name is constructed
Both record types hide the local part of the address inside the DNS name, because you cannot put an at sign in a hostname. The local part (the piece before the at sign) is hashed with SHA-256, the hash is truncated to 28 octets and written as hex, and that string becomes a label under a fixed sub-zone of the domain. The sub-zone differs by record type.
| Record | Carries | Query name shape | Defined in |
|---|---|---|---|
| OPENPGPKEY | An OpenPGP public key | HASH._openpgpkey.example.com | RFC 7929 |
| SMIMEA | An S/MIME certificate or key | HASH._smimecert.example.com | RFC 8162 |
| TLSA (for comparison) | A TLS server cert association | _port._proto.host | RFC 6698 |
So for alice@example.com, a sender hashes alice, truncates, and queries <hash>._openpgpkey.example.com for the PGP key or <hash>._smimecert.example.com for the S/MIME certificate. The hashing means the mailbox name is not published in cleartext, though it offers only modest privacy since local parts are often guessable.
What the record data holds
An OPENPGPKEY record's data is the raw OpenPGP public key for that mailbox, published in binary form. There are no usage or selector fields to configure, which makes it simpler than TLSA: the record is essentially "here is the key for this address." An SMIMEA record borrows TLSA's structure exactly, carrying the same three leading fields, certificate usage, selector, and matching type, followed by the certificate association data. That means an SMIMEA record can either publish a full certificate or just a hash of one, and can either assert a specific end-entity certificate or a trust anchor, in the same way a TLSA record can.
Why DNSSEC is mandatory in practice
Here is the part that cannot be skipped. A public key fetched over plain DNS is worthless for security, because an attacker who can spoof the DNS answer can simply substitute their own key and silently read or forge the mail. Both RFCs are explicit that these records are only meaningful in a DNSSEC-signed zone, and well-behaved clients will refuse to use an OPENPGPKEY or SMIMEA answer that is not authenticated. DNSSEC is what turns "a key in DNS" into "a key I can trust came from the domain owner." If your zone is not signed, publishing these records provides no benefit and arguably a false sense of security. This is the same trust foundation that the whole DANE family, including TLSA, depends on.
Publishing a record, step by step
- Sign the zone with DNSSEC first and confirm the chain of trust validates. Without this, the rest is pointless.
- Take the mailbox local part exactly as used, hash it with SHA-256, and truncate to 28 octets, then hex-encode it to form the label.
- Export the public key (OpenPGP) or certificate (S/MIME) in the binary form the record expects.
- Create the record under
_openpgpkeyor_smimecertwith the hashed label, filling the TLSA-style fields for SMIMEA. - Publish, then query the exact name yourself to confirm it returns and validates under DNSSEC.
- Re-run the check whenever the key rotates, because a stale published key will cause senders to encrypt to something the recipient can no longer read.
The state of client support
This is where realism matters. Neither record type enjoys broad mail-client support. Some PGP-focused clients and plugins can look up OPENPGPKEY automatically, and a handful of enterprise S/MIME deployments use SMIMEA, but mainstream consumer mail apps largely do not consult either record during composition. The requirement for a DNSSEC-signed zone further narrows real-world use, since many domains remain unsigned. The result is that these records are genuinely useful in controlled environments, where both sides run compatible tooling, but they are not yet something you can publish and expect arbitrary senders to honor. Treat them as a forward-looking hardening step for technical audiences rather than a universal solution.
Where they fit alongside the rest of DNS-based trust
OPENPGPKEY and SMIMEA sit in the same family as TLSA: all three publish cryptographic material in DNS and lean entirely on DNSSEC for trust. TLSA secures the transport and server certificates, while OPENPGPKEY and SMIMEA secure the end-to-end content for a specific mailbox. They complement, rather than replace, transport-level protections like MTA-STS and DANE for mail servers, which guard the connection between servers rather than the message's own encryption.
Before publishing, verify your zone answers and resolves cleanly with a DNS lookup so you know the records are reachable and well-formed. Because everything here rests on a signed zone, start with our guide to DNSSEC basics, and for the transport-encryption decision that sits next to these records, see MTA-STS versus DANE.
What is the difference between OPENPGPKEY and SMIMEA?
They publish different key formats for the same purpose. OPENPGPKEY carries an OpenPGP public key under _openpgpkey, while SMIMEA carries an S/MIME certificate under _smimecert using TLSA-style fields. Both map a mailbox to its key via a hashed label.
Why is the mailbox name hashed into the DNS label?
Because a DNS label cannot contain an at sign, the local part is hashed with SHA-256 and truncated to form a valid label. It also keeps the mailbox from appearing in cleartext, though the privacy benefit is limited since local parts are often easy to guess.
Do these records work without DNSSEC?
No, not safely. A key fetched over unsigned DNS can be swapped by an attacker, so both RFCs require a DNSSEC-signed zone and conforming clients reject unauthenticated answers. Publishing them in an unsigned zone gives no real protection.
Will ordinary email clients use these records?
Mostly not yet. Support is limited to some PGP tooling and specific enterprise S/MIME setups. Mainstream consumer clients generally do not query either record, so treat them as useful in controlled environments rather than universal.
How are these related to TLSA and DANE?
They are part of the same DANE family and share its reliance on DNSSEC. TLSA associates a server's TLS certificate, while OPENPGPKEY and SMIMEA associate a mailbox's end-to-end encryption key. SMIMEA even reuses TLSA's exact field structure.
Publishing email keys in DNS is an elegant idea whose value is gated by two realities: your zone must be DNSSEC-signed, and the sender's client must actually look. Where both hold, OPENPGPKEY and SMIMEA give encrypted mail a trustworthy key-discovery path. Where they do not, they are a promising standard still waiting on adoption.