in reply to Serial Generation and Validation

Any relevant experience I have has been legally protected from disclosure (should be obvious why). However, I can give a few pointers:-

1) although random generation would be a headache (gets slower as it has to check more and more used codes), pseudo random generation can work because it covers each possibility once for a consecutive set of integers. But you want much larger primes than are used in the trivial linked example.

2) use a secret, obscure but consistent filter to remove the majority of generated codes and enable a validity test e.g. filter out anything that isn't a factor of a certain prime (not a suggestion -- too insecure -- but an indication of what such a filter is). The test should significantly reduce the candidate valid codes, so plenty of size is needed for each code to leave enough left over - 16 bytes is popular for codes which are matched against a validity list but more are needed for unmatched codes which rely on a validity algorithm, depending on the inclusion percentage of the filter you select, so that enough valid codes remain over a significant period of possible usage.

3) Two-way encryption is needed after that, because filtering after encryption is arguably too transparent and one-way encryption after filtering would prevent validity testing. GnuPG contains enough ammunition for this.

-M

Free your mind