This makes the full account number read 79927398713.Įxample for validating check digit The calculated check digit is equal to 10 − s mod 10.
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. It is not intended to be a cryptographically secure hash function it was designed to protect against accidental errors, not malicious attacks. The algorithm is in the public domain and is in wide use today. 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 checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers in the United States, Canadian Social Insurance Numbers, Israeli ID Numbers, South African ID Numbers, Swedish National identification numbers, Swedish Corporate Identity Numbers (OrgNr), Greek Social Security Numbers (ΑΜΚΑ), and survey codes appearing on McDonald's, Taco Bell, and Tractor Supply Co.