Bug#448775: Uses too much entropy (Debian Bug #343085)
wk at gnupg.org
Fri Jan 4 16:46:55 CET 2008
On Fri, 4 Jan 2008 15:16, simon at josefsson.org said:
> gnutls_set_random_seed_file (const char *filename);
I don't think that is a good idea. gnutls does not provide the required
thread hook function for libgcrypt and thus the appliaction needs to do
this. If you want these functions you should also add the threading
Another problem is that if gnutls is used indirectly no seed file is
used and thus the appliaction needs to do it anyway. The seed file
should be application specific and not library specific. Thus I suggest
to document this and change the application.
> However, when is it useful for an application to save the seed? Is it
> useful to do this often, or only when the process exits?
Only at exit. In theory libgcrypt could do this automagically, but
installing atexit handlers in libaries should in general be avoided.
> Isn't it more reliable to never save the seed file, but to have a cron
> job to generate a new seed file that can be run every other week or so?
No, no. This is specific to libgcrypt and only the libgcrypt process
may create it. The format and size may change without notice.
> There is also the problem if something other than gnutls has already
> initialized libgcrypt. This could happen if exim links to some other
> library that uses libgcrypt, for example, a LDAP or database library,
> which gets initialized before. I'm not sure what we can do about this
> situation. I also dislike global functions like this.
You can't do anything about it unless you turn gnutls into an RPC
server so that it has its own process.
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.
More information about the Gnutls-devel