A National ID in my country consists of 14 digits: CYYMMDDXXZZZZ1C1
- C refers to the century - 2 for those born between 1900 and 1999, 3 for those born between 2000 to 2099
- YYMMDD - birth date
- XX - state code (predefined set of state codes)
- ZZZZ1 - four random numbers with Z1 being odd for male and even for female
- C1 - check digit
I have thousands of valid National IDs. Is there a way to know which algorithm was used to generate the check digit and to verify a given sequence if it's a valid National ID?
Suppose that the random numbers are pseudorandom numbers. Is there a way to analyze those numbers to figure their bias and design an algorithm that results in a high number of shared outputs between it's outputs and the ones from the National ID's ZZZZ1 random numbers?
Edit#1:@Steffen Ullrich yes the above description is what the documentation of national ID says , as for the four digits ZZZZ1 I called them pseudo-random numbers but in a sense they aren't even close , they are actually numbers assigned based on the order of registration per birth date per state , as I understand the sex ration per state plus the population per age group per state will introduce some sort of a pattern , "add to that that human birth rate isn't uniform along the entire year - I couldn't really find any data for the last claim but at least in developing countries I believe it should be visible"