Keyed Cryptographic Hash
PCIComplianceHubLast updated
A hash computed with a secret key as well as the input, so that the output cannot be recomputed by anyone without the key. HMAC, CMAC and GMAC are the accepted constructions. Without the key, a hash of a 16-digit PAN can be reversed by hashing every possible PAN; with it, it cannot.
Applies to. Any entity that renders stored PAN unreadable by hashing. 3.5.1.1 requires the hash to be a keyed cryptographic hash of the entire PAN, with the key managed under 3.6 and 3.7.
Example. A loyalty system stores HMAC-SHA-256 of each PAN under a key held in an HSM, so it can match a card presented again without holding the number. The same system under plain SHA-256 could be reversed with a laptop in an afternoon.
Limits. The Council's definition sets an effective strength of at least 128 bits and points to NIST SP 800-107, 800-38B and 800-38D for the constructions. 3.5.1.1 became mandatory on 31 March 2025; unkeyed hashes that met v3.2.1 do not meet v4.0.1. The key is now the secret, so it needs the same protection as an encryption key: stored encrypted or in a secure device (3.6.1.2) and managed by documented procedures (3.7). Hashing the truncated PAN beside a truncated PAN of the same card reconstructs the card, which is the correlation 3.5.1 warns against.