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 US patent 2950048A, granted on 23 August 1960.[1]

The algorithm is in the public domain and is in wide use today. It is specified in ISO/IEC 7812-1.[2] 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.

  1. ^ US patent 2950048A, Luhn, Hans Peter, "Computer for Verifying Numbers", published 23 August 1960, issued 23 August 1960 
  2. ^ "Annex B: Luhn formula for computing modulus-10 "double-add-double" check digits". Identification cards — Identification of issuers — Part 1: Numbering system (standard). International Organization for Standardization & International Electrotechnical Commission. January 2017. ISO/IEC 7812-1:2017.