✳ The reference desk / In practice

HSM

A dedicated hardware module that generates and stores cryptographic keys and performs operations with them inside itself. Applications send it data to sign or decrypt and do not receive the key.

Hardware security module

What it means

A hardware security module, or HSM, is a device built to hold keys and use them on request. A key can be generated inside it and marked so that it can never be exported. An application then asks the HSM to sign or decrypt, and receives only the result. Someone who takes over the application server can ask for operations while they have access. They cannot copy the key and keep using it later. Many HSMs are validated against FIPS 140-3, which has four security levels. Check the product's certificate and level in the CMVP list. An HSM does not judge requests. It signs whatever an authorized caller sends.

See the idea / Data

An HSM uses the key for you. It never hands it over.

Follow one command signature. The key is used inside the module, and a request to export it is refused. Then see what a stolen console login can and cannot do.

Meridian keeps Halcyon’s command-signing key, K-CMD, in a hardware security module, or HSM. The flight console has a login that may ask for signatures. The relay station holds the matching public key. Compare an export request from the console with a signing request made with a stolen console login.

HSM: Follow one command signature. The key is used inside the module, and a request to export it is refused. Then see what a stolen console login can and cannot do. The chapter text below describes every state.Meridian HSM · signing key K-CMDConsole may sign · none may exportKey K-CMD inside the HSMPrivate key inside the HSMMade inside · non-exportableRequest to the HSMNo request yetSent with the console’s loginWhat leaves the HSMNothingEvery request is loggedRelay station checkNo command receivedUses the public key onlyKEY STAYS IN THE MODULE

01 / 04

Hold

K-CMD was generated inside the HSM and marked non-exportable. No usable copy exists outside the module.

More about this step

The key was created by the module’s own random number generator and has never been outside it. The console holds a login to the HSM, not the key. The relay station was given the matching public key.

Keep in mindOne key, one caller and one relay. An HSM stops a key from being copied. It does not decide whether a signing request should be made, so the logins and logging around it still matter. Tamper response, protected copies of keys between modules, and speed depend on the product and on its FIPS 140-3 validation level. The relay’s permission and replay checks are separate and are not shown.

Read the visual, step by step

Export attempt

  1. Hold. K-CMD was generated inside the HSM and marked non-exportable. No usable copy exists outside the module. The key was created by the module’s own random number generator and has never been outside it. The console holds a login to the HSM, not the key. The relay station was given the matching public key.
  2. Sign. The console sends command M-204 to the HSM. The HSM signs it inside and returns signature S-204. The key does not leave. The HSM first checks that the console’s login may use K-CMD for signing. It then computes the signature inside the module and returns only that result. It logs the caller, the key and the time.
  3. Verify. The console sends M-204 and S-204 to the relay. The relay verifies S-204 with the public key and accepts the command. Verification needs only the public key, which is not secret. The relay learns that the bytes of M-204 were signed by K-CMD. It learns nothing that would let it sign.
  4. Export. The console asks the HSM to export K-CMD. The HSM refuses, because the key was marked non-exportable when it was made. The refusal does not depend on who is asking. An administrator of the console, or malware running on it, gets the same answer. The attempt is logged.

Stolen login

  1. Hold. K-CMD was generated inside the HSM and marked non-exportable. No usable copy exists outside the module. The key was created by the module’s own random number generator and has never been outside it. The console holds a login to the HSM, not the key. The relay station was given the matching public key.
  2. Sign. An attacker with the console’s stolen login sends command X-9. The HSM cannot tell the caller apart from the console, so it signs X-9. The HSM checks the login, and the login is valid. It has no way to judge whether X-9 is a command Meridian wants. It returns signature S-X9 and logs the request like any other.
  3. Verify. The attacker sends X-9 and S-X9 to the relay. The signature is valid, so the signature check passes for a command Meridian never approved. A valid signature shows that K-CMD signed these bytes. It does not show that the request was authorized. Whether the relay acts on X-9 depends on its separate permission and replay checks, which are not shown here.
  4. Revoke. Kael revokes the stolen login at the HSM. The attacker gets no more signatures and never held K-CMD. The signature on X-9 stays valid. Because the key never left the module, the attacker’s access ends when the login does. Without an HSM, a copied key would keep working until every verifier stopped trusting it. Kael still has to find every command signed during the theft, using the HSM’s log.

One key, one caller and one relay. An HSM stops a key from being copied. It does not decide whether a signing request should be made, so the logins and logging around it still matter. Tamper response, protected copies of keys between modules, and speed depend on the product and on its FIPS 140-3 validation level. The relay’s permission and replay checks are separate and are not shown.

Flow references: NIST CMVP: FIPS 140-3 standards for cryptographic modules

AN ILLUSTRATIVE SCENARIO

A signature leaves, the key does not

Meridian keeps the key that signs Halcyon's commands in an HSM. The flight console sends command M-204 and receives signature S-204. The relay station verifies it with the public key. When the console asks to export the key, the HSM refuses. When an attacker uses a stolen console login, the HSM signs what it is sent until Kael revokes that login.

Put it to work

  1. Pick the few keys whose theft would be hardest to recover from, such as certificate authority keys and signing keys. Plan to hold those in an HSM.
  2. Generate each key inside the module, mark it non-exportable, and give each calling system its own login limited to the operations it needs.
  3. Send the HSM's request log to your central logging, and alert on export attempts, new logins and unusual signing volume.

How to check your work

Using a test key, request an export and confirm it is refused and logged. Then revoke a test caller's login and confirm its next signing request fails. Check that both events reached your central log.

Connect the ideas

  • Key management

    The work of creating, storing, distributing, rotating, revoking, and destroying cryptographic keys, with a record of who may use each one. Encryption protects data only while its keys are controlled.

  • Encryption

    Transforming data so only holders of the appropriate key can read it, protecting confidentiality in transit or at rest.

  • Secrets management

    Storing, rotating, and auditing passwords, keys, and tokens so they are not copied into chat or source.

  • Non-repudiation

    Evidence supporting a claim that a particular party originated or approved something, so a later denial can be evaluated. Reliable identity binding and record integrity matter.

Explore a field lesson

Find your next idea.

Tip: press / to open search. Escape closes this window.