From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nix Newsgroups: gmane.emacs.devel Subject: Re: random doesn't feel very random Date: Tue, 04 Sep 2012 20:19:13 +0100 Message-ID: <87392xmw9a.fsf@spindle.srvr.nix> References: <876288yh72.fsf@kanis.fr> <87wr0livd4.fsf@Rainer.invalid> <83k3wfqtyx.fsf@gnu.org> <83vcfzosri.fsf@gnu.org> <5041626B.6080608@cs.ucla.edu> <87harirz13.fsf@Rainer.invalid> <50420B53.4030006@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346786376 10562 80.91.229.3 (4 Sep 2012 19:19:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2012 19:19:36 +0000 (UTC) Cc: Achim Gratz , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 04 21:19:38 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8yet-0002oW-BF for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2012 21:19:35 +0200 Original-Received: from localhost ([::1]:50471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8yeq-0001Db-Bv for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2012 15:19:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8yem-000166-KB for emacs-devel@gnu.org; Tue, 04 Sep 2012 15:19:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8yel-0002t5-EW for emacs-devel@gnu.org; Tue, 04 Sep 2012 15:19:28 -0400 Original-Received: from icebox.esperi.org.uk ([81.187.191.129]:42968 helo=mail.esperi.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8yel-0002rx-2O for emacs-devel@gnu.org; Tue, 04 Sep 2012 15:19:27 -0400 Original-Received: from spindle.srvr.nix (nix@spindle.srvr.nix [192.168.14.15]) by mail.esperi.org.uk (8.14.5/8.14.5) with ESMTP id q84JJDle012044; Tue, 4 Sep 2012 20:19:13 +0100 Emacs: resistance is futile; you will be assimilated and byte-compiled. In-Reply-To: <50420B53.4030006@cs.ucla.edu> (Paul Eggert's message of "Sat, 01 Sep 2012 06:19:15 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-DCC-dcc1-Metrics: spindle 1182; Body=3 Fuz1=3 Fuz2=3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 81.187.191.129 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153013 Archived-At: On 1 Sep 2012, Paul Eggert told this: > On 09/01/2012 12:19 AM, Achim Gratz wrote: >> On systems having a better source of entropy (like >> /dev/urandom), the init value should be taken from that source rather >> than the "mix PID with current time" hack. > > This is on my list of things to do, as a gnulib project. > Among other things, I plan to use the RDRAND instruction > available on current Intel processors, as that's much > faster and better than /dev/urandom. ... except if your /dev/urandom is seeded from some other hardware source. This is fairly often true, as such sources are available very cheaply nowadays. Since /dev/urandom is Linux-specific, and since the Linux kernel already has patches upstream to use RDRAND to supply randomness (but *not* entropy-estimate) to /dev/urandom, I'd recommend using /dev/urandom unconditionally, certainly for rare seeding operations like this where the cost of a kernel ring transition is insignificant. Let the OS do this stuff, it's what it's for. -- NULL && (void)