Main Page Modules Data Structures File List Data Fields Globals Related Pages

# beecrypt/fips186.c File Reference

NIST FIPS-186 pseudo-random generator, code. More...

`#include "system.h"`
`#include "beecrypt.h"`
`#include "fips186.h"`
`#include "mp32opt.h"`
`#include "mp32.h"`
`#include "debug.h"`

Go to the source code of this file.

## Functions

int | fips186init (register sha1Param *p)
int | fips186Setup (fips186Param *fp)
int | fips186Seed (fips186Param *fp, const uint32 *data, int size)
int | fips186Next (fips186Param *fp, uint32 *data, int size)
int | fips186Cleanup (fips186Param *fp)

## Variables

uint32 | fips186hinit [5] = { 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0, 0x67452301 }
const randomGenerator | fips186prng = { "FIPS 186", sizeof(fips186Param), (const randomGeneratorSetup) fips186Setup, (const randomGeneratorSeed) fips186Seed, (const randomGeneratorNext) fips186Next, (const randomGeneratorCleanup) fips186Cleanup }

## Detailed Description

NIST FIPS-186 pseudo-random generator, code.

Definition in file fips186.c.

## Function Documentation

int fips186Cleanup | ( | fips186Param * | fp | ) |

| Definition at line 195 of file fips186.c.

int fips186init | ( | register sha1Param * | p | ) | `[static]`

| Definition at line 47 of file fips186.c. References fips186hinit, and mp32copy. Referenced by fips186Next.

int fips186Next | ( | fips186Param * | fp,
|  | uint32 * | data,
|  | int | size
| ) |

| Definition at line 129 of file fips186.c. References sha1Param::data, fips186Param::digestsize, FIPS186_STATE_SIZE, fips186init, sha1Param::h, mp32addw, mp32addx, mp32copy, fips186Param::param, sha1Process, fips186Param::state, and uint32.

int fips186Seed | ( | fips186Param * | fp,
|  | const uint32 * | data,
|  | int | size
| ) |

| Definition at line 85 of file fips186.c. References FIPS186_STATE_SIZE, mp32addx, fips186Param::state, and uint32.

int fips186Setup | ( | fips186Param * | fp | ) |

| Definition at line 55 of file fips186.c. References fips186Param::digestsize, entropyGatherNext, FIPS186_STATE_SIZE, and fips186Param::state.

## Variable Documentation

uint32 fips186hinit[5] = { 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0, 0x67452301 }`[static]`

| Definition at line 38 of file fips186.c. Referenced by fips186init.

const randomGenerator fips186prng = { "FIPS 186", sizeof(fips186Param), (const randomGeneratorSetup) fips186Setup, (const randomGeneratorSeed) fips186Seed, (const randomGeneratorNext) fips186Next, (const randomGeneratorCleanup) fips186Cleanup }

| Definition at line 41 of file fips186.c.