r25660: Add a new interface 'generate_secret_buffer()', to be used when we
authorAndrew Bartlett <abartlet@samba.org>
Mon, 15 Oct 2007 23:27:15 +0000 (01:27 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:43:03 +0000 (05:43 +0100)
commit6554433fc227baab93398576db703c91db1541f2
tree13437d4d9377c247afa30e4cb946b11a7c98c01c
parent1eaefd15cb7ad20165ea4c754535986b642e24f0
r25660: Add a new interface 'generate_secret_buffer()', to be used when we

require top-quality entropy.  We don't want to waste system enropy
generating challenges (which simply need to be unpredictable, not
secret) or when generating UUIDs.

Rework generate_random_buffer() to use /dev/urandom less often, only
to seed the existing RC4 based PRNG.  (With an exception to ensure we
don't waste this setup cost for very small entropy requests).

Perhaps we should be using heimdal's code for this instead?

This should drasticly reduce our entropy use, particularly in the
build farm (automated Samba build on hosts without much other source
of entropy).

Andrew Bartlett
(This used to be commit 6a5630d37191542022f02fae519227b7829ef620)
source4/auth/ntlmssp/ntlmssp_client.c
source4/lib/util/genrand.c
source4/lib/util/util.h