From: Harry Ohlsen Date: 2003-07-31T05:59:10+09:00 Subject: Re: Generating random numbers? On Thu, 31 Jul 2003 06:28, Josef 'Jupp' Schugt wrote: > Saluton! > > * Harry Ohlsen; 2003-07-28, 21:35 UTC: > > Can someone remind me of the name for the class/method for > > generating random numbers? > > Nobody did ask this so far: What kind of random numbers do you need > and for what purpose. That's a good question. I'm no statistics guru, so I probably don't really know :-). However, I'm guessing that uniformly distributed is probably fine, which I think is what rand() tries to generate. What I'm using them for is to try to find a generator in Z_n. I plan to do some experimentation to see whether doing it that way (there's a little more to the approach, but it's basically random) compared to using brute force (ie, checking the order of 2, 3, ... until we find one that's phi(n)). > Ruby's RNG may be nice for Monte Carlo simulations (because it has a > very large period) but it is NOT SECURE for CRYPTOGRAPHY as it is. Thanks. It might be good for my experiment. I'll take a look. Harry O.