emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should Emacs provide a uuid function?


From: Ted Zlatanov
Subject: Re: Should Emacs provide a uuid function?
Date: Mon, 09 May 2011 10:27:53 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Mon, 09 May 2011 11:09:24 -0400 Chong Yidong <address@hidden> wrote: 

CY> I'm not sure we should introduce a separate function, though.  It makes
CY> more sense to improve the existing `random' primitive, making it return
CY> a random number (via /dev/random or /dev/urandom or GnuTLS) rather than
CY> a pseudo-random number when possible.

On Mon, 09 May 2011 14:35:40 +0300 Eli Zaretskii <address@hidden> wrote: 

>> From: Ted Zlatanov <address@hidden>
>> 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.

EZ> 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?

EZ> It is enabled, but it isn't guaranteed to be present.  It isn't a good
EZ> idea, IMO, to have features unrelated to gnutls depend on it being
EZ> available.

Random number generation is implemented very well in GnuTLS, though
(cryptographers care about randomness more than almost anyone else).

Maybe we should make GnuTLS a source of random numbers together with a
slower ELisp version when GnuTLS is not available?  That would work for
everyone, I think.

Ted




reply via email to

[Prev in Thread] Current Thread [Next in Thread]