Interactive Step Breakdown
Inspect how each digit is weighted, multiplied, summed, and reduced modulo target.
Non-digit characters are automatically stripped.
Interactive Luhn Algorithm Explorer
Explore right-to-left digit doubling, the "Subtract 9" rule, and clickable digit contribution analysis.
Digit-by-Digit Right-to-Left Traversal (Click any digit to inspect)
Right-to-Left OrderIdentifier Checksum Validator
Check the mathematical check digit/checksum of a supported identifier. A passing checksum does not prove that an ISBN, barcode, card number, IMEI, or bank account was actually issued or exists.
Error Detection & Transposition Lab
Mutate synthetic codes with common human typographical errors to see if algorithms catch them.
Build the Identifier Practice
Calculate the missing check digit manually using step-by-step hints.
Solve Missing Check Digit
Guided Hints (Step-by-Step)
Challenge Arcade & Diagnostic Drills
Test your mastery: spot invalid codes, repair typos, predict error detection, and compare algorithm resilience.
Educational Primer: Checksums vs Cryptography
Understanding why check digits are designed to catch accidental data-entry errors, not prove authenticity or prevent forgery.
1. Check Digit / Checksum
Purpose: Detect accidental human mistyping or optical scan glitches (e.g. keying a digit wrong, swapping adjacent numbers).
Math: Fast modular arithmetic (Mod 10, Mod 11, Mod 97).
2. Cryptographic Hash
Purpose: Compare data against a trusted expected digest to detect accidental or deliberate changes (e.g., SHA-256). A hash by itself does not authenticate who supplied the data or the digest.
Math: One-way hash functions designed for properties such as preimage resistance and collision resistance; secure hashes also exhibit strong diffusion (the avalanche effect).
3. Digital Signature
Purpose: Provide evidence of message integrity and signer authentication when keys and trust processes are managed correctly; they can support non-repudiation rather than guaranteeing it by themselves (e.g. RSA, ECDSA).
Math: Asymmetric public/private key cryptography.
Key Mathematical Principles of Check Digits
- Single Digit Errors: Catching 100% of single wrong digits requires that replacing $d_i$ with $d_i'$ changes the weighted sum modulo $M$.
- Adjacent Transpositions: Swapping $d_i d_{i+1}$ to $d_{i+1} d_i$ causes a net change in sum of $(w_i - w_{i+1})(d_i - d_{i+1})$. In Mod 10 systems with alternating weights 1 and 3 (ISBN-13, EAN-13, UPC-A), transpositions are caught unless $|d_i - d_{i+1}| = 5$, because $2 \times 5 = 10 \equiv 0 \pmod{10}$.
- Prime Modulus Superiority (ISBN-10): For a correctly formed ISBN-10, Modulus 11 with weights $10, 9, \dots, 2$ detects every single-digit substitution and every adjacent transposition of two different decimal digits. This is a property of the defined weighting and modulus, not a security guarantee.