LUHN ALGORITHM:

The Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm, named after its creator, IBM scientist Hans Peter Luhn, is a simple check digit formula used to validate a variety of identification numbers.


It is described in U.S. Patent No. 2,950,048, granted on August 23, 1960.


The algorithm is in the public domain and is in wide use today. It is specified in ISO/IEC 7812-1. It is not intended to be a cryptographically secure hash function; it was designed to protect against accidental errors, not malicious attacks. Most credit cards and many government identification numbers use the algorithm as a simple method of distinguishing valid numbers from mistyped or otherwise incorrect numbers.


Click here to learn more on Wikipedia.

ISSUER IDENTIFICATION NUMBER:

The first six or eight digits of a card number (including the initial MII digit) are known as the issuer identification number (IIN). These identify the card issuing institution that issued the card to the card holder. The rest of the number is allocated by the card issuer. The card number's length is its number of digits. Many card issuers print the entire IIN and account number on their card.

Issuing Network IIN Range Length
Visa 463237 16
RuPay 65221 16



  
American Express Diners Club Discover JCB Maestro Mastercard RuPay Visa