PGP Key Servers vs WKD: What to Use in 2026

Explore PGP Key Servers vs WKD in 2026. Understand SKS vulnerabilities, WKD implementation, threat models, and how to harden your GnuPG discovery configura

On this page

Public Key Cryptography has historically suffered not from flawed mathematics, but from a persistent distribution failure: the key discovery problem. For decades, the OpenPGP ecosystem relied on public key servers running synchronization protocols to distribute public keys. However, structural vulnerabilities, denial-of-service vectors, and architectural privacy flaws systematically dismantled the legacy Synchronizing Key Server (SKS) network. Entering 2026, the Web Key Directory (WKD) protocol has largely supplanted legacy keyservers as the primary mechanism for automated key discovery in modern mail user agents (MUAs). Understanding the cryptographic, operational, and threat-model differences between these systems is essential for deploying modern, defensive OpenPGP infrastructure.

The Structural Collapse of the SKS Keyserver Pool

The legacy OpenPGP discovery paradigm was anchored by the SKS (Synchronizing Key Server) pool, a distributed, peer-to-peer network of servers that synchronized public keys using an append-only gossip protocol. While decentralized, the SKS architecture possessed fatal design flaws rooted in the OpenPGP specification itself.

Certificate Poisoning and Immutable Append-Only Logs

Under RFC 4880, an OpenPGP public key certificate is composed of a primary key, user ID packets (typically containing an identity and email address), subkeys, and cryptographic signatures (binding signatures and third-party certifications). Crucially, the SKS protocol was designed to be append-only: anyone could append a signature or a new subkey to any existing key and upload it to any pool node. The gossip algorithm would then propagate these additions globally across all federated nodes.

This design permitted certificate poisoning attacks. Malicious actors exploited the inability to delete or restrict certifications by flooding targets' public keys with tens of thousands of bogus cryptographic signatures. When a client running GnuPG attempted to refresh a key from an SKS keyserver:

  • The client downloaded megabytes of cryptographic signatures attached to the poisoned certificate.
  • GnuPG attempted to parse and validate every signature in memory, freezing the process or causing an out-of-memory crash (algorithmic complexity denial of service).
  • Because SKS nodes could not prune or modify keys without breaking synchronization hashes, poisoned keys became permanently corrupted across the entire pool.

Regulatory Incompatibility and Metadata Leakage

The immutable, gossip-based architecture directly conflicted with privacy regulations such as the European Union's General Data Protection Regulation (GDPR). The "Right to be Forgotten" could not be implemented on SKS nodes; once an email address was published to a keyserver, it was synchronized permanently across uncontrolled foreign servers. Furthermore, the SKS network served as an open-source intelligence (OSINT) harvesting ground for spam scrapers and state surveillance apparatuses mapping cryptographic social graphs via third-party signatures.

The Modern Intermediary: Hagrid and Verified Keyservers

To mitigate SKS poisoning, modern keyservers transitioned to software such as Hagrid (which powers keys.openpgp.org). Hagrid fundamentally altered keyserver semantics by implementing strict verification and cryptographic hygiene.

# Querying a modern verified keyserver directly via HKPS
gpg --keyserver hkps://keys.openpgp.org --search-keys [email protected]

Unlike SKS, Hagrid does not federate via an untrusted gossip network and does not accept unverified metadata. Its architectural principles include:

  • User ID Stripping: By default, Hagrid accepts public keys but strips all User IDs (names and emails), distributing only bare cryptographic keys and subkeys unless the identity is explicitly verified.
  • Email Verification Loops: A User ID is only published alongside the key after sending an automated challenge link to the email address listed in the User ID.
  • Revocation and Deletion: Key owners can verify ownership via email or their revocation certificate to delete user identity bindings, satisfying GDPR requirements.
  • Rejection of Third-Party Signatures: Hagrid strips non-self signatures, breaking the Web of Trust (WoT) functionality over the network to completely neutralize certificate poisoning.

Web Key Directory (WKD): Architecture and Mechanics

While Hagrid stabilized centralized/federated keyservers, the Web Key Directory (WKD) protocol decentralized key distribution by shifting authority directly to the domain owner of the email address. Documented in draft-koch-openpgp-webkey-service, WKD uses HTTPS infrastructure to serve raw OpenPGP keys.

The Z-Base-32 Local-Part Hash

WKD avoids exposing cleartext email addresses in directory paths or web server logs. To discover the key for an email address (e.g., [email protected]), the client takes the local-part (alice), computes its SHA-1 digest, and encodes that digest using Z-Base-32 (a human-oriented, 32-character encoding format designed to prevent transcription errors).

You can inspect the WKD hash of an address using GnuPG's internal utilities:

$ gpg --with-wkd-hash -k [email protected]
pub   ed25519 2026-01-15 [SC]
      9D4F28B0E8D9C1A0F5B73E12D3A4B5C6E7F80123
uid           [ultimate] [email protected]
              [email protected]

URI Resolution: Advanced vs. Direct Method

WKD defines two operational methods for retrieving the binary public key (which is served as application/octet-stream or application/pgp-keys):

  1. The Advanced Method (Preferred): The client queries an explicitly designated openpgpkey subdomain. This isolates PGP traffic from main domain infrastructure.
    https://openpgpkey.example.com/.well-known/openpgpkey/example.com/hu/bx9q3a8w8y3a1x8t7p9z6g7c9r1e4w3a?l=alice
  2. The Direct Method (Fallback): If the advanced subdomain does not resolve, the client queries the root apex domain directly.
    https://example.com/.well-known/openpgpkey/hu/bx9q3a8w8y3a1x8t7p9z6g7c9r1e4w3a?l=alice

Modern clients like Thunderbird, GnuPG (via gpg-wks-client), and Mailvelope automatically perform this resolution sequence when an outgoing encrypted email is drafted.

Threat Modeling: Keyservers vs. WKD

Selecting between keyservers and WKD requires a defensive security evaluation across specific operational vectors.

Trust Anchors: Web of Trust vs. Web PKI

Legacy keyservers operated independently of traditional Certificate Authorities, intending to rely purely on cryptographic cross-certifications (the Web of Trust). In practice, users rarely validated full certification graphs, resulting in rampant Trust On First Use (TOFU) vulnerabilities.

WKD intentionally ties OpenPGP trust to the Web Public Key Infrastructure (Web PKI) and DNS. When a client fetches a key via WKD, it trusts that:

  • The domain's DNS is uncompromised (or protected by DNSSEC).
  • The HTTPS TLS certificate is valid and issued by a trusted Certificate Authority.
  • The server administrator of the target domain has not maliciously replaced the binary public key.

While this introduces reliance on the standard TLS threat model, it precisely mirrors the trust model of email itself. In SMTP, a compromised domain administrator or upstream TLS adversary can already alter or inspect unencrypted traffic; WKD ensures that encryption keys are authenticated to at least the same boundary as the mail transport itself.

Impersonation and Discovery Poisoning

On unverified keyservers, an adversary can upload a key with the UID [email protected] using an arbitrary key ID. If a third party searches for that key, they may unknowingly select the adversary's key.

WKD eliminates discovery poisoning. An attacker cannot inject a key for target-domain.org without controlling that domain's HTTPS endpoints. The threat is constrained entirely to domain compromise, rather than ecosystem-wide impersonation.

Metadata Leakage

When querying keyservers via HKPS, the keyserver operator learns which fingerprints or email addresses the user is attempting to communicate with, building an external communication profile. While WKD also reveals this via HTTPS requests to the destination server, the query is sent directly to the recipient's domain, which already processes the incoming mail. This limits metadata exposure to the necessary parties instead of a third-party directory operator.

Alternative and Complementary Distribution Standards

While WKD is the current operational standard, defensive architectures frequently incorporate complementary discovery channels.

DANE and OPENPGPKEY (RFC 7929)

DNS-Based Authentication of Named Entities (DANE) allows domain administrators to publish OpenPGP public keys directly in DNS resource records using the OPENPGPKEY record type. This mechanism relies entirely on DNSSEC rather than Web PKI.

# Querying an OPENPGPKEY record via drill/dig
dig TYPE61 _openpgpkey.alice._openpgpkey.example.com +dnssec

While cryptographically sound, DANE adoption remains constrained by widespread lack of registrar support for DNSSEC and the administrative overhead of managing large binary records across DNS zones.

Autocrypt

Autocrypt solves discovery strictly in-band. When two users exchange email, the client injects an Autocrypt: header into the MIME structure of outgoing mail, containing the sender's public key:

Autocrypt: [email protected]; prefer-encrypt=mutual; keydata=mQENBF...

Autocrypt requires no external infrastructure (no keyservers, no DNS modifications, no HTTPS paths). However, it cannot facilitate cold outreach; an unencrypted initial message must be received before encryption can be established.

Defensive Configuration: Hardening GnuPG in 2026

To guard against legacy keyserver vulnerabilities while leveraging modern discovery protocols, operational environments should configure gpg.conf to prioritize authenticated, domain-anchored mechanisms.

Audit and update your ~/.gnupg/gpg.conf file with the following parameters:

# Disable automatic key retrieval from untrusted keyserver pools
no-auto-key-retrieve

# Configure auto-key-locate to prioritize WKD and DANE over keyservers
auto-key-locate clear,wkd,dane,nodefault

# Use a privacy-preserving, verified keyserver strictly as an explicit fallback
keyserver hkps://keys.openpgp.org

# Avoid leaking keyserver URLs from imported keys
keyserver-options no-honor-keyserver-url

# Suppress key signatures that could facilitate local resource exhaustion
import-options import-clean,repair-pks-subkey-bug
export-options export-clean

Generating and Hosting WKD Files

System administrators deploying WKD for their domains can generate the necessary directory structure using GnuPG's native toolset. The following sequence demonstrates how to create a minimal, stripped key payload and locate it correctly on an HTTP server:

# 1. Export the public key stripped of signatures
gpg --export-options export-minimal --export [email protected] > alice.pgp

# 2. Identify the Z-Base-32 hash of the email's local part
HASH=$(gpg --with-wkd-hash -k [email protected] | grep -A 1 "uid" | tail -n 1 | awk '{print $1}' | cut -d'@' -f1)

# 3. Create the standard directory structure
mkdir -p .well-known/openpgpkey/hu/

# 4. Move the binary key to the hash destination
mv alice.pgp .well-known/openpgpkey/hu/$HASH

# 5. Create the empty policy file required by WKD
touch .well-known/openpgpkey/policy

The web server must be configured to serve these files with the Content-Type: application/octet-stream header and must include appropriate Cross-Origin Resource Sharing (CORS) headers if web-based OpenPGP clients like Mailvelope are supported:

Access-Control-Allow-Origin: *

The Verdict for 2026

Legacy SKS keyservers are obsolete and present an active security liability to clients that interface with them. For high-assurance environments, journalists, and security practitioners in 2026, the strategy is unambiguous:

  • Primary Discovery: Rely on Web Key Directory (WKD). It provides domain-level identity verification, eliminates certificate poisoning vectors, minimizes external metadata leakage, and integrates natively with modern email clients.
  • Fallback Discovery: Use single-entity verified keyservers like keys.openpgp.org only when out-of-band communication or automated WKD lookup is impossible.
  • Verification Baseline: Regardless of discovery mechanism, automated retrieval does not replace manual out-of-band fingerprint verification for high-threat scenarios. Cryptographic discovery protocols automate convenience; trust must remain anchored in mathematical certainty.
Keywords
PGPWKDWeb Key DirectoryOpenPGPGnuPGkeyserversemail encryptioncryptography