Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Good random number source in oracle
if you are using sysdate, recall that sysdate gets down to milliseconds...what is the likelyhood that anyone would know the precise value of time wrt milliseconds when the function actually received a value from the system clock? you can use the low end of the systdate squared and then modified further...etc etc
"Peter J. Holzer" <hjp_at_enkur.wsr.ac.at> wrote in message
news:slrn9e8iid.g2j.hjp_at_enkur.wsr.ac.at...
> I have a stored procedure which generates random passwords. Currently
> dbms_random.initialize is called with a value computed from sysdate.
> Of course this isn't very random, so if somebody knows the algorithm and
> the (approximate) time when a password was created, he can easily
> compute the password. So I am looking for values which can be used as
> "real" random number sources, I.e. values which change often and cannot
> be guessed with sufficient accuracy from the outside. Things like number
> of sessions, bytes read or written since last startup, etc.
>
> Any suggestions? (Apart from using dbms_pipe to call a script which
> reads /dev/random - I am aware of that possibility).
>
> Also I am interested in the internal workings of the dbms_random package
> (what kind of RNG it uses, etc.) Any pointers would be appreciated.
>
> hp
>
> --
> _ | Peter J. Holzer | It's nice to fix problems by accident.
> |_|_) | Sysadmin WSR / LUGA | -- Theo de Raadt
> | | | hjp_at_wsr.ac.at | <deraadt_at_CVS.OPENBSD.ORG>
> __/ | http://www.hjp.at/ | on bugtraq 2001-03-19
Received on Mon Apr 23 2001 - 12:46:40 CDT