truncation
Permanently removing part of a value, such as all but the first six and last four digits of a card number, so the full value cannot be recovered from what is kept.
In more detail
Unlike masking, which hides digits only when data is shown, truncation stores the shortened value, so the removed digits are gone for good. PCI DSS accepts it as one way to make a stored card number unreadable. Never store a truncated number next to an unkeyed hash of the full number: together they leave so few possibilities that the full number can be recovered by brute force.
Example
stored_masked = pan[:6] + "******" + pan[-4:]Related terms
- data masking — Hiding real values by replacing parts of them, such as showing only the last four digits of a card number.
- tokenization — Replacing a sensitive value with a meaningless token and keeping the mapping in a separate, protected system.
- PAN — The primary account number: the long number on a payment card that identifies the card account.
- keyed hash — A hash computed with a secret key mixed in, so only someone who holds the key can produce or check the correct value.
Taught in
- Regulatory Compliance: SOC 2, HIPAA, GDPR & PCI-DSS — Cybersecurity Fundamentals, GRC & Cryptography