#include "system.h"
#include "beecrypt.h"
#include "mtprng.h"
#include "mp32opt.h"
#include "mp32.h"
#include "debug.h"
Go to the source code of this file.
Defines | |
#define | hiBit(a) ((a) & 0x80000000) |
#define | loBit(a) ((a) & 0x1) |
#define | loBits(a) ((a) & 0x7FFFFFFF) |
#define | mixBits(a, b) (hiBit(a) | loBits(b)) |
Functions | |
void | mtprngReload (mtprngParam *mp) |
int | mtprngSetup (mtprngParam *mp) |
int | mtprngSeed (mtprngParam *mp, const uint32 *data, int size) |
int | mtprngNext (mtprngParam *mp, uint32 *data, int size) |
int | mtprngCleanup (mtprngParam *mp) |
Variables | |
const randomGenerator | mtprng = { "Mersenne Twister", sizeof(mtprngParam), (randomGeneratorSetup) mtprngSetup, (randomGeneratorSeed) mtprngSeed, (randomGeneratorNext) mtprngNext, (randomGeneratorCleanup) mtprngCleanup } |
Developed by Makoto Matsumoto and Takuji Nishimura
For more information, see: http://www.math.keio.ac.jp/~matumoto/emt.html
Adapted from optimized code by Shawn J. Cokus <cokus@math.washington.edu>
Note: this generator has a very long period, passes statistical test, but needs more study to determine whether it is cryptographically strong enough.
Definition in file mtprng.c.
|
|
|
Definition at line 46 of file mtprng.c. Referenced by mtprngReload. |
|
|
|
Definition at line 48 of file mtprng.c. Referenced by mtprngReload. |
|
|
|
Definition at line 161 of file mtprng.c. References mtprngParam::left, mtprngReload, mtprngParam::nextw, and uint32. |
|
Definition at line 57 of file mtprng.c. References K, loBit, M, mixBits, N, and uint32. Referenced by mtprngNext. |
|
Definition at line 108 of file mtprng.c. References mp32copy, N, mtprngParam::state, and uint32. |
|
Definition at line 77 of file mtprng.c. References entropyGatherNext, mtprngParam::left, N, and mtprngParam::state. |
|
|