Developer Utilities & Fintech Engines.
Production algorithms extracted directly from our open-source repositories (Abeta-dev/go-fintech-india ↗ and react-libs ↗). Run instant statutory checks and exact financial calculations with guaranteed privacy.
UIDAI Verhoeff Checksum Validator
Mathematical dihedral group (D5) validation used across Indian national identity systems.
Dihedral Group D5 Iteration Trace
Evaluating c = d[c][p[i % 8][digit]] across right-to-left reversed digits:
| Pos (i) | Digit | p-row (i % 8) | Permutation p | Prior c | Result c |
|---|---|---|---|---|---|
| 0 | 7 | 0 | 7 | 0 | 7 |
| 1 | 2 | 1 | 7 | 7 | 0 |
| 2 | 1 | 2 | 8 | 0 | 8 |
| 3 | 0 | 3 | 8 | 8 | 0 |
| 4 | 9 | 4 | 0 | 0 | 0 |
| 5 | 8 | 5 | 0 | 0 | 0 |
| 6 | 7 | 6 | 4 | 0 | 4 |
| 7 | 6 | 7 | 3 | 4 | 2 |
| 8 | 5 | 0 | 5 | 2 | 7 |
| 9 | 4 | 1 | 2 | 7 | 5 |
| 10 | 3 | 2 | 3 | 5 | 7 |
| 11 | 2 | 3 | 1 | 7 | 6 |
c = 6. (In Verhoeff math, c == 0 signifies exact transmission integrity).Frequently Asked Questions
What is the Verhoeff algorithm used in Indian Aadhaar verification?
The Verhoeff algorithm is a mathematical checksum formula based on the dihedral group D5 (the non-commutative group of symmetries of a regular pentagon, order 10), invented by Dutch mathematician Jacobus Verhoeff in 1969. In Indian Aadhaar numbers issued by UIDAI, the 12th digit is an exact Verhoeff check digit. Unlike standard Luhn (Mod-10) algorithms, the Verhoeff checksum detects 100% of single-digit transcription errors and over 95% of adjacent transposition errors (e.g., swapping 23 to 32), which represent the vast majority of human data entry mistakes. It operates via multiplication (dTable), position-dependent permutation (pTable cycling through 8 permutations based on position), and inverse lookup (invTable) without requiring expensive division.
How does Indian GSTIN 15-digit Mod-36 checksum validation work?
The Indian Goods and Services Tax Identification Number (GSTIN) is a 15-digit alphanumeric code adhering to ISO/IEC 7064 Mod 37, 36. Positions 1–2 represent the 2-digit state census code (01–38), positions 3–12 contain the taxpayer Permanent Account Number (PAN), position 13 denotes the entity registration sequence (1–9, A–Z), position 14 is the statutory default character "Z", and position 15 is the check character (0–9 or A–Z). Validation processes the first 14 characters from right to left using alternating weight factors of 2 and 1. Each character code point (0–35) is multiplied by the factor, quotient and remainder are summed, modulo 36 is computed, and the complement from 36 yields the expected 15th character check digit.
Why does floating point arithmetic fail in Indian paise currency calculations?
Standard programming languages (JavaScript, Python, Go float64) use IEEE 754 binary floating-point arithmetic, which cannot accurately represent decimal fractions such as 0.1 or 0.2 in binary base-2 (resulting in artifacts like 0.1 + 0.2 = 0.30000000000000004). In Indian fintech applications—handling statutory GST calculations (0%, 5%, 12%, 18%, 28%), line-item discounting, UPI transfers, and payment gateway webhooks (Razorpay, Cashfree)—floating-point drift accumulates over thousands of transactions. This causes reconciliation discrepancies and audit failures. Production fintech systems store and compute all monetary values in exact 64-bit integer paise (where ₹1499.50 = 149950 paise) and apply half-up integer rounding for statutory tax splits.
Need customized fintech pipelines or high-concurrency billing?
We build custom payment orchestration engines, tax compliance outboxes, and high-performance APIs for fast-moving businesses.