Skip to content
uencoder

HPKP

HPKP (HTTP Public Key Pinning, RFC 7469) lets a site declare which public key fingerprints it trusts, blocking man-in-the-middle attacks that rely on CA mis-issuance.

Purpose

It makes browsers trust only the pinned fingerprints, so even a compromised CA issuing a fraudulent certificate cannot enable a MITM.

Mechanism

The site sends a Public-Key-Pins header with the SHA-256 fingerprint of its public key plus a backup; the browser thereafter trusts only certificates matching those fingerprints. max-age controls the pin's lifetime.

Use cases

  • Certificate public key pinning
  • Protection against CA compromise
  • Man-in-the-middle defense

Related tools

References