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 2, or (at your option)
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, write to the Free Software Foundation,
18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 Written by Colin Plumb. */
27 /* Size of the state tables to use. ISAAC_LOG should be at least 3,
28 and smaller values give less security. */
30 # define ISAAC_WORDS (1 << ISAAC_LOG)
31 # define ISAAC_BYTES (ISAAC_WORDS * sizeof (uint32_t))
33 /* RNG state variables. The members of this structure are private. */
36 uint32_t mm
[ISAAC_WORDS
]; /* Main state array */
37 uint32_t iv
[8]; /* Seeding initial vector */
38 uint32_t a
, b
, c
; /* Extra index variables */
41 void isaac_seed (struct isaac_state
*);
42 void isaac_refill (struct isaac_state
*, uint32_t[ISAAC_WORDS
]);