summaryrefslogtreecommitdiff
path: root/src/librandom
diff options
context:
space:
mode:
Diffstat (limited to 'src/librandom')
-rw-r--r--src/librandom/random_init.c4
-rw-r--r--src/librandom/random_makeseed.c4
2 files changed, 1 insertions, 7 deletions
diff --git a/src/librandom/random_init.c b/src/librandom/random_init.c
index 72671df..cd880e8 100644
--- a/src/librandom/random_init.c
+++ b/src/librandom/random_init.c
@@ -47,11 +47,7 @@ int random_fd = -1 ;
int random_init ()
{
- char seed[160] ;
if (random_fd >= 0) return 1 ;
- random_makeseed(seed) ;
- surf_init(&surf_here, seed) ;
- openwritenclose_unsafe("/dev/urandom", seed, 160) ;
random_fd = openc_readb("/dev/urandom") ;
return random_fd >= 0 ;
}
diff --git a/src/librandom/random_makeseed.c b/src/librandom/random_makeseed.c
index c15ad5a..9c518cf 100644
--- a/src/librandom/random_makeseed.c
+++ b/src/librandom/random_makeseed.c
@@ -9,9 +9,7 @@
/*
Writes 160 bytes of crap into s.
Certainly not cryptographically secure or 100% unpredictable,
- but we're only using this to help shuffle the entropy of
- /dev/urandom or to init an internal SURF PRNG.
- iow: we are CS iff the system's RNG is CS.
+ but we're only using this to seed an internal PRNG.
*/
void random_makeseed (char *s)