Re: random_seed

From: Jan Vorbrüggen (jvorbrueggen-not_at_mediasec.de)
Date: 07/26/04


Date: Mon, 26 Jul 2004 14:35:51 +0200


> Can anybody explain me what for author wanted to use "random_seed" and
> why it does not work?

The seed is the internal state of a pseudo-random number generator that
determines the next number being generated. Getting the seed now and setting
it later allows you to (re-)start the sequence of numbers. As written, your
sample program could indeed dispense with all calls involving the seed,
because it calls the getting and setting back-to-back. You need to allocate
the seed to the size specified by the first call because the standard
allows each implementation to have internal state of different size.

        Jan



Relevant Pages

  • Re: pseudo-random generator -- save state
    ... It is a generic and easy-to-use pseudo-random number generator written ... function fills a given buffer with pseudo-random data. ... export the internal state be removing all "static" keywords in prng.c ...
    (sci.crypt)
  • Re: Leaking state
    ... Exactly which bits of the internal state are being returned is ... >> the generator so that it returns two of it's original output XOR'd ... then isn't your PRNG now simply have one more operation in it? ... bad thing" because an attacker would then know a specific portion of the ...
    (sci.crypt)
  • Leaking state
    ... Suppose I have a PRNG that returns 32-bit integers, ... Exactly which bits of the internal state are being returned is ... Do I have an automatic weakness in my generator since the ... the generator so that it returns two of it's original output XOR'd together. ...
    (sci.crypt)
  • Re: Leaking state
    ... Exactly which bits of the internal state are being returned is ... > non-determinable by the PRNG user without him knowing the internal state, ... > the generator so that it returns two of it's original output XOR'd together. ... I've gotten roughly those numbers wuth AES in CTR mode. ...
    (sci.crypt)
  • Re: threads do not get cpa
    ... > Also note that some implementations of drand48require a mutex to ... > protect the internal state of the random number generator. ...
    (comp.sys.sgi.misc)