diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | rand.c | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -1,5 +1,9 @@ 2011-12-21 Kaz Kylheku <kaz@kylheku.com> + * rand.c: Added comment about source of algorithm. + +2011-12-21 Kaz Kylheku <kaz@kylheku.com> + * rand.c (random): Bugfix: not building up sufficiently large bignums. Work properly when mp_digit is smaller than 32 bits. @@ -49,6 +49,10 @@ typedef unsigned int rand32_t; typedef unsigned long rand32_t; #endif +/* + * The algorithm here is WELL 512. + * (Francois Panneton, Pierre L'Ecuyer.) + */ struct random_state { rand32_t state[16]; int cur; |