Skip to main content
  1. Index/

HSM (Hardware Security Module)

A Hardware Security Module (HSM) is a purpose-built, tamper-resistant hardware device that holds cryptographic keys and performs cryptographic operations — signing, encryption, decryption, random number generation — entirely within its own protected boundary. The defining property is that private keys generated inside an HSM never exist in plaintext outside it: operations that need the key are sent into the HSM and the result is returned, but the key material itself cannot be extracted. This property is enforced both logically (the firmware refuses export in plaintext) and physically (the device detects and responds to tampering by erasing key material before an attacker can read it). HSMs come in several physical forms: network-attached appliances (rack-mounted devices accessed over the network by many clients), PCIe cards (embedded in a server), and compact USB devices for lower-throughput use cases like protecting CA root keys offline.

The primary trust assurance for an HSM is its FIPS 140 certification, a NIST standard defining four security levels for cryptographic modules. Level 1 requires only that approved algorithms are used. Level 2 adds tamper-evidence — physical seals that show whether the enclosure has been opened. Level 3 — the most common level for commercial HSMs — adds tamper-resistance (the device actively erases keys when intrusion is detected) and identity-based authentication to prevent unauthorized use of the key store. Level 4 adds environmental attack resistance (voltage, temperature, radiation) and is typically reserved for the most sensitive applications such as national-security or payment-network root keys. An HSM’s FIPS certification is what allows it to serve as the trust anchor in regulated environments: PCI DSS requires HSMs for payment key management, most certificate authority root keys are stored in FIPS 140-2 Level 3 or higher devices, and many national PKI programmes mandate them by regulation. Clients interact with HSMs through standardised interfaces: PKCS#11 (the most widely-supported API, used by OpenSSL, NSS, and most Linux tooling), KMIP (key management protocol), JCE, and CNG.

In the broader infrastructure stack, HSMs appear in two roles. As a root-of-trust for signing, an HSM holds the CA private key, code-signing key, or Secure Boot signing key and performs all signing operations on behalf of a pipeline — the key never touches the CI/CD system, so a compromised build host cannot steal it. As a seal backend for secret management, tools like Vault use an HSM (via PKCS#11) as their auto-unseal mechanism: Vault’s master key is wrapped by a key held in the HSM, so Vault can unseal automatically on restart without a human holding unseal shares, while the master key remains protected by hardware. The relationship to the TPM is one of complementary scope: a TPM is a fixed-function, low-cost chip soldered to a motherboard, intended to measure boot state and seal small secrets to platform identity; an HSM is a high-performance, reprogrammable, physically hardened appliance intended for large volumes of cryptographic operations and multi-user key management, deployable wherever in the network the workload demands.

Related

FIDO (Fast IDentity Online) / FIDO2

FIDO2 is the current generation of authentication standards produced jointly by the FIDO Alliance and the W3C, combining two specifications: WebAuthn (Web Authentication API, W3C Level 3, 2025) and CTAP2 (Client to Authenticator Protocol 2, FIDO Alliance). Its defining security property is origin binding: every FIDO2 credential is generated and used with a cryptographic binding to the specific Relying Party ID (RP ID — typically the registering domain’s origin) encoded into every authentication assertion. An authenticator will refuse to produce an assertion for evil.com using a credential registered with bank.com, even if the phishing site presents an identical login page and intercepts the WebAuthn call — the origin check is enforced inside the authenticator, not in JavaScript, and cannot be bypassed by a man-in-the-middle who controls the network or the browser DOM. This property is what makes FIDO2 phishing-resistant by construction, whereas TOTP, SMS OTP, and push-notification MFA are all interceptable by a real-time phishing proxy. FIDO2 is the direct successor to FIDO U2F (Universal 2nd Factor), which provided phishing resistance as a second factor only; FIDO2 extends the model to full passwordless primary authentication.

OpenPGP / GPG

OpenPGP is an open standard for encryption and digital signatures of arbitrary data, defined in RFC 4880 (2007) and substantially revised in RFC 9580 (2024, adding Ed25519, X25519, and modern AEAD encryption). GnuPG (GPG) is the dominant open-source implementation, maintained by Werner Koch and the GnuPG project, and the tool most users interact with. OpenPGP predates the PKI/CA model and takes a fundamentally different approach to trust: rather than a hierarchy of certificate authorities that users must trust transitively, OpenPGP uses a Web of Trust in which individual users sign each other’s public keys, and trust is established through chains of personal endorsements. In the Web of Trust model, Alice trusts Bob’s key because she verified it in person and signed it; Carol trusts Bob’s key because Alice (whom Carol trusts) signed it. This decentralised, peer-to-peer trust model made sense for email encryption between individuals who could meet at key-signing parties, but does not scale to automated infrastructure verification, which is why OpenPGP’s role in modern infrastructure is primarily supply chain signing — package repositories, Git commits, and release artifacts — rather than interactive authentication.

PKI (Public Key Infrastructure)

Public Key Infrastructure (PKI) is the framework that makes asymmetric cryptography operationally useful at scale. Asymmetric cryptography provides a mathematical relationship between a public key and a private key, but by itself it cannot answer the question a relying party cares about: whose public key is this? PKI answers that question by introducing a trusted third party — the Certificate Authority (CA) — that cryptographically binds a public key to an identity (a hostname, an organisation name, an email address, a SPIFFE ID) by signing a certificate. A relying party that trusts the CA can therefore trust any certificate the CA signs, without needing to know the subject directly. The chain of trust extends recursively: a Root CA signs Intermediate CA certificates, which sign end-entity certificates (also called leaf certificates). Root CA private keys are kept offline in HSMs and used rarely; intermediate CAs handle day-to-day issuance and can be revoked without rotating the root. The set of root CA certificates a system trusts is its trust store — browsers and operating systems ship with a pre-populated trust store of publicly-trusted roots, while private PKIs use custom roots distributed by administrators.