Home  ›  Glossary  ›  Hardware Security Module

What is a hardware security module (HSM)?

A hardware security module (HSM) is a tamper-resistant physical device that generates, stores and uses cryptographic keys so that the keys never leave it in readable form. Applications send data to the HSM, which encrypts, decrypts or signs it internally and returns only the result.

What does a hardware security module actually do?

  1. Generates keys from a hardware random number source, which produces less predictable keys than the software generators on ordinary servers.
  2. Stores keys inside the protected boundary. A key leaves only wrapped, meaning encrypted under another key, for backup or transfer to a second HSM.
  3. Performs operations such as signing, encrypting and unwrapping inside the device, so the key never appears in the host server's memory.
  4. Logs and controls use, recording each request and requiring authentication, often from several administrators together, before sensitive actions run.

Applications and storage platforms reach an HSM through standard key-access interfaces, and the device itself can be a plug-in card, a network appliance or a cloud service whose hardware the provider runs while the customer holds administrative control.

Three terms that get blurred

TermWhat it isQuestion it answers
Key management system (KMS)Software that creates, rotates, expires and distributes keys and records who may use themHow is the key lifecycle run?
Hardware security moduleThe tamper-resistant hardware under the key manager where master keys liveWhere is the key physically protected?
Customer-managed keysAn ownership model in which the data owner, not the provider, controls the keysWho holds authority over the key?

A key manager can run without an HSM, protecting keys in software, and an HSM can sit beneath a provider-run service. The three are independent choices, which is why a deployment can have customer-managed keys and no HSM, or an HSM the customer does not control.

When is an HSM actually required?

The driver is almost always a rule, not a risk assessment. The US and Canadian FIPS 140 standard, now in its 140-3 version, certifies modules at four levels, and level 3, which adds physical tamper resistance and erases keys when intrusion is detected, is the level that financial regulators, payment card rules and defense procurement commonly ask for. Audit evidence is a certificate for the specific module and version in use. Requirements around data sovereignty are a second driver, since keys held in hardware the organization controls cannot be released by a provider on its own.

Outside those requirements, many organizations protect keys in software within a dedicated key manager. An HSM adds cost, a limited number of operations per second, and another component to back up and keep available. In both cases the weak arrangement is keeping keys on the same system as the data they protect, because whoever takes one takes both.

HSMs in encrypted backup and storage

A storage platform that supports an external key manager keeps keys outside itself. The key manager may sit on an HSM, so the master key never exists in readable form outside the device. For backups, the HSM becomes part of backup encryption recovery: if it is destroyed with the site and no wrapped key backup or second HSM exists, every encrypted backup becomes unreadable. Replication of the HSM itself therefore belongs in the disaster recovery plan.

Frequently asked questions

Is an HSM the same as a TPM?

No. A trusted platform module is a small chip on a single machine, used for that machine's boot integrity and disk keys. An HSM is a shared, higher-capacity device built to serve many applications and meet formal certification levels.

Can keys be taken out of an HSM?

Only in wrapped form and only if the key was created as exportable. Keys marked non-exportable cannot leave at all, which is why backing up an HSM means cloning to a second compatible device or restoring from a wrapped backup.

Does an encrypted backup need an HSM?

No. Many backup products use software keys. An HSM becomes relevant when a regulation or audit asks for hardware protection of the master key.