BeeCrypt 4.2.1
fips186.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1998, 1999, 2000, 2001, 2002 X-Way Rights BV
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 */
19
26#ifndef _FIPS186_H
27#define _FIPS186_H
28
29#include "beecrypt/beecrypt.h"
30
31#ifdef _REENTRANT
32# if WIN32
33# include <windows.h>
34# include <winbase.h>
35# endif
36#endif
37
38#include "beecrypt.h"
39#include "sha1.h"
40
41#if (MP_WBITS == 64)
42# define FIPS186_STATE_SIZE 8
43#elif (MP_WBITS == 32)
44# define FIPS186_STATE_SIZE 16
45#else
46# error
47#endif
48
51#ifdef __cplusplus
53#else
54struct _fips186Param
55#endif
56{
57 #ifdef _REENTRANT
58 bc_mutex_t lock;
59 #endif
62 byte digest[20];
63 unsigned char digestremain;
64};
65
66#ifndef __cplusplus
67typedef struct _fips186Param fips186Param;
68#endif
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73
75
79int fips186Seed (fips186Param*, const byte*, size_t);
81int fips186Next (fips186Param*, byte*, size_t);
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
#define BEECRYPTAPI
Definition: api.h:52
uint32_t mpw
Definition: api.h:94
BeeCrypt API, headers.
int fips186Setup(fips186Param *)
int fips186Next(fips186Param *, byte *, size_t)
int fips186Cleanup(fips186Param *)
const randomGenerator fips186prng
int fips186Seed(fips186Param *, const byte *, size_t)
#define FIPS186_STATE_SIZE
Definition: fips186.h:44
pthread_mutex_t bc_mutex_t
Definition: gnu.h:46
SHA-1 hash function, headers.
Definition: fips186.h:56
sha1Param param
Definition: fips186.h:60
unsigned char digestremain
Definition: fips186.h:63
This struct holds information and pointers to code specific to each pseudo-random number generator.
Definition: beecrypt.h:165
Holds all the parameters necessary for the SHA-1 algorithm.
Definition: sha1.h:40