What is a hardware security module?
A hardware security module is a tamper-resistant device that generates and uses cryptographic keys without ever revealing them. Applications ask it to sign or decrypt; the key itself never leaves the box.
What problem does an HSM solve?
Key theft. A private key stored in a file can be copied by anyone who gains access to the server or its backups, and a copied key looks exactly like the original. An HSM generates keys inside its own hardware, marks them as non-extractable and performs signing or decryption internally. An attacker who takes over the application server can ask the HSM to sign while the compromise lasts, but cannot walk away with the key.
What makes the hardware tamper resistant?
Physical and logical protections. Enclosures detect drilling, probing, temperature extremes or voltage tricks and erase keys when triggered. Firmware is signed and minimal. Administrative actions need several authorised people holding smart cards, so no single insider can export or misuse keys. Many devices are tested against standards such as FIPS 140-3 at defined security levels, which buyers in finance and government often require.
How do applications talk to an HSM?
Through standard interfaces. PKCS#11 is the most common C-level API, used by OpenSSL providers, web servers, Java via its own provider and many signing tools. Network-attached HSMs serve many servers over TLS; PCIe cards sit inside one machine; USB-sized devices serve a single host. Cloud key services expose similar operations through an HTTP API.
pkcs11-tool --module /usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so --login --keypairgen --key-type EC:prime256v1 --label tls-2027 openssl pkeyutl -sign -inkey "pkcs11:token=edge;object=tls-2027" -in digest.bin -out sig.bin
SoftHSM, shown above, implements the same interface in software; it is useful for developing and testing PKCS#11 integrations before real hardware is involved, though it offers none of the physical protection.
What are HSMs used for?
| Use | Key held in the HSM |
|---|---|
| Certificate authorities | Root and issuing CA keys |
| Payments | PIN and card verification keys |
| Code and document signing | Release signing keys |
| Database and disk encryption | Master keys that wrap data keys |
| DNSSEC | Zone signing and key signing keys |
| Digital asset custody | Wallet and validator keys |
What is a key ceremony?
A formal, witnessed procedure for creating or recovering the most important keys. Participants follow a written script, each holding part of the authority, and every step is recorded. A root certificate authority key, for example, may be generated in a ceremony with several custodians and then kept offline for years.
Can I use an HSM with your servers?
Not one we supply: we do not rent HSM devices, cannot install PCIe or USB hardware you send, and do not offer secure enclave features such as SGX or SEV as a product. There are good alternatives. You can run a network-attached HSM or a key service you already use elsewhere and reach it from our machines over TLS or WireGuard, so signing requests travel to the device while the key stays put. For many teams a software key manager is enough: OpenBao or HashiCorp Vault keeps secrets and transit encryption keys encrypted at rest, unsealed by several operators, with every use logged.
bao secrets enable transit bao write -f transit/keys/orders-pii type=aes256-gcm96 bao write transit/encrypt/orders-pii plaintext=$(printf '%s' "$CARD_REF" | base64)
Which certification levels should I look for?
FIPS 140-3 defines four levels. Level 1 covers correct cryptography with no physical protection; level 2 adds tamper evidence and role-based authentication; level 3 adds tamper response that erases keys and stronger identity checks; level 4 protects against environmental attacks as well. Payment and certificate authority rules often require level 3. Common Criteria evaluations offer a parallel international scheme. Check which exact firmware version was certified, since an update can fall outside the evaluated configuration, and keep the certificate with your compliance records.
How do I keep software-held keys safer?
Narrow who and what can reach them. Run the key manager on its own machine, accept connections only from named application hosts over WireGuard, require several operators to unseal after a restart, rotate keys on a schedule and alert on unusual volumes of use. Encrypt the disks with LUKS so retired drives reveal nothing. A small dedicated host such as ESSENTIAL-1 at $38.40 a month suits this role. Related reading: Blockchain security, Data loss prevention and Hardening a new dedicated server.
Related pages
Blockchain security
Security for teams running blockchain infrastructure: protecting keys, hardening nodes and RPC, avoiding slashing, contract risk and operational habits.
Read moreData loss prevention
Data loss prevention for server owners: classify what matters, control where it can travel, watch outbound flows and stop accidental leaks before they happen.
Read moreHardening a new dedicated server
The first hour on a fresh machine: SSH keys, a firewall, automatic updates, brute force blocking and a habit of checking what listens.
Read moreIT security basics
The parts of IT security that matter for a team running servers: identity, patching, network exposure, data protection, logging and a practised response.
Read moreQuestions and answers
What is a hardware security module?
A tamper-resistant device that creates and uses cryptographic keys internally, so the keys can never be copied out.
What is PKCS#11?
A standard programming interface for cryptographic tokens and HSMs, supported by OpenSSL providers, web servers and signing tools.
Do you rent HSMs or install customer hardware?
No. Reach an HSM or key service you run elsewhere over TLS or WireGuard, or use a software key manager such as OpenBao.
Is SoftHSM secure enough for production?
It offers the same interface but no physical protection. It is best for development and testing of PKCS#11 integrations.
What is a key ceremony?
A scripted, witnessed procedure with several custodians for creating or recovering critical keys, such as a root CA key.