Tokenization

HSM in Payments: What It Is and How It Protects Card Data

March 10, 2025 6 min read PCI Proxy EU

An HSM (Hardware Security Module) is a dedicated physical device for the generation, storage and management of cryptographic keys. In the payments context, HSM payment security represents the highest level of protection available: keys never leave the physical perimeter of the device, and any tampering attempt activates self-destruction mechanisms for sensitive data. For PCI DSS tokenization, the HSM is the component that ensures no software can access the vault's encryption keys in plain text.

HSM in Payments: What Is a Hardware Security Module and How It Protects Card Data

What an HSM is and why it is the heart of secure tokenization

The HSM is designed to be physically tamper-resistant: its architecture includes temperature, voltage and light sensors that detect opening or probing attempts, and automatically erase stored keys at the slightest sign of compromise. Cryptographic operations (encryption, decryption, token generation) occur inside the device: plain-text data enters, is processed, and exits already transformed. Encryption keys never leave the hardware perimeter.

In tokenization systems, the HSM stores the master key that protects the vault's encryption keys. When an authorised system requests the decryption of a PAN, the request is processed internally by the HSM: the result is returned to the caller, but the key remains confined within the hardware. This compartmentalised design eliminates the software attack surface: even compromising the application server, the attacker does not obtain the cryptographic keys.

FIPS 140-2 and hardware certification for payments

FIPS 140-2 (Federal Information Processing Standard) certification is the NIST standard that defines security requirements for cryptographic modules. For payments, the relevant level is FIPS 140-2 Level 3, which requires physical tamper resistance with active response mechanisms (key zeroisation upon opening). Level 4 adds protection against environmental attacks and is used for banking-grade HSMs.

PCI DSS does not explicitly mandate the use of FIPS 140-2 certified HSMs for all merchants, but Requirement 3.7 of the standard requires that cryptographic keys be protected against disclosure and unauthorised use. In practice, any tokenization solution that wants to pass an audit with an experienced QSA must be able to demonstrate that key management occurs in a hardware environment with verifiable physical guarantees, which essentially means a certified HSM.

HSM in the PCI Proxy EU vault: how it protects PANs

PCI Proxy EU uses certified HSMs to manage the cryptographic keys of the token vault. When a merchant submits a PAN for tokenization, the data is encrypted with keys generated and stored in the HSM. The token returned to the merchant is an opaque reference that contains no information derivable from the original PAN. When the merchant needs the PAN for an authorisation, it sends the token and receives the PAN encrypted for transit to the PSP, without the data ever passing in plain text through its own environment.

For the merchant, this means not having to purchase, install and manage an HSM themselves. The hardware is managed by PCI Proxy EU, the PCI DSS Level 1 certification covers the entire stack including the HSM layer. The merchant delegates the most technologically critical and costly part of the tokenization infrastructure, while retaining control over tokens and application flows.

Frequently asked questions

Do I need to buy an HSM to be PCI DSS compliant?

Not necessarily. The PCI DSS obligation is to protect cryptographic keys with adequate controls. If you use a PCI DSS Level 1 certified tokenization provider that manages the HSM for you, you do not need to purchase hardware yourself. The provider's AOC demonstrates to your acquirer that key management meets the requirements. Your own HSM only becomes relevant if you manage the vault internally.

What is the difference between an HSM and software encryption?

Software encryption manages keys in the application server's memory: if the server is compromised, the keys are exposed. The HSM physically isolates keys in a dedicated device with hardware protection against tampering. Even if an attacker gains root access to the server, the keys in the HSM remain inaccessible. The security gap between the two approaches is substantial, not merely formal.

Is a token vault without an HSM PCI compliant?

Technically it can pass an audit with compensating controls, but this is increasingly difficult with recent versions of the standard. An experienced QSA will ask for specific evidence on key management. In practice, all PCI DSS Level 1 certified tokenization solutions use dedicated HSMs: it has become the de facto standard for any production vault handling real PANs.

Certified HSM vault with no infrastructure to manage yourself. Discover PCI Proxy EU.

PCI Proxy EU Team

RoxPay, PCI DSS tokenization in Europe

Content reviewed by payment and PCI DSS compliance experts.

Certified HSM vault with no infrastructure to manage

PCI Proxy EU manages the HSM, certification and vault. You focus on your product and customers.