1 /* Bob Jenkins's cryptographic random number generator, ISAAC.
3 Copyright (C) 1999-2005 Free Software Foundation, Inc.
4 Copyright (C) 1997, 1998, 1999 Colin Plumb.
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 Written by Colin Plumb. */
26 /* Size of the state tables to use. ISAAC_LOG should be at least 3,
27 and smaller values give less security. */
29 # define ISAAC_WORDS (1 << ISAAC_LOG)
30 # define ISAAC_BYTES (ISAAC_WORDS * sizeof (uint32_t))
32 /* RNG state variables. The members of this structure are private. */
35 uint32_t mm
[ISAAC_WORDS
]; /* Main state array */
36 uint32_t iv
[8]; /* Seeding initial vector */
37 uint32_t a
, b
, c
; /* Extra index variables */
40 void isaac_seed (struct isaac_state
*);
41 void isaac_refill (struct isaac_state
*, uint32_t[ISAAC_WORDS
]);