A hardware security module (HSM, in Polish sprzętowy moduł bezpieczeństwa) is a device in which cryptographic keys are created, stored and used without ever leaving the hardware in plaintext. The requirements for such modules are set out in the US FIPS 140-3 standard, which provides four increasing levels of security.
The HSM question usually comes up when a customer, an auditor or the board asks where the key that encrypts everything else is kept. If the answer is “in a configuration file on the server”, anyone who takes over that server or its backup takes over the data as well. Database encryption then protects nothing, and the rest of your cybersecurity controls lose their point, because the key sits right next to the data.
What is an HSM and how does it differ from an ordinary server?
An HSM is a specialised device or card that generates keys, stores them and performs cryptographic operations with them. A system that needs encryption or a signature does not receive the key into memory; it asks the module to perform the operation and gets the result back.
On an ordinary server, a key is a file or a piece of memory. An administrator with full rights, malware with the same rights, or anyone with access to a backup can copy it, and a copy of a key works exactly like the original. Nobody notices that the key has “left”, because nothing has disappeared.
A cryptographic module built to FIPS 140-3 has to cover far more than storage. The standard lists, among other things, roles, services and authentication, software and firmware security, physical security, protection against non-invasive attacks, management of sensitive security parameters and self-tests. The validation level determines how strongly the device resists physical tampering.
So the difference comes down to one question: does stealing the server, its disk or a backup give the attacker the key? With an HSM the answer should be “no”, because the key never leaves the module in plaintext.
Which of your keys are worth keeping in an HSM?
It is worth moving into hardware the keys that protect other keys or all your data at once. Typically there are four groups.
The first is the root key of a secrets management system such as HashiCorp Vault. Whoever holds it can decrypt every password, API key and certificate stored in the system. The second is the keys that encrypt data keys in databases and applications: one such key protects hundreds of lower-level keys.
The third group is the private key of an internal certificate authority. Stealing it lets an attacker issue a certificate for any server or user in the organisation, so the whole public key infrastructure (PKI) loses its credibility. The fourth is signing keys: for code, updates and documents; once they are stolen, an attacker can sign their own software in the company’s name.
Not every secret needs hardware. A password to a test database or an API key for a weather service is better kept in a secrets management system with rotation, and that system in turn protected by a key in an HSM. We describe this split in more detail in the article on secrets management outside code and repositories.
What do FIPS 140-3 validation and the CMVP mean for you?
FIPS 140-3 validation means that an independent laboratory has tested the module against the standard’s testable requirements and the CMVP has confirmed it. The US Secretary of Commerce approved FIPS 140-3 on 22 March 2019 as the successor to FIPS 140-2 of 2002.
According to the FIPS 140-3 transition page, the standard became effective on 22 September 2019 and does not set out the requirements directly; it references ISO/IEC 19790:2012, and testing follows ISO/IEC 24759:2017. There were few technical changes and more procedural ones.
The CMVP is run jointly by the US NIST and the Canadian Centre for Cyber Security. Modules are tested by accredited laboratories (CSTLs), and after validation a module is placed on the active list for 5 years, or 2 years for an interim validation.
Key points:
- An HSM protects a key from being copied: the system gets the result of an operation, not the key itself.
- FIPS 140-3 has four security levels; what counts is the certificate number in the CMVP, not a “FIPS compliant” label.
- The HSM becomes part of recovery: losing the module can mean losing the data encrypted with its keys.
For a buyer this leads to a simple rule: ask for the certificate number, level and standard, then check them in the validated modules search. The level matters, because it drives the requirements for physical protection and operator authentication.
What changed for FIPS 140-2 validations?
FIPS 140-2 validations stopped being sufficient for new systems at US and Canadian federal agencies. According to the CMVP, agencies could accept modules validated to FIPS 140-2 through 21 September 2026; after that date the certificates are moved to the historical list, and the modules remain only in existing systems.
The programme accepted new FIPS 140-2 submissions until 31 March 2022, and since 22 September 2020 it has been validating modules to FIPS 140-3. NIST also notes that even from the historical list, modules may be purchased and used in existing systems.
The CMVP schedule governs purchases by federal agencies, not by Polish companies, and the CMVP itself recommends considering all modules in the search, FIPS 140-2 included, because the choice of FIPS 140-3 modules may be limited for several years. Our advice for an HSM bought in December 2026 differs: ask for a FIPS 140-3 certificate, because a device is bought for years, and under the CMVP schedule FIPS 140-2 certificates move to the historical list after 21 September 2026.
The same principle applies to cloud services. A provider that describes its modules as validated to FIPS 140-2 or FIPS 140-3 depending on the cluster is giving you information you need to check for your specific configuration.
How does an HSM work with a secrets management system such as Vault?
In Vault, an HSM protects the key on which access to all other data depends. According to HashiCorp’s documentation on sealing, Vault encrypts data with a key from its keyring, the keyring with the root key, and the root key with the unseal key.
In the default configuration, Vault splits the unseal key into shares using Shamir’s algorithm and needs a threshold of shares from operators to start. It is a manual process: every node restart requires the people holding shares. Auto unseal hands the protection of that key to a trusted device or service, such as an HSM, which decrypts the root key at startup.
HSM support in Vault requires a Vault Enterprise licence and a device with a PKCS#11 interface version 2.20 or later, and according to the documentation as of April 2026 it works only on the linux/amd64 platform. It provides four functions: encrypting the root key through the HSM instead of splitting it into shares, automatic unsealing, an additional “wrap” for selected values (seal wrap), and sampling entropy from an external module.
This convenience comes at a price. HashiCorp warns that recovery keys cannot decrypt the root key, and that if the seal mechanism or its keys are permanently deleted, the cluster cannot be recovered even from backups. The HSM therefore stops being an add-on and becomes part of the business continuity plan: you need a backup of it, a second module or a second mechanism.
Deploying IBM HashiCorp Vault with an HSM therefore starts with the question of who will restore the module after a failure, and only then with configuration.
Where does an HSM come in when you encrypt data in databases and applications?
In data encryption, an HSM usually holds the top-level keys, not every data key. A typical design has two levels: data keys encrypt records or files and work close to the data, while a top-level key in the HSM encrypts the data keys.
This split limits the number of operations on the HSM and at the same time means that stealing a database together with its encrypted data keys achieves nothing without access to the module. Rotating the top-level key then means re-encrypting the data keys rather than the whole database, which shortens the maintenance window.
This is the level at which data protection platforms such as OpenText Voltage operate. The product page describes key management as built-in, with HSM integration, alongside AES-256 encryption and format-preserving encryption (FPE) for Oracle, SQL Server, DB2, PostgreSQL and MySQL databases.
The basics of encryption and the differences between symmetric and asymmetric encryption are covered in our glossary. Here it is enough to remember that an HSM determines where the key is kept, not which algorithm encrypted the data.
How does an HSM in your own server room differ from a cloud HSM service?
The difference concerns who is responsible for the device, not whether the key is in hardware. An HSM in your own server room means buying it, installing it, backing up the module, a second unit for high availability and your own servicing procedure.
Cloud providers offer HSMs as a service dedicated to a single customer. Microsoft describes Azure Key Vault Managed HSM as a single-tenant service using HSMs validated to FIPS 140-3 Level 3, with a separate security domain for each customer. AWS CloudHSM offers clusters in FIPS and non-FIPS mode, and the modules in FIPS mode are validated to FIPS 140-2 or FIPS 140-3 at level 3.
A service takes hardware and availability off your hands, but not the decisions about keys: who creates them, who may use them, what the backup looks like and what happens when you change provider. Your own device gives you full physical control, but needs people who can look after it at three in the morning too.
The choice depends on where the systems that use the keys run. A key in the cloud for an application in your server room means a dependency on the network link at every startup; a key in the server room for an application in the cloud means the reverse.
What will an HSM not do for you?
An HSM does not protect against misuse of a key by someone who is allowed to use it. If an application or an administrator with the rights asks the module to decrypt data, the module will do it, because that is exactly what it is for.
Hardware will not replace key management either. NIST SP 800-57 Part 1 (Revision 5) treats the management of cryptographic keying material more broadly than storage; its keywords include backup, archive, compromise and key-inventory management. Without an inventory of keys, an organisation does not know what to move into an HSM, and without a compromise procedure it does not know what to do if a key leaks before it is moved.
The third limitation is availability. A module on which unsealing the secrets management system or decrypting the database depends becomes a single point of failure. In practice this means a second module, a regular restore test and a written answer to the question of how long your systems can survive without access to their keys.
Finally, an HSM will not fix weak authentication. A module console protected by a single password known to three people defeats the purpose of the purchase, which is why operator roles and operation logs have to be planned together with the device.
How do you decide which keys to move into hardware?
The criterion is the blast radius of a copied key: the more data or trust one key unlocks, the stronger the case for an HSM.
| Key | Impact of theft | Where to keep it | What to watch |
|---|---|---|---|
| Root key of a secrets management system (e.g. Vault) | Access to all stored secrets | HSM or a cloud HSM service | Backup and a second unseal mechanism |
| Private key of an internal certificate authority | Forged certificates for any system | HSM, offline root CA | Key generation ceremony, witnesses, record |
| Key that encrypts data keys | Decryption of many databases and files | HSM | Performance and availability at application startup |
| Code and update signing key | Malware signed in the company’s name | HSM | Approval of every signature |
| Data keys in an application | Decryption of one data set | Next to the data, encrypted with a key from the HSM | Rotation and usage log |
| Service passwords and API keys | Access to one service | Secrets management system with rotation | Short validity period |
The bottom rows of the table also need protection, but replacing such a key is quick and cheap, so a secrets management system protected by a key from the top rows is enough for them. The order of the project follows from the table: first the root key and the certificate authority, then the top-level data keys.
For TLS server keys, bear in mind the shortening validity of public TLS certificates. More frequent renewals mean more frequent operations on server keys, so if those keys live in an HSM, renewal has to run automatically.
How can nFlo help you protect keys and secrets?
nFlo does not sell or deploy HSM modules themselves and does not run PKI. We help on the side of the systems that use the keys.
For IBM HashiCorp Vault, the scope covers deployment, migration and integration of the secrets management system, including the unseal configuration, which has to be designed together with the recovery plan. For OpenText Voltage, we carry out SecureData and Data Discovery deployments and database integrations, which is the layer where top-level keys from the HSM meet the data.
If you are wondering which keys in your organisation should move into hardware and how to tie that to your secrets management system, get in touch.
What else is worth knowing about HSMs?
Does HashiCorp Vault support an HSM without an Enterprise licence?
No. According to HashiCorp’s documentation, HSM support requires an appropriate Vault Enterprise licence. Vault’s default configuration splits the unseal key into shares using Shamir’s algorithm, and operators enter them by hand every time a node starts.
What happens to Vault if the unseal module becomes unavailable?
Vault will not unseal until the mechanism is back. Recovery keys do not decrypt the root key, and HashiCorp warns that permanently deleting the mechanism or its keys means losing the cluster, even if you have backups. That is why backing up and restoring the HSM itself must be part of the continuity plan.
Does database encryption always require an HSM?
No. Encryption also works with a key held in software. An HSM raises the protection of the key itself: it makes it harder to copy together with the server or a backup. It is worth using where one key protects data in many systems, or where a customer or regulator requires it.
Who in the organisation should have access to the HSM console?
As few people as possible, and never one person with full rights. It is worth separating roles: device administrator, key administrator and the person who approves sensitive operations, and every login and key operation should leave a trace in a log that someone reviews regularly.
How do you check whether a specific HSM model has a valid validation?
Ask the vendor for the certificate number and check it in the CMVP validated modules search. The result shows the standard (FIPS 140-2 or FIPS 140-3), the security level and the certificate status. A “FIPS compliant” claim in marketing material is not a validation.
