85 points · by signa11 · 2y ago · 19 comments
In the end I wrote a function[1] which reverses an input known to fail a checksum to determine probable transcription errors based upon a manually compiled, exhaustive list of probable mistranscriptions[2]. I was quite impressed at how fast and accurate it was.
From a systems architecture standpoint, I learned that there is really no excuse today for creating a system in which human transcription may occur without a checksum mechanism. Largely, however, QR codes and the trusted optical exchange of identifiers in physical settings has superseded this solution class (but brought its own vulnerabilities and concerns).
[1] https://github.com/globalcitizen/php-iban/blob/master/php-ib... [2] https://raw.githubusercontent.com/globalcitizen/php-iban/mas... [3] https://github.com/globalcitizen/php-iban/issues/39#issuecom...
And the issuer can usually tell you how many digits, from 13 to 16, which is an additional offline input check, besides the checksum.
Anyone who enters a credit card number still knows you have to enter in… your security code.. your name on card.. your billing address (or at least the zip / postal code).
Seems to me like the ID should have just been an ID.
In terms of storage and communication, there's a benefit in being able to verify some degree of data integrity as well.
So I would hazard it's totally a processing thing, not really an identity thing.
Also EANs/ISBNs don't have other authentication factors available. You don't want a mis-scan for product A to accidentally charge a customer for product B. You want to detect the mistake.
Many of the methods to entering these numbers are very error prone:
- Laser scanners
- Cameras
- Humans
- Magnetic readers
- etc
The check digit lets the system know the error was likely misread / mistyped without needing a database or the like and also helps prevent an accidental mistyped value from also being a valid valud (The number for Book A is unlikely to be mistyped exactly to be the number for Book B because of the check digit).
It also can help to improve scanning speed to some degree since if you have two interpretations of the signal it is possible to infer which one is most likely to be correct.
Indeed. One of the things I hate is that the bank account numbers in our banks does not have a check digit. There have been cases where people have transferred hundreds of thousands to wrong accounts, simply by mistyping a single digit in the account number.
If you have some important generated reference that needs to be entered manually, include some check digit/letter.
All they protect against is mistyping (or in the old days, misspeaking over a noisy telephone) the annoyingly long sequence of random digits. Actually judging that the numbers refer to a valid credit card account that the user is authorized to charge is an entirely different (and harder) problem.
The CC# is just a CC#, albeit one that contains extra digits that depend on the other digits.
They also provide a good source of problems in elementary number theory.
Even if a transfer doesn't go through, that transfer might be stuck pending for hours or days before being reverted, if we're talking about bank transfers.