Re: modifying ISAAC, a pseudo-random number generator

From: Unruh (unruh-spam_at_physics.ubc.ca)
Date: 11/17/05


Date: 17 Nov 2005 18:41:45 GMT


I know I know. I am harping. Since you do NOT want to repeat the sequence
(see your idea about using some random input as well as the saved state)
Why oh why oh why do you not just use /dev/urandom? It is there free for
the asking and the people that designed it spent much time thinking about
issues you have not even thought about yet, never mind coded and debugged.

I would load the program, initialise it as usual and then install the saved
state information.

Note that saving pointers to memory locations is pretty useless, since
those memory locations will certainly have changed. You want to save and
restore the contents of those locations pointed to.
 T* randrsl;
 T* randmem;

Mike - EMAIL IGNORED <m_d_beger_1900@yahoo.com> writes:

>I have downloaded ISAAC. I am modifying the code for
>my purpose, but not changing the algorithm. I have
>examined the code, especiallt the C++ version, and I
>have some questions.Thanks in advance for your
>advice.

>I observed:

> With T either uint32_t or uint64_t,
> the state consists of:
> T randcnt;
> T* randrsl;
> T* randmem;
> T randa;
> T randb;
> T randc;
>
> The values that are supplied for initialization are:
> T* randrsl; // vector
> T randa; // scalar
> T randb; // scalar
> T randc; // scalar

> public initialization:
> constructor:
> scalars are specified
> vector is set to 0
> randinit
> it looks a lot like this should not be public
> srand
> scalars are set as specified
> vector is set as specified

>Questions:

> 1. It is not possible to set the scalars
> without providing a (possibly 0) vector.
> Is there a reason for this?

> 2. Noting that the constructor does not
> allow specification of the vector, is
> specification of the vector important
> to good performance?

> 3. Is there any guidance on how to initialize
> either the scalars or the vector?

> 4. Remembering that I intend to save restore
> from a disk file, I assume that the entire
> state as specified above is required. Is
> this correct? Is there anything that can
> be ignored to save disk time?

The amount is so small that the reading of the stuff from the disk is
probably a tiny fraction of the disk seek time. Why would it save disk
time?

> 5. After I restore from the disk, I will not
> do any of the initialization mentioned
> above. Clearly, another constructor will
> be required to avoid the initialization.
> Is there any problem with this?

This is the problem with trying to alter in such a fundamental way a
program written with completely different assumptions in mind. Ie, you will
have to go carefully through everything to see whether there are
initialisations by assumption going on.

> 6. In some cases, after restoration, I will
> want to inject some "true randomness",
> probably using the time of occurance of
> some external event. This would probably
> be 4 or 8 bytes of information. I could
> xor or substitute some value. What value
> should I change? Should I call something,
> possibly isaac(randctx*)after the change?

Again, why are you doing this?

> 7. Just out of curiosity, how were the magic
> numbers determined?

>Thanks again for your help.

>Mike.



Relevant Pages

  • 86-DOS Lives
    ... Any raw or blown disk may be formatted ... Each may only be used with 8" and 5" drives, ... INIT does a single density initialization on drives A to D. ... DINIT does a double density initialization on drives A to D. Since ...
    (comp.os.cpm)
  • Re: How to speed up WinCE 6.00 boot
    ... I suppose you are using a FAL+FMD disk. ... I experienced this slowness on the initialization of a 1GB NAND-based disk on an i.MX31 machine, and it could take several minutes for the routine to complete! ... but finally wrote a CE 6.0 implementation of our own private disk driver for NAND Flash, which performed quite well for this task. ... When the Nand Flash file system is empty, the board start quickly but as ...
    (microsoft.public.windowsce.platbuilder)
  • Re: which PC
    ... at least on a unix based system. ... initialization files, and the result of everything is ... aware of in the way of disk activity, ... need to be concerned with defragging a disk. ...
    (rec.photo.digital)
  • Re: modifying ISAAC, a pseudo-random number generator
    ... >> those memory locations will certainly have changed. ... >> The amount is so small that the reading of the stuff from the disk is ... >> probably a tiny fraction of the disk seek time. ... As a general rule of newsnet posts, giving a complete description of the ...
    (sci.crypt)
  • Re: modifying ISAAC, a pseudo-random number generator
    ... > I know I know.I am harping. ... Thanks for the suggestion. ... > those memory locations will certainly have changed. ... > probably a tiny fraction of the disk seek time. ...
    (sci.crypt)