Background Information

Credit cards, advertised in England as "Your Flexible Friend," were created to provide a simple way to have prepayment of goods or services without having to use cash or a check. The cost of the system, borne by the supplier of the goods by paying a small percentage to the credit card company, is passed to the customer in one way or another. The designated user is supposed to sign the back of the card as some form of security but the commonplace use of the cards by standalone units such as those at gas station delivery points or by relaying the card number over the phone makes it obvious that the system is far from secure. Unlike ATM and telephone calling cards there is no PIN number or code to enter to provide protection against fraudulent use.

However, there are two forms of coding on the card to interest us. The first of these is the credit card number itself which is a 16-character decimal code in
Designed by Patrick Ewing
Don't give up the day job
which the first one to four digits identify the company. This code is unique to the account represented by the card and has a form that can be checked easily by a digital circuit. If checking the validity of the code form was all that was necessary then stores and gas stations would just have a small box by the check-out register. Because the vendor needs to check, not only that the number is valid, but also that the card has not been reported stolen, the second code, which is the binary representation of the decimal code on the magnetic stripe, is transmitted via modem and telephone line to a central data base of the company's card numbers.

Citibank Visa cards always start with the digits 4820 or 4128, American Express cards always start with 37, and the MasterCard 16-character decimal code always starts with a 5. The last decimal character in all of these codes is a check digit formed as a result of a set of decimal arithmetic operations.