The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions
isaac.c File Reference

Bob Jenkin's random number generator. More...

#include <freeradius-devel/util/rand.h>
+ Include dependency graph for isaac.c:

Go to the source code of this file.

Macros

#define ind(mm, x)   ((mm)[(x >> 2) &(RANDSIZ-1)])
 
#define mix(a, b, c, d, e, f, g, h)
 
#define RANDSIZ   (1 << RANDSIZL)
 
#define RANDSIZL   (8) /* I recommend 8 for crypto, 4 for simulations */
 
#define rngstep(mix, a, b, mm, m, m2, r, x)
 

Functions

void fr_isaac (fr_randctx *ctx)
 
void fr_isaac_init (fr_randctx *ctx, int flag)
 

Detailed Description

Bob Jenkin's random number generator.

Bob's random number generator, ISAAC. Public Domain.

    http://burtleburtle.net/bob/rand/isaac.html
Author
Bob Jenkins.

Definition in file isaac.c.

Macro Definition Documentation

◆ ind

#define ind (   mm,
 
)    ((mm)[(x >> 2) &(RANDSIZ-1)])

Definition at line 18 of file isaac.c.

◆ mix

#define mix (   a,
  b,
  c,
  d,
  e,
  f,
  g,
 
)
Value:
do { \
a ^= b << 11; d += a; b += c; \
b ^= c >> 2; e += b; c += d; \
c ^= d << 8; f += c; d += e; \
d ^= e >> 16; g += d; e += f; \
e ^= f << 10; h += e; f += g; \
f ^= g >> 4; a += f; g += h; \
g ^= h << 8; b += g; h += a; \
h ^= a >> 9; c += h; a += b; \
} while (0)

Definition at line 72 of file isaac.c.

◆ RANDSIZ

#define RANDSIZ   (1 << RANDSIZL)

Definition at line 16 of file isaac.c.

◆ RANDSIZL

#define RANDSIZL   (8) /* I recommend 8 for crypto, 4 for simulations */

Definition at line 15 of file isaac.c.

◆ rngstep

#define rngstep (   mix,
  a,
  b,
  mm,
  m,
  m2,
  r,
 
)
Value:
do { \
x = *m; \
a = ((a^(mix)) + *(m2++)) & 0xffffffff; \
*(m++) = y = (ind(mm, x) + a + b) & 0xffffffff; \
*(r++) = b = (ind(mm, y >> RANDSIZL) + x) & 0xffffffff; \
} while (0)
size_t y
Definition: dbuff.c:67
#define RANDSIZL
Definition: isaac.c:15
#define ind(mm, x)
Definition: isaac.c:18
#define mix(a, b, c, d, e, f, g, h)
Definition: isaac.c:72

Definition at line 19 of file isaac.c.

Function Documentation

◆ fr_isaac()

void fr_isaac ( fr_randctx ctx)

Definition at line 46 of file isaac.c.

+ Here is the caller graph for this function:

◆ fr_isaac_init()

void fr_isaac_init ( fr_randctx ctx,
int  flag 
)

Definition at line 85 of file isaac.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: