The Luhn algorithm ("modulus 10" or "mod 10" algorithm, Luhn formula) is a simple checksum
formula used to validate a variety of identification numbers, such as credit card numbers (PAN)
or IMEI numbers. The algorithm is specified in ISO/IEC 7812-1 and it was designed to protect
against accidental errors. The Luhn algorithm will detect any single-digit error, as well as
almost all transpositions of adjacent digits. It will not, however, detect transposition of the
two-digit sequence 09 to 90 (or vice versa).