Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
An HSM is a tamper-resistant device that generates and stores cryptographic keys and performs operations with them, so the key material never exists in readable form outside the hardware.

What Is a Hardware Security Module?
A hardware security module is a dedicated, tamper-resistant device whose single purpose is to hold cryptographic keys and use them on request. Keys are generated inside it, never leave it in plaintext, and are destroyed if the enclosure is attacked. An application does not ask for the key; it asks the HSM to sign, decrypt, or wrap something, and receives the result.
That inversion is the point. A private key stored in a file can be copied by anyone who reads the file, and nothing in the logs will show that it happened. A key in an HSM can be used by whoever is authorised, every use is recorded, and extracting it requires physical attack against hardware designed to die rather than yield.
A certified module combines a hardened cryptographic processor, physical defences such as epoxy potting, mesh sensors, and temperature and voltage monitoring, a true random number generator, and secure firmware with authenticated updates. Tamper detection triggers immediate zeroisation: the keys are erased before an attacker reaches them.
Form factors vary with the use case. Network-attached appliances serve many applications over a LAN; PCIe cards sit inside a single server for lower latency; USB tokens hold one or two keys for signing; payment HSMs implement card-scheme-specific operations; and cloud services such as AWS CloudHSM, Azure Managed HSM, and Google Cloud HSM rent capacity in a provider’s data centre.
| FIPS 140-3 level | Requirement | Typical form |
|---|---|---|
| Level 1 | Approved algorithms, no physical security requirements | A software library |
| Level 2 | Tamper evidence and role-based authentication | Some smart cards and tokens |
| Level 3 | Tamper resistance, identity-based authentication, zeroisation | Most commercial HSMs |
| Level 4 | Complete envelope protection, environmental attack response | High-assurance and payment modules |
Level 3 is the usual commercial target. Payment environments add PCI PTS HSM certification on top, and European schemes often require Common Criteria evaluation instead or as well. Check that the certificate covers the exact firmware version you are running, because validations are version-specific.
Serious HSM deployments separate duties with an m-of-n quorum: administrative operations require, say, three of five smart cards held by different people in different places. Key generation for a root CA is performed as a scripted ceremony with independent witnesses, video recording, and a signed record of every step, because the resulting key may be trusted for twenty years and cannot be audited afterwards.
Day-to-day operation introduces its own requirements. Backups of key material are taken as encrypted blobs that only another module in the same security domain can import. Clustering provides availability, because an HSM that fails takes every dependent service with it. Firmware updates must be planned, since some invalidate the FIPS certification until a new one is issued. And applications reach the module through standard interfaces — PKCS#11, KMIP, JCE, or CNG — which is worth confirming before purchase rather than after.
Appliances are expensive to buy and to run, and a cloud HSM or a managed key service covers most requirements at a fraction of the cost. The honest question is what the key protects and who would be liable if it were copied. A signing key that authorises software running on a million devices, a CA key that underpins every internal TLS connection, or a key protecting cardholder data belongs in hardware. A key encrypting a departmental file share probably belongs in a managed key service with good policy controls.
What rarely works is the intermediate position: a key file sitting on an application server with a comment in the deployment script asking people not to copy it. We find those regularly, and they are the reason this control exists. Key custody arrangements form part of our infrastructure and architecture review services.
A TPM is a small chip soldered into a single machine, protecting that device’s own keys for measured boot, disk encryption, and attestation. An HSM is a separate, higher-assurance module serving many applications, with far greater throughput, quorum administration, and formal certification. They solve different problems and are not substitutes for each other.
The hardware and certifications are typically identical, and the provider cannot extract your keys from a dedicated or managed HSM. What differs is the trust model and jurisdiction: you depend on the provider’s operational controls and on where the hardware sits. For most organisations that trade is favourable, but regulated sectors should check their supervisor’s expectations.
Only in wrapped form, encrypted under another key, and only if the key was marked exportable when it was created. Mark signing and root keys non-exportable so no mechanism exists to remove them. Backup and replication use wrapped exports that can be imported solely by modules sharing the same security domain.
Every service depending on it stops, which is why production deployments cluster at least two modules and keep encrypted backups of key material plus the smart cards needed to restore them. Test the restore path on a schedule. An HSM whose backup procedure has never been exercised is a single point of failure for the keys it holds.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.