Credit Card Security–Why close enough isn’t good enough

By Steve Biddle, in , posted: 4-Jan-2013 18:28

Credit card security isn't a laughing matter these days. It's certainly not difficult to find people who have had their credit cards compromised and fraudulent transactions charged to their account. Typically this has been as a result of physical  card security being compromised by the use of a card skimmer attached to an ATM (numerous instances in Auckland), a compromised EFTPOS terminal recording card details (a major burger retailer in Queen St, Auckland), or by staff who have access to credit card records randomly copying numbers down for use (a foreign call centre for a major telco). Banks have complex systems monitoring transactions in real time and will often detect card fraud and put a hold on your card well before you're even aware there could be an issue. While card fraud normally doesn't leave the card holder out of pocket due the liability limits banks have in their terms and conditions, having to get a new card can often be a real pain if you have automatic payments such as bills set up on it.

Having had my card compromised while in Australia in the middle of 2012 and then spending an entire afternoon dealing with the consequences while trying to enjoy a relaxing long weekend away means I have zero tolerance to anybody in the industry dealing with credit cards who isn't willing to comply with industry guidelines. As far as I'm concerned you deserve to be named and shamed if you're accepting credit cards and failing to comply with industry guidelines.

The Payment Card Industry (PCI) Security Standards Council are responsible for creating data security standards for cardholder data. Known as the PCI Data Security Standard (DSS) this document covers the requirements and security assessment procedures that should be used in the banking and payments industry to ensure that card security remains a top priority. It's common to refer to being "PCI complaint" when your systems are complaint with this standard.

It's therefore surprising so see a large business like Wellington Airport failing to comply with industry PCI standards governing credit card security, and more so the fact this lack of security has now existed for several years in their car park ticketing machines.

Despite what some may think, a credit card number, or Primary Account Number (PAN) as it's technically known as, isn't just sixteen random numbers. Each card issuer has a unique Bank Identification Number (BIN) which comprises the first six digits of the card. The next nine digits are the account number, and the last digit is a check digit calculated using the MOD 10 algorithm, otherwise known as the Luhn Algorithm, calculated off the prior fifteen digits. This algorithm isn't complex, and it's easy to calculate this check digit with a piece of paper and a pen.

PCI DSS requirement 3.3 covers the storage and use of PAN numbers

3.3 Obtain and examine written policies and examine displays of PAN (for example, on screen, on paper receipts) to verify that primary account numbers (PANs) are masked when displaying cardholder data, except for those with a legitimate business need to see full PAN.

Mask PAN when displayed (the first six and last four digits are the maximum number of digits to be displayed).

As you can see the PCI DSS requirements are that the first six and last four digits are the only digits that should be displayed on a receipt. Why? Because displaying any more than this leaves your card number open to being compromised.

The first six digits are unique to your bank, so displaying these poses no real security risk. The last digit is a check digit, and the prior three prior digits are only 1/3 of your account number. Using a MOD10 calculator to calculate the remaining six digits still leaves a vast number of possibilities, so many in fact, that it poses no great security risk.

Wellington Airport receipts display the last six digits of the PAN, as pictured below (I've crossed two out so you can't see them). This now only leaves four digits that need to be generated, and literally leaves only a handful of possibilities for the card number. For all intent purposes you may as well be displaying the full PAN, as a card card can be compromised with access to the first six digits and the last six digits of the PAN.


A Wellington Airport parking receipt by itself isn't going to let somebody exploit your credit card - as they're only displaying the last six digits of the PAN. Combined with another receipt from a PCI compliant terminal or retailer however and your card number can be compromised. Considering many people throw receipts away together it's entirely possible that somebody could gain access to two receipts which would enable them to reconstruct your credit card number.

So a small tip from me - if you use your credit card at Wellington Airport be careful what you do with your receipt. It could be the most expensive car park you ever use!


Update 05/01/2012 :

Fellow Geekzone Moderator Nate spent some some time whipping up some code using the MOD 10 algorithm to generate possible card combinations. By entering an incomplete credit card number and X's to signify the masking all possible full PAN numbers are displayed. These could then easily be submitted automatically to a payment gateway to establish the valid number. If PCI compliant PAN masking of six digits is followed the 100000 possible combinations make this a a virtually impossible task. With non PCI compliant PAN masking such as that used by Wellington Airport this could be done in a matter of minutes with access to appropriate payment gateways.

Other related posts:
Fairfax takes journalism ethics and integrity to a whole new low with Stuff fibre
Why are airport taxes and service charges so high on Trans Tasman flights between New Zealand and Australia?
Flight reviews – Air New Zealand NZ87 Auckland (AKL) to Hong Kong (HKG) in Premium Economy and Air New Zealand NZ 80 Hong Kong (HKG) to Auckland (AKL) in Business Premier on the 777-200ER

Comment by Behodar, on 4-Jan-2013 20:32

"A Wellington Airport parking receipt by itself isn't going to let somebody exploit your credit card - as they're only displaying the last six digits of the PAN." ... And the expiration date!

Comment by SNicolle, on 5-Jan-2013 11:45

You mean compliant not complaint but a good read

Comment by Athlonite, on 6-Jan-2013 22:20

yet another good reason to use CASH I've never trusted CC's and never will.. I will however use an debit card, you load it up with the amount you need and once it's gone well that's it it's gone! defraud me now HAHA the LOL's on you thief ;)

Comment by Rich, on 8-Jan-2013 10:07

I've beed dubious about partial credit card numbers for a while. Sure, if you fire 100,000 bad numbers at a single merchant, they would block your IP (are they required to code for and do this, though?). But fire 100,000 numbers at 10,000 merchants - that might work.

Comment by Watty, on 11-Jan-2013 09:36

I am from the UK and i use PayPal for all my on-line purchases, and also as my shopping cart for my online gift shop for the past 7 years and have never had a problem, some high street shops are now using this system in the UK.

Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.

Your name:

Your e-mail:

Your webpage:

sbiddle's profile

Steve Biddle
New Zealand

I'm an engineer who loves building solutions to solve problems.

I also love sharing my views and analysis of the tech world on this blog, along with the odd story about aviation and the travel industry.

My interests and skillset include:

*VoIP (Voice over IP). I work with various brands of hardware and PBX's on a daily basis
  -Asterisk (incl PiaF, FreePBX, Elastix)

  -xDSL deployments

*Structured cabling
  -Home/office cabling
  -Phone & Data

*Computer networking
  -Mikrotik hardware
  -WAN/LAN solutions

*Wireless solutions
  -Motel/Hotel hotspot deployments
  -Outdoor wireless deployments, both small and large scale
  -Temporary wireless deployments
*CCTV solutions
  -Analogue and IP

I'm an #avgeek who loves to travel the world (preferably in seat 1A) and stay in nice hotels.

+My views do no represent my employer. I'm sure they'll be happy to give their own if you ask them.

You can contact me here or by email at