Typical USB tokens (Nitrokey, YubiKey...) allow an everyday user to store PGP keys and use them to encrypt email, harddrives and so on.

The same vendors also offer distinct products called HSMs (Nitrokey HSM, YubiHSM). The suggested use case is protecting CA certificates. They also have a USB token form factor.

Why is a different hardware product required for this use case?

  • 1
    In YubiSecure? R Künnemann gives the following description: In the second part of the paper, we analyze the security of the protocol with respect to an adversary that has temporary access to the authentication server. To address this scenario, Yubico offers a small Hardware Security Module (HSM) called the YubiHSM, intended to protect keys even in the event of server compromise.
    – J.A.K.
    Commented Jul 11, 2018 at 12:34

3 Answers 3


Hardware Security Modules's (HSM's) are used in systems where a company has determined that the risk involved requires a higher level of control that a personal key.

The Use of HSM's for Certificate Authorities

HSM's are common for CA applications, typically when a company is running there own internal CA and they need to protect the root CA Private Key, and when RAs need to generate, store, and handle asymmetric key pairs.

Uses outside of a CA

HSM's are suggested for a companies Privileged Access Security System. These system's use the concept of a "vault" which is unlocked via a key or multiple keys. These keys are usually only required on startup of the vault.

With vaulting systems, typically options for storage are:

  • Store them on the server. This is not very secure even when you limit access to the server.
  • Store them on Disk/USB. This requires that disk be mounted every time the system is restarted (trouble if you do regular restarts).
  • Store them on a HSM.

In secure systems, this allows key to be generated without a human needing access to it, stored in a system that is FIPS Level 2+ compliant, and only accessed when a system starts.

Using an USB Key vs a HSM

Primarily, end user USB's are designed for the end-users access. They are storing keys which might authenticate them, have encryption keys for data they are responsible for, or are part of a process that identifies the user is who they say they are.

Examples of this are the use of a YubiKey to hold the private encryption key for sensitive company data. You might have access to a trade secret, or are allowed to perform analysis on compliance critical data such as PII and Healthcare or Credit Card Data.

HSM's are not designed to be a personal authentication unit. They are installed on servers to provide a secure generation, storage, auditing, and distribution of keys for high risk applications and systems.

Examples include the storage of server certificates for authentication between systems, encryption keys which are used by processes but don't need to be seen by humans, and shared keys between servers used to access encrypted data or establish encrypted connections.


You could think of the use cases in terms of people verses systems.

If a company has a need to provide increased security of systems which a person uses require access to as part of there job, something like a YubiKey makes sense.

If a company has a need to provide increased security to systems where processes and the systems themselves need access but a user wouldn't normally be required to know, then a HSM is the better option.


Imagine walking around with they key to your companies entire certificate authority in your pocket that provides the authenticity for 1200 servers and that Key slipped out a hole in your pants. Now imagine the nightmare of having to re-issue a new CA certificate, all the new signing certificates, and all the server certificates.


At the suggestion of @MikeOunsworth, I updated and expanded this answer.

  • YubiKey does offer FIPS Level 2+ versions of their end-user devices (yubico.com/products/yubikey-fips), so there must be other differentiators between their end-user and HSM products? Commented Jul 11, 2018 at 16:24
  • 1
    The YubiKey end-user product is meant to protect a small number of keys, with a limited set of algorithms. If you look at the specs for the HSM, it's meant to handle keys in larger quantities, with a wide set of algorithms. It's also performance tuned for handling cryptographic functions inside a workflow (like verifying certificates for access-control, on ie. a VPN gateway or directory server), not just for a single user's login every once-in-a-while.
    – nbering
    Commented Jul 11, 2018 at 17:09
  • 1
    @ShaneAndrie You should include those in your answer (then I'd upvote). As it reads now, the only difference is FIPS, which is .. wrong. Commented Jul 11, 2018 at 17:54
  • 1
    @d3vid Yes, an attacker with root access to the server can utilize the HSM for as long as they maintain control of the server (ie removal of malware or disconnection of the USB stick will end it). Compared to crypto keys stored in software where they can make a copy of the private key and send it back to the attacker. (Like forcing someone to open a door at gunpoint vs secretly making yourself a copy of the key to come and go as you please). Commented Jul 12, 2018 at 16:36
  • 1
    @d3vid Also of note is that HSM typically have a strict interface for use and applications are designed to interface with them, not necessarily people. This can limit an attackers progress, even with root permissions. Commented Jul 16, 2018 at 14:37

[This is speculation based on vendor website -- I have no direct experience with these devices]

My speculation is that a specialized HSM version of the device is not required, but since it is designed for this specific use-case, it will have more features tailored to this use-case. Much like how you don't need a hammer to drive in nails; you can use the handle of a screw driver.

Taking the Nitrokey product comparison sheet as an example, we can see that the end-user devices support a wide range of end-user applications like PGP and 2FA / OTP, a built-in password manager, encrypted USB storage on the device, etc. Meanwhile, the HSM only supports cryptographic keypairs, can hold many more keypairs, and has specific features for managing PKI/CA keys.

Nitrokey product comparison table


In a nutshell, HSMs provide features over personal USB token such as:

  • Encrypted backup
  • m-of-n authentication
  • Larger key storage
  • Interface and general design tailored towards CA usage

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .