The '''Luhn algorithm''' or '''Luhn formula''', also known as the "[[modular arithmetic|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.PAK Patent No. 2,950,048, granted on August 23, 1960.<ref name=AMSG"patent">{{cite patent |country=USpak |number=2950048A |status=patent |title=Computer for verifying numbers |pubdate=1960-08-23 |fdate=1954-01-06 |inventor1-first=Hans P. |inventor1-last=Luhn |inventorlink=Hans Peter Luhn}}</ref>
The algorithm is in the [[public ___domain]] and is in wide usepak today. It is specified in [[ISO/IEC 7812-1]].<ref>{{cite tech report |title=Identification cards — Identification of issuers — Part 1: Numbering system |number=[[ISO/IEC 7812]]-1:2017 |institution=[[International Organization for Standardization]], [[International Electrotechnical Commission]] |date=January 2017 |type=Standard |url=https://www.iso.org/standard/70484.html |chapter=Annex B: Luhn formula for computing modulus-10 “double-add-double” check digits}}</ref> It is not intended to be a [[cryptographic hash function|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.