Generating credit card

What do the credit card numbers mean and how are they generated? I need to start with a disclaimer: Do not use any credit card numbers, except your own, to buy things off internet. It’s wrong and it’s illegal. The purpose of this post is *not* to create fraudulent workable card numbers. It is to explain the math and the science behind those numbers that most of us see day in and day out; and hence this post should be viewed from a purely academic perspective.

Typical credit card anatomy

Before we understand how credit card numbers are generated, here is a brief explanation of what a typical credit card number means.



Out of the 16 numbers on a typical credit card, the set of first 6 digits is known as the issuer identifier number (read this for details), and the last digit is known as the “check digit” which is generated in such a way as to satisfy a certain condition (the Luhn or Mod 10 check). “Luhn check” is explained later in this post. The term sounds intimidating, but it’s really a very simple (and elegant) concept.
Taking away the 6 identifier digits and 1 check digit leaves us with 9 digits in the middle that form the “account number”.
Now, there are 10 possible numbers (from 0 to 9) that can be arranged in these 9 places. This gives rise to 109 combinations, that is, 1 billion possible account numbers (per issuer identifier).
With each account number, there is always an unique check digit associated (for a given issuer identifier and an account number, there cannot be more than one correct check digit)
Amex issues credit cards with15 digits. The account numbers in this case are 8 digit long.
Bookmark and Share

0 comments:

Post a Comment

Galeri Modifikasi Motor