From 0a7dbd059bbbf2985ccd8686985019ee2effa212 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 25 Apr 2010 16:26:10 +0200 Subject: [PATCH] use /dev/urandom --- d0_bignum-gmp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/d0_bignum-gmp.c b/d0_bignum-gmp.c index 93bf0f7..2641449 100644 --- a/d0_bignum-gmp.c +++ b/d0_bignum-gmp.c @@ -37,7 +37,9 @@ void d0_bignum_INITIALIZE(void) d0_bignum_init(&temp); gmp_randinit_mt(RANDSTATE); gmp_randseed_ui(RANDSTATE, time(NULL)); - f = fopen("/dev/random", "rb"); + f = fopen("/dev/urandom", "rb"); + if(!f) + f = fopen("/dev/random", "rb"); if(f) { unsigned char buf[256]; -- 2.39.2