Sunday, May 30, 2010

172 - Singapore UIN Algorithm

Singapore UIN Algorithm

The following is a guess of the UIN/FIN Algorithm using in our local Identity Card (affectionally abbreviated as IC) - it gives you a basic ideal how it works.

The authorised version can be purchase directly from the Gov.Sg - url //web1.internet.gov.sg/mha/ica/nrd/uin2.htm. It will cost you S$400 (Singapore Dollars) upon their approval.

The Singapore NRIC number consists of SEVEN (7) digits and a letter appended behind. This letter is calculated from the first SEVEN (7) digits using the MODULUS ELEVEN (11) method. This system is the most commonly used since it provides a high degree of security.

The steps involved in the computation are as follows:

Multiply each digit in the NRIC number by its weight.
Add together the above products.
Divide the resulting sum by ELEVEN (11).
Subtract the remainder from ELEVEN (11) to give the check digit.

In Singapore, the weight for the NRIC number is shown in the following table:
2 7 6 5 4 3 2
Workings:
Digit = [ (d1 d2 d3 d4 d5 6 d7) . (2 7 6 5 4 3 2)] mod 11
= (2d1 + 7d2 + 6d3 + 5d4 + 4d5 + 3d6 + 2d7) mod 11

The conversion (look-up) table to convert the check digit into the corresponding alphabet is shown below:
Digit 10 9 8 7 6 5 4 3 2 1 0
Alphabet A B C D E F G H I Z J
---
UIN/FIN Algorithm
The first digit is the century prefix. S for 19th century and T for 20th century.
Century Prefix for the UIN and FIN in the 21st century
Come 21st century, the prefix of the Unique Identification Number (UIN) and the Foreigner Identification Number (FIN) will be changed from "S" to "T" and "F" to "G" respectively.
The last letter in the UIN/FIN is a check digit; serving as a means to ensure that the 7 numerals are not entered into a computer system in the wrong order. An algorithm is used to derive the check digit from the century prefix and the 7 numerals in the UIN or FIN. The algorithms and sample computer programs can now be obtained by filling up the electronic request form provided.
ICA would be glad to provide further clarifications on the use of the century prefix for UIN and its algorithm if needed.
What is UIN and FIN?
A Unique Identification Number (UIN) is a unique identification number that is assigned to all Singapore citizens and permanent residents and children born in Singapore. A Foreign Identification Number (FIN) is a unique identification number assigned to foreigners who are issued with immigration and work passes in Singapore eg. student's pass holders.
Why prefix "S" and "T" for UIN?
The current prefix for UIN is "T". It is the 20th letter in the alphabet which denotes UIN issued in this century (i.e. 2000 - 2099), while "S" is used for the last century.
What constitutes a complete UIN/FIN?
The format of a UIN and FIN is:
P - is the century prefix
NNNNNNN - seven numerals
C - a letter in the alphabet serving as a check digit

What happen if we provide a UIN or FIN without the century prefix?
The century prefix is important as it makes the UIN or FIN unique. For example, the first child registered in the year of 2000 will bear a UIN "T0000001/E which differs from the first number "S0000001/I" first issued in the year 1966.