From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Should Emacs provide a uuid function? Date: Mon, 09 May 2011 14:35:40 +0300 Message-ID: <8339kojecz.fsf@gnu.org> References: <87ipu3v0ru.fsf@stupidchicken.com> <871v0raqub.fsf@uwakimon.sk.tsukuba.ac.jp> <42A7030B-DE0C-4CCA-A768-B82BE70C42F9@raeburn.org> <87liyynm6a.fsf@stupidchicken.com> <83aaewjq1x.fsf@gnu.org> <8739kocfjt.fsf@lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1304940953 14457 80.91.229.12 (9 May 2011 11:35:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 May 2011 11:35:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 09 13:35:48 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QJOkd-0003Am-BZ for ged-emacs-devel@m.gmane.org; Mon, 09 May 2011 13:35:47 +0200 Original-Received: from localhost ([::1]:43287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJOkc-00086O-TI for ged-emacs-devel@m.gmane.org; Mon, 09 May 2011 07:35:46 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJOka-00086I-F5 for emacs-devel@gnu.org; Mon, 09 May 2011 07:35:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJOkZ-0001BU-8A for emacs-devel@gnu.org; Mon, 09 May 2011 07:35:44 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:38231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJOkZ-0001B1-1l for emacs-devel@gnu.org; Mon, 09 May 2011 07:35:43 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LKX00100EQW6P00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 09 May 2011 14:35:40 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.234.175]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LKX000UYEVDTM20@a-mtaout20.012.net.il>; Mon, 09 May 2011 14:35:39 +0300 (IDT) In-reply-to: <8739kocfjt.fsf@lifelogs.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 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:139246 Archived-At: > From: Ted Zlatanov > Date: Mon, 09 May 2011 05:51:50 -0500 > > On Mon, 09 May 2011 10:23:06 +0300 Eli Zaretskii wrote: > > EZ> Feh. Using platform-dependent interfaces in Lisp is not the Emacs > EZ> way, in my book. How about a primitive which would read from > EZ> /dev/random or /dev/urandom if they are available, or use other > EZ> methods if they are not? > ... > EZ> This all will be avoided if we instead provide a primitive that will > EZ> both hide system-dependent stuff and avoid the need to teach > EZ> insert-file-contents about this special device. > > GnuTLS has facilities for this, using /dev/*random and the Yarrow > algorithm from libnettle. Look at lib/nettle/rnd.c > http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=tree;f=lib/nettle;hb=HEAD > for the `do_trivia_source' and `do_device_source' functions. Yes, I meant to use on Windows the 2 APIs that rnd.c uses. > Since GnuTLS is enabled by default in Emacs 24 maybe we can rely on that > functionality instead of writing it anew? It is enabled, but it isn't guaranteed to be present. It isn't a good idea, IMO, to have features unrelated to gnutls depend on it being available.