Tokenization vs encryption comes down to one question: what can an attacker do with the stolen value? An encrypted card number is the real number locked with a key, so anyone who gets the key gets the number. A vault token is a random stand-in with no math connecting it to the number, so the only way back is a lookup in the vault. A third kind, the format-preserving token, sits in between and is encryption in disguise. Checked November 25, 2026 against the PCI Security Standards Council and NIST.
Three things people call a token
The PCI Security Standards Council (PCI SSC) describes tokenization as replacing the primary account number (PAN) with a surrogate value, with de-tokenization as the reverse step. Its 2011 Tokenization Guidelines list three ways to generate a token:
- a reversible cryptographic function with a strong algorithm and key;
- a one-way function, such as a hash with a strong secret salt;
- assignment through an index, a sequence number or a random number that is not derived from the PAN.
The council’s 2015 Tokenization Product Security Guidelines group these differently, and the grouping is the useful one. Irreversible tokens can never be turned back into the PAN. Reversible tokens can, and they split into non-cryptographic ones (a lookup in a card data vault) and cryptographic ones (the PAN is never stored, only the key). The same document adds a rule that catches many designs: if a token can technically be de-tokenized, the product counts as reversible even when its maker never intends to allow it.
| Vault token | Cryptographic token (encryption) | Irreversible token (one-way) | |
|---|---|---|---|
| How the PAN comes back | Lookup in the vault | Decrypt with the key | It does not |
| What must stay secret | The vault table | The key | The salt or key, if the input space is small |
| Math link to the PAN | None | Yes | Yes, one way |
| If the token store leaks alone | Tokens are worthless | Ciphertext is useless without the key | Depends on the input space (see below) |
| If the secret leaks too | Every mapping is exposed | Every PAN is exposed | Small input spaces can be replayed |
| PCI scope of systems that hold only the token | Can be out of scope if the conditions below hold | The PCI SSC says a token derived by reversible encryption is an encrypted PAN | Same test: the PAN must not be recoverable from the token |
When a token takes a system out of PCI scope
The 2011 guidelines say a system holding only tokens can be considered out of PCI DSS scope only if every one of these holds, among others:
- recovering the PAN from the token, several tokens or token-to-PAN pairs is not computationally feasible;
- the PAN cannot be retrieved even if the token and the systems it sits on are compromised;
- those systems are segmented from anything that can submit a de-tokenization request or reach the vault or the keys;
- they are not connected to the card data environment and do not handle card data through any other channel;
- any earlier copies of card data on them have been securely deleted.
The same document states that where a token is generated by reversible encryption, the token “is an encrypted PAN” and may carry PCI DSS considerations of its own. It also says that sensitive authentication data, such as the card verification code and PIN blocks, cannot be tokenized. Both statements come from a 2011 supplement written for PCI DSS version 2.0, so ask your assessor how a current version of the standard treats your design. The supplement itself says it does not replace the standard.
A worked example: the six hidden digits
Take a 16-digit test card number, 4111 1111 1111 1111, and the common display rule of showing the first six and last four digits. Six digits remain hidden. Two different designs protect them.
Encryption as a stored value. Encrypt the whole PAN with AES-GCM and store a 12-byte nonce, the 16 digits as 16 bytes and a 16-byte tag. That is 44 bytes, or 60 characters once base64-encoded. It no longer looks like a card number, so old fields and validation rules break, which is the reason people reach for format-preserving encryption.
A hash of the visible parts. This is the trap. The PCI SSC warns that hashed and truncated versions of the same PAN make it relatively trivial to rebuild the number. I checked how trivial on November 25, 2026 with a short Python script and no special hardware:
| Step | Result |
|---|---|
| Hidden digits | 6, so 1,000,000 possibilities |
| Candidates that pass the Luhn check digit with the first six and last four fixed | 100,000 (counted by running all 1,000,000) |
| Time to hash all 100,000 candidates with SHA-256 and compare, single thread | about 2.2 seconds, including the Luhn tests |
| Time to find this test number | about 0.2 seconds, after 11,112 candidates |
A salt does not change this arithmetic. If the salt is known to the system that stores the hash, the attacker runs the same loop. Only a secret key held away from the data store changes it, and at that point the hash is an HMAC under key management, which is the problem described in encryption key management.
Format-preserving encryption is still encryption
Format-preserving encryption (FPE) turns a 16-digit PAN into another 16-digit string under a key, so databases and forms keep working. NIST’s SP 800-38G (March 2016) specified two methods, FF1 and FF3. NIST’s second public draft of Revision 1, released February 3, 2025, drops FF3 after researchers found weaknesses in its tweak schedule, and it raises the minimum domain size for FF1. The draft’s text requires the radix raised to the minimum length to be at least 1,000,000. NIST’s summary also says several research groups found vulnerabilities “when the number of possible inputs is sufficiently small”.
Six hidden digits sit exactly on that line: 10^6 is 1,000,000. A design that must also keep the Luhn check digit valid leaves only 100,000 possible outputs, which by my reading is below the draft’s floor. NIST’s FF1 page and draft do not discuss card numbers, so this is my application of the rule, not NIST’s statement. I did not find a final Revision 1: the final-publication page on NIST’s site returned “Page Not Found” on November 25, 2026. Treat the draft as direction rather than a requirement.
A format-preserving token has a second problem. The 2015 PCI guidance says a token should be distinguishable from a valid PAN. A token that keeps the length and passes Luhn can be mistaken for a real card number by scanners, logs and people, which pulls the system holding it back into scope discussions.
Which one to use
- You only need to charge a saved card later: a vault token, ideally held by your payment provider so your systems never hold the PAN.
- You must display or match on the card: keep the first six and last four as separate display fields and use a vault token for matching, not a hash of the pieces.
- You must run a legacy system that only accepts 16 digits: FPE with FF1 over the full PAN, not a fragment, with the key held apart from the data.
- You never need the number back: an irreversible token, and make sure the input space is large or keyed.
Reporting & Sources
Checked November 25, 2026. Token generation methods, scope conditions, the encrypted-PAN statement and the hash and truncation warning come from the PCI SSC Tokenization Guidelines information supplement (August 2011, PCI DSS 2.0). The irreversible and reversible grouping and the distinguishability rule come from the PCI SSC Tokenization Product Security Guidelines (April 2015). FF1, FF3 and the domain-size changes come from NIST’s SP 800-38G Rev. 1 second public draft page and the draft text; a draft can change before final publication. The Luhn count and timing are my own script run, single-threaded in Python on a cloud container, so absolute times will differ on other hardware. The card number is a test number and the byte sizes assume the AES-GCM layout stated above. This article is not PCI assessment advice.





