Your Card Number's Typo Check Is 70 Years Old and Still Works
Every card number typed into a checkout form is screened by the Luhn algorithm, a arithmetic check developed decades before modern computers existed. IBM scientist Hans Peter Luhn created it in the 1950s to catch transcription errors in identification numbers, adding a check digit computed from the preceding digits. The same test still validates card numbers, IMEI numbers on phones, and several national ID numbers, running offline in milliseconds. Its method doubles every second digit from the right, subtracts 9 where results exceed 9, and checks whether the total is a multiple of 10. The approach catches nearly all single-digit errors and most adjacent transpositions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in