On Mon, 28 May 2012 09:17:04 -0400, Gary Weinhold wrote: > >You only need (want) 1 billion random numbers. I think multiplying each 9 >digit number by a prime greater than 1 billion and dividing by 1 billion will >generate a unique 9 digit remainder for each number. > (Why didn't I think of that!?) Of course, the multiplier, M, needn't be greater than 1 billion. For any M, M mod 1 billion produces identical results. And it needn't be prime; only relatively prime to 1 billion, i.e. any number whose final decimal digit is 1, 3, 7, or 9.
M must be kept secret. But I suspect it can easily be inferred, even if only by exhaustion, given any single key in its clear and masked forms. If there is no requirement that the masked key be numeric, the search space can be enlarged, however slightly, by using a base85 encoding (see RFC 1924, April 1, 1996). Even if the intruder knows no key in its clear and masked representations, but knows that keys in some set are invalid, he might be able to make a good guess at M by the absence of certain masked values in a sufficiently large sample. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN