What a card number carries
A credit card number is the public face of a payment card: the primary account number (PAN) printed on the front. Under ISO/IEC 7812 it runs to 19 digits at most. The opening digits identify the card network and the institution that issued the card, a block called the issuer identification number and once known as the BIN, while the final digit is a check digit computed with the Luhn algorithm.
The number is sensitive on its own, with no card present. Whoever holds a valid PAN can attempt charges at merchants that ask for nothing more, which is why payment fraud so often starts with a number rather than with the plastic. That is also why a PAN counts as sensitive data wherever it appears, from a checkout form to an old spreadsheet.
How the Luhn algorithm works
The Luhn algorithm, named after Hans Peter Luhn, who developed it at IBM, is a checksum: a quick arithmetic test on the digits themselves. Every major payment network uses it, and any string that claims to be a card number can be tested in a few passes.
The test was designed against human error, not against attackers: it catches single-digit typos and most swaps of adjacent digits, the mistakes a clerk or a customer actually makes. A number that passes is self-consistent, not necessarily issued, and about one random string in ten passes by chance, which is why the check is only the first filter.
- 1
Start from the right
Number the digits from right to left, with the check digit in position one.
- 2
Double every second digit
Take the digits in the even positions, the second, fourth and so on counting from the right, and double each.
- 3
Fold the products
If a doubling produced a two-digit result, subtract 9, which amounts to adding its two digits together.
- 4
Add everything up
Sum the doubled digits and the digits left untouched into one total.
- 5
Check the remainder
If the total divides by 10 with no remainder, the number passes the check.
Masking, truncation, tokenization
Protection starts with keeping as little of the number as the task allows. PCI DSS expects the PAN to be masked whenever it is displayed to a person, and the same idea extends into storage in several forms that look similar and do different things.
Masking protects the glance, not the record: a field shown as dots can still hold the full number underneath, so masked display never replaces care about where the value itself is kept. That distinction is the core of data masking as a practice.
| Method | What it does |
|---|---|
| Masking | Hides part of the number on screen, for example showing only the last digits |
| Truncation | Removes a segment of the number from the stored value itself |
| Tokenization | Replaces the number with a surrogate that is useless outside the token system |
| Encryption | Transforms the stored value, readable again only with the key |
What it looks like in Anexet
In Anexet DLP, a card number is a dedicated condition, not a pattern to guess. The Text condition in a blocking rule offers Bank card number alongside words, email and regular expressions, and the same condition exists in search and investigation of captured data for retrospective hunts across intercepted traffic. In both places a candidate number is additionally validated with the Luhn algorithm and checked against payment system databases, so order numbers and phone numbers do not masquerade as cards.
1 / 2
Where the check runs
Detection matters only when something happens next, and Anexet attaches the card condition to three different moments: the search that looks back, the policy that raises an incident, and the rule that stops a transfer outright. Data transfer blocking covers eleven channel types, from web forms and mail to messengers, clipboard, printing and removable drives.
| Layer | What it does | What happens on a match |
|---|---|---|
| Complex Search | Runs the Bank card number condition over intercepted data | Returns the documents and messages where a valid number appears |
| Security policies | Check traffic automatically against the assigned rules | Raise an incident and notify the responsible officer |
| Blocking rules | Inspect each transfer as it happens | Stop the transmission and record the event |
Why card data still leaks
Card numbers rarely leave through a hacker's front door. They travel through routines nobody marks as risky, and each routine becomes a data leak in miniature:
A rule that only matches sixteen digits drowns the review in order numbers; without the Luhn check and payment system verification, real hits hide in the noise.
- A full number pasted into a chat with a support agent who asked for a screenshot
- A refund spreadsheet sent to a contractor with the PAN column still in place
- An old export from a payment tool left on a shared drive
- A receipt printed and left in the tray of a shared printer
Where to start
PCI DSS, the payment card industry standard, applies to any organization that stores, processes or transmits cardholder data. Among its expectations are masked display and protected storage of account data, and keeping numbers out of channels where they have no business is the job of data loss prevention. A tool such as Anexet helps meet these requirements; the obligation itself stays with the organization.
A practical start is to find out where numbers already live. Run the Bank card number condition over stored traffic, decide which hits were legitimate, then turn on monitoring and, for payment data in retail and elsewhere, blocking where a number should not travel.
Most card numbers leak through ordinary work, one paste and one attachment at a time; the check that catches them belongs in the channel, not in an audit a month later.
How Anexet handles this
Anexet treats the card number as a first-class condition rather than a text pattern to guess. The same Bank card number check, validated with the Luhn algorithm and verified against payment system databases, runs in Complex Search, in security policies and in blocking rules across eleven channel types.
Deployment is on-premise, so intercepted traffic and the card numbers inside it stay in the organization's own infrastructure.
Detection
Bank card number as a dedicated condition in Complex Search and in the Text condition of blocking rules.
Predefined rules
Security Policies ship with predefined rules for card data, and any of them can be duplicated into an editable custom rule.
Blocking
Transfers that contain a card number can be blocked on web forms, mail, messengers, clipboard, printing and removable drives.
Notifications
Incidents reach the responsible officer by email, Telegram or Syslog, with the risk level set per rule.
Anexet DLP
Learn more