dvg
January 24th, 2003, 11:30 AM
Hi,
I'm looking for some help in developing a PIN generation algorithm for scratch cards. What I would like to do is take a range of "control numbers" (a sequential number representing a batch of PINs) and generate a 10-14 digit PIN based on that. I'm not looking for a random number generation, but something that will generate a pseduo-random number based on the control number. To further complicate the issue, the PINs would need to be unique over a large range control numbers (1M+).
I've experimented with different operations like MOD and shifting and I get a nice range of random PINs. But I cannot seem to figure out how to make the number unique over the range I'm looking for. I know it can be done but the math to develop / prove it is beyond me.
And suggestions or references would be appreciated. I understand that something like this is very propriety to a business so I'm not necessary looking for a complete solution, just a point in the right direction.
Below is an example of what I'm trying to do. Thanks in advance for the help,
David
Control # PIN
00000001 123.456.789.123
00000002 638.098.270.748
00000003 472.309.327.732
0000nnnn 852.382.127.034
I'm looking for some help in developing a PIN generation algorithm for scratch cards. What I would like to do is take a range of "control numbers" (a sequential number representing a batch of PINs) and generate a 10-14 digit PIN based on that. I'm not looking for a random number generation, but something that will generate a pseduo-random number based on the control number. To further complicate the issue, the PINs would need to be unique over a large range control numbers (1M+).
I've experimented with different operations like MOD and shifting and I get a nice range of random PINs. But I cannot seem to figure out how to make the number unique over the range I'm looking for. I know it can be done but the math to develop / prove it is beyond me.
And suggestions or references would be appreciated. I understand that something like this is very propriety to a business so I'm not necessary looking for a complete solution, just a point in the right direction.
Below is an example of what I'm trying to do. Thanks in advance for the help,
David
Control # PIN
00000001 123.456.789.123
00000002 638.098.270.748
00000003 472.309.327.732
0000nnnn 852.382.127.034