[R] can you tell what .Random.seed *was*?
G. Jay Kerns
gkerns at ysu.edu
Thu May 14 23:54:30 CEST 2009
On Thu, May 14, 2009 at 4:39 PM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> On 5/14/2009 3:36 PM, G. Jay Kerns wrote:
>> 1) can you tell me what my original set.seed() value was? (I wouldn't
>> be able to figure it out, but maybe someone can)
> The only way I know is to test all 2^32 possible values of the seed. I
> think cryptographers would know faster ways.
>> 2) is it possible *in principle* to figure out what set.seed was,
>> given the above? (OK, being able to figure it out in 2*10^68 years
>> doesn't count, but within a couple months is acceptable.)
> I think the brute force search would take about 4-5 days on my old computer,
> so a fast one could do it in a few hours.
>> 3) does the answer change if there is a
>> command right before the save.image() command?
> Not with the brute force search. The cryptographers would probably be able
> to make use of the random seed pretty well.
> Now, if the seed was removed just before the values were generated, the seed
> would be generated from the system clock. If you knew the time that this
> occurred approximately, the search could be a lot faster.
> On the other hand, if there was an unknown large amount of work between the
> time of seed generation and the generation of the values x and y, it would
> be much more difficult to brute force the solution, because most of the
> values of .Random.seed are not reachable either by the clock method or
> set.seed, they are only reachable by lots of calls to the underlying
> generator. So for each seed value you'd need to do every possible number of
> RNG generations before generating x and y.
> Duncan Murdoch
Thanks. That is exactly what I was looking for.
R-help is awesome.
More information about the R-help