Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Nov 2014 21:21:52 +0000 (UTC)
From: jb <>
Subject: Re: random number generators - rand(), random(), etc

Michal Zalewski <lcamtuf@...> writes:

> >
> In general, rand() and random() are not backed by cryptosafe PRNGs and
> should not be used for security purposes.
> /mz

Well, rand() in Linux and ISO C standard are not threadsafe, but random(),
srandom(), etc in Linux are claimed to be threadsafe:

- pthread(7) - the function random() is listed as threadsafe
- random(3)
  Multithreading (see pthreads(7))
       The random(), srandom(),  initstate(),  and  setstate()  functions  are

But apparently they are not.

A problem ?


Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.