projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
143cde2
)
improve weak random generator
author
Christian Grothoff
<christian@grothoff.org>
Wed, 26 Jan 2011 08:23:34 +0000
(08:23 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Wed, 26 Jan 2011 08:23:34 +0000
(08:23 +0000)
src/util/crypto_random.c
patch
|
blob
|
history
diff --git
a/src/util/crypto_random.c
b/src/util/crypto_random.c
index 6228174927a8f8eafba036e5014c7191ef70bc16..5928b96ea7bffacdfb2e99c1ef708c00752548c5 100644
(file)
--- a/
src/util/crypto_random.c
+++ b/
src/util/crypto_random.c
@@
-256,7
+256,6
@@
killfind ()
void __attribute__ ((constructor)) GNUNET_CRYPTO_random_init ()
{
- SRANDOM (time (NULL));
gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
if (!gcry_check_version (GCRYPT_VERSION))
{
@@
-271,6
+270,7
@@
void __attribute__ ((constructor)) GNUNET_CRYPTO_random_init ()
#endif
gcry_set_progress_handler (&entropy_generator, NULL);
atexit (&killfind);
+ SRANDOM (time (NULL) ^ GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX));
}