Encryption Observer

Glossary Keeping keys safe

Hardware security modules (HSMs)

An HSM is a specialised, hardened device that stores keys and does cryptography inside itself. The keys never leave. If someone tries to open or probe it, it wipes itself.

Think of it like this

A bank vault with a hatch. You pass in documents to be stamped, but nobody can ever take the stamp out.

What happens when you tap your cardUses public-key cryptography a quantum computer could breakUses symmetric keys, which stay safeThe card check and the network links use public-key cryptography that needs replacing. The PIN, the one-time code and the bank's check run on symmetric keys that stay safe.
  1. Your card or phone
  2. 1Card check The terminal checks a chain of signatures to confirm the card is genuine. Today: RSA certificates Breakable in principle. EMVCo does not expect a threat to chip cards before 2040, if ever.
  3. 2PIN Your PIN is checked by the chip, or encrypted at the keypad and passed only between secure devices. Today: Triple DES or AES in HSMs Mostly safe. PINs sent to the bank use symmetric keys. A chip that checks the PIN itself may use RSA.
  4. 3One-time code The chip makes a cryptogram for this payment only, so copied details are useless. Today: Symmetric keys (Triple DES or AES) Safe. Visa recommends starting the move to AES before the end of 2030.
  5. 4Network links The payment travels between the shop's processor, the card network and your bank. Today: TLS and private networks Key exchange needs the same post-quantum upgrade as the web.
  6. 5Bank approval Your bank checks the cryptogram with its own copy of the key, inside a hardware security module. Today: Symmetric keys inside an HSM Safe, though loading keys into HSMs remotely often uses RSA, which needs replacing.
  7. Your bank

Why it matters

Banks, card schemes, certificate authorities and cloud providers rely on HSMs to protect the keys that everything else depends on.

Where you meet it

Behind every card payment and PIN check, and inside cloud key services. Your phone has a small version (Apple's Secure Enclave, Google's Titan M chip in Pixel phones, and the StrongBox security chips in other Android phones).

How a side-channel attack steals a keyAttacker's stepDefenceAttackers can recover a key from timing, power use or radio noise without touching the maths.
  1. 1Watch the device Measure how long each operation takes, how much power it draws or what it gives off. Example: Timing over a network, power on a smart card Needs no access to the key itself.
  2. 2Repeat many times Collect thousands or millions of measurements. Example: Automated Tiny differences add up.
  3. 3Work out the key Statistics link the measurements to individual bits of the key. Example: Kocher's 1996 timing attacks Spectre and Meltdown used similar ideas in 2018.
  4. 4Defence Code that takes the same time whatever the key, and hardware built to hide power and noise. Example: Constant-time code, HSMs, smart cards New post-quantum code has to meet the same bar.
Go deeper history and technical detail

HSMs are certified to standards such as FIPS 140-3. Payment HSMs follow extra card-industry rules (PCI PTS HSM). Cloud providers rent access to HSM-backed key management services. Upgrading the HSM estate is one of the slow, expensive parts of moving to post-quantum algorithms.

Related terms

Cite this page Encryption Observer, “Hardware security modules (HSMs)”, encryption.observer/terms/hsm/, checked December 2026.