Usage Guidelines & Verification Protocols
Official Algorithmic Verification & Compliance Framework
NIC Info provides mathematically sound cryptographic syntax validation and demographic data extraction in compliance with Sri Lanka's standardized identity numbering system. This document outlines the official format architecture, migration rules between legacy and modern cards, and ethical usage parameters.
1. Number Format Specifications
Sri Lankan National Identity Cards follow two official number architectures. Our parsing algorithm instantly detects and distinguishes between legacy printed credentials and modernized digital smart cards without requiring manual formatting selection.
Old Format (9 Digits)
Pre-2016Example Syntax: 852140123V
Structure: Comprises 9 sequential decimal numerals followed by a required terminal control letter (V for registered voter or X for exceptional status).
Year Encoding: Represents only the last 2 digits of the birth year (e.g., 85 corresponds to 1985).
New Format (12 Digits)
Post-2016Example Syntax: 198521400123
Structure: Comprises 12 sequential decimal numerals with all alphabetic suffix characters completely removed.
Year Encoding: Explicitly features the full 4-digit Gregorian birth year (e.g., 1985), future-proofing digital database index compatibility.
2. Gender & Day-of-Year Encoding Algorithm
Regardless of card generation, digits following the birth year field represent a standardized 3-digit day-of-year numerical integer that encodes both birth date and legal gender according to an explicit numerical shift:
| Gender Category | Numerical Range | Offset Formula | Example (Born Feb 1) |
|---|---|---|---|
| Male Citizens | 001 – 366 |
Day of Year + 000 | 032 (31 Jan days + 1) |
| Female Citizens | 501 – 866 |
Day of Year + 500 | 532 (32 + 500 offset) |
Leap Year Reconciliation: According to traditional DRP sequencing conventions, calculations presume a 366-day cycle for indexing purposes. Day integer 366 (or 866 for females) corresponds to December 31 in leap year cycles, ensuring mathematical consistency across all annual calendars.
3. Algorithmic Record Migration (9 to 12 Digits)
For system architects, enterprise KYC pipelines, and database administrators upgrading user registries from legacy 9-digit records to standardized 12-digit format, follow this precise 4-step transformation protocol:
- Step 1 (Year Expansion): Prepend the century identifier
19directly preceding the initial 2 digits of the legacy number (applicable for all 20th-century issuances). - Step 2 (Date Preservation): Maintain the sequential 3-digit day and gender integer directly following the expanded year without modification.
- Step 3 (Zero Insertion): Insert a single zero (
0) immediately preceding the 4-digit serial check number to expand the serial identifier from 4 to 5 decimal digits. - Step 4 (Suffix Deprecation): Strip and discard the terminal control character (
VorX).
Transformation Demonstration: Legacy record 852140123V successfully converts to digital standard 198521400123.
4. Acceptable Usage & Ethics Policy
To maintain ethical computing standards and uphold statutory data privacy regulations, all operators utilizing this tool must strictly observe the following acceptable use protocols:
- Authorized Processing Only: Only process National Identity Card credentials belonging to yourself, consenting clients, or individuals undergoing legitimate organizational onboarding and verification workflows.
- Prohibition of Batch Harvesting: Automated scraping, scripted dictionary generation, or brute-force sequential parsing for public directory harvesting or unauthorized demographic profiling is explicitly prohibited.
- Zero Inference Boundary: Do not attempt to infer socioeconomic status, ethnicity, regional origin, or unrepresented attributes from the serial checksum digits, as these numbers represent solely randomized departmental issuance quotas.
5. Technical Consultation & Developer Support
For custom KYC software integrations, backend verification API architecture, or clarifying inquiries regarding algorithmic formatting standards, you may contact our engineering leadership directly:
Lead Architect: Pubudu Tharanga
Developer Portfolio: https://pubudu-tharanga.vercel.app/