tag:blogger.com,1999:blog-4125674748141814364.post5253669866572767833..comments2009-02-23T20:33:14.320+08:00Comments on My Thoughts...: NRIC & FIN Number Suffix CheckerGanganoreply@blogger.comBlogger31125tag:blogger.com,1999:blog-4125674748141814364.post-7661143092479476762009-02-23T20:33:00.000+08:002009-02-23T20:33:00.000+08:00this sucks manthis sucks manAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-30660720734457096372008-12-23T12:55:00.000+08:002008-12-23T12:55:00.000+08:00Thank you for the cautionary advice. The reply fro...<I><BR/>Thank you for the cautionary advice. The reply from ICA had already been posted on my blog in a separate entry when it appeared in July this year.<BR/><BR/>In any case, as you have noted, I have explicitly reiterated that this tool is meant to make admin work simpler and is not intended for use in data-sensitive environments.<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-59380318330064083292008-12-23T11:49:00.000+08:002008-12-23T11:49:00.000+08:00You can purchase the NRIC / FIN algorithm from the...You can purchase the NRIC / FIN algorithm from the ICA at a small price. http://www.ica.gov.sg<BR/><BR/>A reverse engineer algorithm cannot be 100% trusted unless it matches the algorithm provided by ICA. With no auditing on the implementation, companies who uses this excel carefully for critical business needs. <BR/><BR/>Refer to the below article from ICA for comments on this nric checker.<BR/>http://www.ica.gov.sg/news_details.aspx?nid=11660Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-77372438562859204182008-07-22T13:58:00.000+08:002008-07-22T13:58:00.000+08:00Kervin, thank you for the advice. I have incorpora...<I><BR/>Kervin, thank you for the advice. I have incorporated this into the document for a better 'checker', cheers!<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-58752567036229200932008-07-22T11:46:00.000+08:002008-07-22T11:46:00.000+08:00you can set "validation" to allows only "One Chara...you can set "validation" to allows only "One Character" only per cell and prompt for error msg if user inputs more then 1 char in a cell.. another accuracy check function. Thanks<BR/>~KV~Kervinhttp://www.blogger.com/profile/14916169966329750649noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-74832939792381209812008-07-19T11:52:00.000+08:002008-07-19T11:52:00.000+08:00Glad to know people found my hack useful. I've put...Glad to know people found my hack useful. I've put a direct link to the Excel calculator on the home page (ngiam.net) so that it is easier to locate.Ngiam Shih Tunghttp://www.blogger.com/profile/02800779441060614157noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-66040576868394886722008-07-13T20:50:00.000+08:002008-07-13T20:50:00.000+08:00Interesting DevelopmentI was contacted by a report...<I><BR/><B>Interesting Development</B><BR/>I was contacted by a reporter soon after the post and was interviewed today by her. She has asked if I could link her up with any 2 users of the 'checker' for their end-user (non-professional) review.<BR/><BR/>In the pursuit of impartiality and objectivity, I feel that, good or bad, the 2 persons who are interviewed with regard to this utility should be persons I do not personally know.<BR/><BR/>Hence, I would like to urge any of you who have used the 'checker' to contact me through <A HREF="gangasudhan@email.com" REL="nofollow">email</A> or leave your email contact details in a comment for me to reach you.<BR/><BR/>For general information, the reporter herself is not a technical specialist and would not understand an in depth critique of the 'checker'.<BR/><BR/>I appreciate everyone's contribution and am honoured that my simple effort has been recognised to this extent. I also hope that the reviewers will allow themselves to be named and identified to share the limelight, thank you.<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-86930400624797601842008-07-13T20:31:00.000+08:002008-07-13T20:31:00.000+08:00Christoph, thank you for the added information. I ...<I><BR/>Christoph, thank you for the added information. I have deleted your earlier 2 comments as it refers to the same URL, hope you don't mind.<BR/><BR/>The website (ngiam.net) indeed has very good information on the NRIC number structure, algorithm and even has a PDF/PPT presentation about the whole concept.<BR/><BR/>In fact, I had come across this presentation during my own research on this subject matter and found it to be very useful myself.<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-74160492838094951732008-07-11T21:19:00.000+08:002008-07-11T21:19:00.000+08:00hmm.. now it workshttp://www.ngiam.net/NRIC/UIN-FI...hmm.. now it works<BR/><BR/><A HREF="http://www.ngiam.net/NRIC/UIN-FIN%20Universal.xls" REL="nofollow">http://www.ngiam.net/NRIC/UIN-FIN%20Universal.xls</A><BR/><BR/>The site has some additional info on the algorithm and the car plate algorithm as well<BR/><BR/><A HREF="http://www.ngiam.net" REL="nofollow">http://www.ngiam.net</A>Christophnoreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-43453700392533350272008-07-11T08:51:00.000+08:002008-07-11T08:51:00.000+08:00Nighthound, I didn't understand what you were tryi...<I><BR/>Nighthound, I didn't understand what you were trying to tell me the first time round, sorry. I have found the bug and killed it.<BR/><BR/>In fact there was another bug for the 'I' lookup as I had referred the wrong cell for checksum 2. As I copied and pasted the formulae, this error followed through for the other 'checkers'. Have fixed both and hopefully, there are no more.<BR/><BR/>Thanks for working on this with me, really appreciate it.<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-20157826860990491012008-07-10T23:51:00.000+08:002008-07-10T23:51:00.000+08:00What I'm saying is, currently the implementation i...What I'm saying is, currently the implementation is broken. There's no way for any S-series IC number to generate a checksum letter of J. <BR/><BR/>For example, S8034569 is supposed to have a checksum letter "J", but in your excel file, it appears as "0".<BR/><BR/>The same case for T-series ending with "G", F-series ending with "X" and G-series ending with "R".<BR/><BR/>I'm just bringing this up so that people will not use your file and run into the bug unknowingly.Nighthoundhttp://www.blogger.com/profile/12471129361430162722noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-61531428778710154002008-07-10T23:35:00.000+08:002008-07-10T23:35:00.000+08:00It was basically a very logical and lateral transl...<I><BR/>It was basically a very logical and lateral transliteration of the alogrithm. I am hardly proficient at using the formula function of Excel and was happy to get the right result in the right place to start off.<BR/><BR/>When I expanded to include the T-series and FIN numbers, I realised that it was sort of backwards (I believe you refer to this as the 'lookup').<BR/><BR/>I can fully understand that this IS a bug and from a purist standpoint, it should be fixed whether it is causing a problem or not.<BR/><BR/>However, based on my aptitude at Excel use, I will subscribe to the philosophy of "if it ain't broke, don't fix it". Besides, it will take me more time than I really want to spend on this.<BR/><BR/>Nevertheless, I wish to thank you for contributing and trying to correct the inherent error and I promise to take a look at it if I have the time to do so.<BR/><BR/>I think many people have benefitted from the use of this utility and it wouldn't have been possible without such like-minded participants, cheers.<BR/><BR/><B>Footnote</B>: One comment by payucash was removed due to it being an obvious SPAM comment.<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-83888057835926759632008-07-10T21:27:00.000+08:002008-07-10T21:27:00.000+08:00kaon: yes you're right, the NRIC calculation is ex...kaon: yes you're right, the NRIC calculation is exactly the same for S/T/F/G, except with different lookups. I just did a quick modification of my vehicle check spreadsheet and made a NRIC checker as well.<BR/><BR/><A HREF="http://nighthound.googlepages.com/NRICChecker.xls" REL="nofollow">NRIC Checker</A><BR/><BR/>I used a 2-dimensional lookup table so that I didn't need to have 4 different fields for the different prefixes.<BR/><BR/>Here's the 2D table in text for posterity. :)<BR/>(treat the underscores as whitespace, I was just trying to be lazy when preserving formatting)<BR/><BR/>_____S___T___F___G<BR/>_0___J___G___X___R<BR/>_1___Z___F___W___Q<BR/>_2___I___E___U___P<BR/>_3___H___D___T___N<BR/>_4___G___C___R___M<BR/>_5___F___B___Q___L<BR/>_6___E___A___P___K<BR/>_7___D___J___N___X<BR/>_8___C___Z___M___W<BR/>_9___B___I___L___U<BR/>10___A___H___K___T<BR/><BR/><BR/><BR/>Should be quite self-explanatory, select the correct column based on the letter prefix, then just use the mod-11 to get the checksum letter.<BR/><BR/><BR/>ganga: while coming up with my spreadsheet, I noticed there's a slight bug in yours. You used 11-mod(x) before doing the lookup, but your lookup checks 0-10 instead 1-11.<BR/><BR/>ie. if the modulo result is 0, then 11-0 = 11, but your if/else statements check for 0 instead of 11. You probably need to correct that. :PNighthoundhttp://www.blogger.com/profile/12471129361430162722noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-81632271247202779372008-07-10T19:52:00.000+08:002008-07-10T19:52:00.000+08:00What's the difference between the formula for the ...What's the difference between the formula for the S-series NRIC and for the T-series NRIC? And the FIN's.<BR/><BR/>Seems weights are the same:<BR/>2, 7, 6, 5, 4, 3, 2<BR/><BR/>Difference lies in the lookup from mod-result to letter.<BR/><BR/>Someone want to paste the lookup's here please?kaonnoreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-3435791339904604952008-07-10T19:21:00.000+08:002008-07-10T19:21:00.000+08:00Will attempt to restate the Singapore car plate ch...Will attempt to restate the Singapore car plate checksum in English for posterity.<BR/><BR/>SXY 1234 Z<BR/><BR/>Only 2 letters of the prefix are used in the checksum, for now, so discard the S. <BR/><BR/>The 2 relevant letters of prefix, X and Y should be converted to numeric value where A=1 and Z=26.<BR/><BR/>Coefficients (aka weights) for the 2 alphabetic prefix positions and the 4 numeric positions are:<BR/><BR/>position: weight<BR/>X : 9<BR/>Y : 4<BR/>1 : 5<BR/>2 : 4<BR/>3 : 3<BR/>4 : 2<BR/><BR/>multiply each position by its weight. <BR/>Sum up all the products, <BR/>Take MOD 19 of the sum. This is the checksum. Look up the letter according to this:<BR/><BR/>0 A<BR/>1 Z<BR/>2 Y<BR/>3 X<BR/>4 U<BR/>5 T<BR/>6 S<BR/>7 R<BR/>8 P<BR/>9 M<BR/>10 L<BR/>11 K<BR/>12 J<BR/>13 H<BR/>14 G<BR/>15 E<BR/>16 D<BR/>17 C<BR/>18 B<BR/><BR/>Or you can do "19 minus the mod19" and use a slightly different final lookup, but that's longwinded.<BR/><BR/>The last time I needed this, but did not have it, was when a drunk driver damaged my property and the CCTV picture quality was just at the verge of resolving the plate number. :(<BR/>The bastard was in a landrover discovery.kaonnoreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-23236892251905631862008-07-10T14:44:00.000+08:002008-07-10T14:44:00.000+08:00Hi,Great job! keep it up :)Hi,<BR/><BR/>Great job! keep it up :)Halimahhttp://www.blogger.com/profile/09796460249113985630noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-61011177238769033042008-07-10T13:31:00.000+08:002008-07-10T13:31:00.000+08:00Hahaha, yes that too. Do you think I can cover up ...<I><BR/>Hahaha, yes that too. Do you think I can cover up the faux pas by saying "I didn't want to state the obvious"?<BR/><BR/>But seriously, when I made the comment, I was thinking of more direct uses of just the random NRIC numbers alone, and thought of the civil service portals such as PM2S which uses the NRIC number as the userid and the DOB as the password by default.<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-9769403505321787992008-07-10T12:24:00.000+08:002008-07-10T12:24:00.000+08:00Besides, a random NRIC number is of not much use t...<I>Besides, a random NRIC number is of not much use to commit identity theft. One would need other details such as DOB and address (at least) before anything can be done, I would assume.</I><BR/><BR/>Not to mention: nameAgagoogahttp://www.blogger.com/profile/11427912904378599921noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-67037514392727262962008-07-10T10:18:00.000+08:002008-07-10T10:18:00.000+08:00corr: coincidentally, our previous comments have e...corr: coincidentally, our previous comments have exactly the same post time.<BR/><BR/>as for your concern about identity theft, i don't think being able to generate the last letter is very crucial. after all, if the person has managed to get hold of the digits of someone's NRIC, he should have access to the last letter as well.Nighthoundhttp://www.blogger.com/profile/12471129361430162722noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-23118155008124237012008-07-10T10:15:00.000+08:002008-07-10T10:15:00.000+08:00Kaon, it never occurred to me about the vehicle re...<I><BR/>Kaon, it never occurred to me about the vehicle regsitration number suffix, so kudos indeed to Nighthound for the contribution.<BR/><BR/>Anonymous @09 July 2008 22:14:00 SGT, Corr has a valid point which I myself considered carefully before releasing this little file into the public domain. I am offering this as a utility that helps people like me who deal with a large number of NRIC numbers and is done out of good faith.<BR/><BR/>Corr, although your point is valid, there are several other ways to obtain valid NRIC numbers and I even noted on one occasion where the full NRIC numbers of contest winners were published in an advertisement on ST. Besides, a random NRIC number is of not much use to commit identity theft. One would need other details such as DOB and address (at least) before anything can be done, I would assume.<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-80560331483528550352008-07-10T09:47:00.001+08:002008-07-10T09:47:00.001+08:00Kaon: Actually I found the formula somewhere on th...Kaon: Actually I found the formula somewhere on the net long time ago, and so copied it onto my computer for future reference. But I couldn't find it any more so I decided to release back into public domain.<BR/><BR/>It's more tricky than NRIC because they leave out some letters, as well as the use of reverse modulo (the letters go backwards) for the final checksum... I don't think I would've been able to brute-force the formula. :)Nighthoundhttp://www.blogger.com/profile/12471129361430162722noreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-55650717195613055312008-07-10T09:47:00.000+08:002008-07-10T09:47:00.000+08:00So if someone keys in a random number to check for...So if someone keys in a random number to check for validity, that person can use it for identity theft?corrnoreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-65123005853674617512008-07-09T22:14:00.000+08:002008-07-09T22:14:00.000+08:00"corr said... Is this legal?"typical s'porean....."corr said...<BR/><BR/> Is this legal?"<BR/><BR/>typical s'porean... buay tahanAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-54247112665202346912008-07-09T19:33:00.000+08:002008-07-09T19:33:00.000+08:00Nighthound,Thanks for the car license plate checke...Nighthound,<BR/>Thanks for the car license plate checker!<BR/>Did you personally reverse-engineer it? <BR/>Or did you learn of it from LTA or somewhere?<BR/>I once tried to brute-force it with coefficients and modulos, but did not get anywhere.<BR/>And could never find it online, until now.<BR/>So THANKSkaonnoreply@blogger.comtag:blogger.com,1999:blog-4125674748141814364.post-37255199338109315282008-07-09T08:07:00.000+08:002008-07-09T08:07:00.000+08:00Corr, it should be fairly legal as the Modulo 11 a...<I><BR/>Corr, it should be fairly legal as the Modulo 11 algorithm is not patented (to my knowledge).<BR/><BR/>Christoph, your site never opens up (I don't have any problems with other sites), thus the file cannot be acessed at the URL you have provided. You can send me the file through email and I'll put it up on the blog as well.<BR/></I>Gangahttp://www.blogger.com/profile/06140398563083588880noreply@blogger.com