beecrypt.h   beecrypt.h 
/* /*
* beecrypt.h * beecrypt.h
* *
* Beecrypt library hooks & stubs, header * BeeCrypt library hooks & stubs, header
* *
* Copyright (c) 1999, 2000, 2001 Virtual Unlimited B.V. * Copyright (c) 1999, 2000, 2001 Virtual Unlimited B.V.
* *
* Author: Bob Deblier <bob@virtualunlimited.com> * Author: Bob Deblier <bob@virtualunlimited.com>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * version 2.1 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
*
*/ */
#ifndef _BEECRYPT_H #ifndef _BEECRYPT_H
#define _BEECRYPT_H #define _BEECRYPT_H
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include "memchunk.h"
#include "mp32number.h" #include "mp32number.h"
typedef struct
{
int size;
byte* data;
} memchunk;
/* /*
* Entropy Sources * Entropy Sources
*/ */
typedef int (*entropyNext)(uint32*, int); typedef int (*entropyNext)(uint32*, int);
/* /*
* The struct 'entropySource' holds information and pointers to code specif ic * The struct 'entropySource' holds information and pointers to code specif ic
* to each entropy source. Each specific entropy source MUST be written to be * to each entropy source. Each specific entropy source MUST be written to be
* multithread-safe. * multithread-safe.
skipping to change at line 93 skipping to change at line 89
BEEDLLAPI BEEDLLAPI
int entropySourceCount(); int entropySourceCount();
BEEDLLAPI BEEDLLAPI
const entropySource* entropySourceGet(int); const entropySource* entropySourceGet(int);
BEEDLLAPI BEEDLLAPI
const entropySource* entropySourceFind(const char*); const entropySource* entropySourceFind(const char*);
BEEDLLAPI BEEDLLAPI
const entropySource* entropySourceDefault(); const entropySource* entropySourceDefault();
/*
* The following function can try multiple entropy sources for gathering
* the requested amount. It will only try multiple sources if variable
* BEECRYPT_ENTROPY is not set.
*/
BEEDLLAPI
int entropyGatherNext(uint32*, i
nt);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/* /*
* Pseudo-random Number Generators * Pseudo-random Number Generators
*/ */
typedef void randomGeneratorParam; typedef void randomGeneratorParam;
skipping to change at line 305 skipping to change at line 309
} }
#endif #endif
/* /*
* The struct 'hashFunctionContext' is used to contain both the functional * The struct 'hashFunctionContext' is used to contain both the functional
* part (the hashFunction), and its parameters. * part (the hashFunction), and its parameters.
*/ */
typedef struct typedef struct
{ {
const hashFunction* hash; const hashFunction* algo;
hashFunctionParam* param; hashFunctionParam* param;
} hashFunctionContext; } hashFunctionContext;
/* /*
* The following functions can be used to initialize and free a * The following functions can be used to initialize and free a
* hashFunctionContext. Initializing will allocate a buffer of the size * hashFunctionContext. Initializing will allocate a buffer of the size
* required by the hashFunction, freeing will deallocate that buffer. * required by the hashFunction, freeing will deallocate that buffer.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
skipping to change at line 444 skipping to change at line 448
} }
#endif #endif
/* /*
* The struct 'keyedHashFunctionContext' is used to contain both the functi onal * The struct 'keyedHashFunctionContext' is used to contain both the functi onal
* part (the keyedHashFunction), and its parameters. * part (the keyedHashFunction), and its parameters.
*/ */
typedef struct typedef struct
{ {
const keyedHashFunction* hash; const keyedHashFunction* algo;
keyedHashFunctionParam* param; keyedHashFunctionParam* param;
} keyedHashFunctionContext; } keyedHashFunctionContext;
/* /*
* The following functions can be used to initialize and free a * The following functions can be used to initialize and free a
* keyedHashFunctionContext. Initializing will allocate a buffer of the siz e * keyedHashFunctionContext. Initializing will allocate a buffer of the siz e
* required by the keyedHashFunction, freeing will deallocate that buffer. * required by the keyedHashFunction, freeing will deallocate that buffer.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
skipping to change at line 600 skipping to change at line 604
} }
#endif #endif
/* /*
* The struct 'blockCipherContext' is used to contain both the functional * The struct 'blockCipherContext' is used to contain both the functional
* part (the blockCipher), and its parameters. * part (the blockCipher), and its parameters.
*/ */
typedef struct typedef struct
{ {
const blockCipher* ciph; const blockCipher* algo;
blockCipherParam* param; blockCipherParam* param;
} blockCipherContext; } blockCipherContext;
/* /*
* The following functions can be used to initialize and free a * The following functions can be used to initialize and free a
* blockCipherContext. Initializing will allocate a buffer of the size * blockCipherContext. Initializing will allocate a buffer of the size
* required by the blockCipher, freeing will deallocate that buffer. * required by the blockCipher, freeing will deallocate that buffer.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 8 change blocks. 
10 lines changed or deleted 15 lines changed or added


 blockpad.h   blockpad.h 
skipping to change at line 36 skipping to change at line 36
#ifndef _BLOCKPAD_H #ifndef _BLOCKPAD_H
#define _BLOCKPAD_H #define _BLOCKPAD_H
#include "beecrypt.h" #include "beecrypt.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
BEEDLLAPI BEEDLLAPI
int pkcs5PadInline (int, memchunk*); memchunk* pkcs5Pad (int, memchunk*);
BEEDLLAPI BEEDLLAPI
int pkcs5UnpadInline(int, memchunk*); memchunk* pkcs5Unpad(int, memchunk*);
BEEDLLAPI BEEDLLAPI
memchunk* pkcs5Pad (int, const memchunk*); memchunk* pkcs5PadCopy (int, const memchunk*);
BEEDLLAPI BEEDLLAPI
memchunk* pkcs5Unpad(int, const memchunk*); memchunk* pkcs5UnpadCopy(int, const memchunk*);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 blowfishopt.h   blowfishopt.h 
skipping to change at line 47 skipping to change at line 47
# if defined(_MSC_VER) && defined(_M_IX86) # if defined(_MSC_VER) && defined(_M_IX86)
# define ASM_BLOWFISHENCRYPT # define ASM_BLOWFISHENCRYPT
# define ASM_BLOWFISHDECRYPT # define ASM_BLOWFISHDECRYPT
# elif __INTEL__ && __MWERKS__ # elif __INTEL__ && __MWERKS__
# define ASM_BLOWFISHENCRYPT # define ASM_BLOWFISHENCRYPT
# define ASM_BLOWFISHDECRYPT # define ASM_BLOWFISHDECRYPT
# endif # endif
#endif #endif
#if defined(__GNUC__) #if defined(__GNUC__)
#if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) # if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686)
#define ASM_BLOWFISHENCRYPT # define ASM_BLOWFISHENCRYPT
#define ASM_BLOWFISHDECRYPT # define ASM_BLOWFISHDECRYPT
#endif # endif
#endif #endif
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) #if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686)
#define ASM_BLOWFISHENCRYPT #define ASM_BLOWFISHENCRYPT
#define ASM_BLOWFISHDECRYPT #define ASM_BLOWFISHDECRYPT
#endif #endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added


 config.gnu.h   config.gnu.h 
/* gnu/config.gnu.h. Generated automatically by configure. */ /* config.gnu.h. Generated automatically by configure. */
/* config.gnu.h.in. Generated automatically from configure.in by autoheade
r. */
/* /*
* config.gnu.h.in * acconfig.h
* *
* Autoconf config.gnu.h template * acconfig.h pre-announces symbols defines by configure.in
* *
* Copyright (c) 1999-2000 Virtual Unlimited B.V. * Copyright (c) 2001 Virtual Unlimited B.V.
* *
* Author: Bob Deblier <bob@virtualunlimited.com> * Author: Bob Deblier <bob@virtualunlimited.com>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * version 2.1 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
* *
*/ */
#ifndef _CONFIG_GNU_H
#define _CONFIG_GNU_H
#ifndef _REENTRANT #ifndef _REENTRANT
#define _REENTRANT #define _REENTRANT
#endif #endif
#define PACKAGE "beecrypt"
#define VERSION "2.1.0"
#define AIX 0
#define BEOS 0
#define CYGWIN 0
#define DARWIN 0
#define FREEBSD 0
#define HPUX 0
#define LINUX 1
#define MACOSX 0
#define NETBSD 0
#define OPENBSD 0
#define OSF 0
#define QNX 0
#define SCO_UNIX 0
#define SOLARIS 0
#ifndef WIN32
# define WIN32 0
#endif
#define LEADING_UNDERSCORE 0
#define NO_UNDERSCORES 1
#define JAVAGLUE 0
#define HAVE_ERRNO_H 1
#define HAVE_STRING_H 1
#define HAVE_CTYPE_H 1
#define HAVE_STDLIB_H 1
/* #undef HAVE_MTMALLOC_H */
#define HAVE_UNISTD_H 1
#define HAVE_FCNTL_H 1
#define HAVE_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define ENABLE_THREADS 1
/* #undef HAVE_THREAD_H */
#define HAVE_PTHREAD_H 1
/* #undef HAVE_SYNCH_H */
#define HAVE_SEMAPHORE_H 1
#define ENABLE_AIO 1
#define HAVE_AIO_H 1
#define HAVE_TERMIO_H 1
#define HAVE_TERMIOS_H 1
/* #undef HAVE_SYS_AUDIOIO_H */
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_SOUNDCARD_H 1
#define HAVE_GETTIMEOFDAY 1
/* #undef HAVE_GETHRTIME */
#define HAVE_DEV_DSP 1
/* #undef HAVE_DEV_AUDIO */
#define HAVE_DEV_RANDOM 1
#define HAVE_DEV_URANDOM 1
#define HAVE_DEV_TTY 1
#define HAVE_LONG_LONG 1
#define HAVE_UNSIGNED_LONG_LONG 1
#define INT8_TYPE char
#define INT16_TYPE short
#define INT32_TYPE int
#define INT64_TYPE long long
#define UINT8_TYPE unsigned char
#define UINT16_TYPE unsigned short
#define UINT32_TYPE unsigned int
#define UINT64_TYPE unsigned long long
#define FLOAT4_TYPE float
#define DOUBLE8_TYPE double
#if LINUX #if LINUX
#define _LIBC_REENTRANT #define _LIBC_REENTRANT
#endif #endif
#ifndef __cplusplus #ifndef __cplusplus
/* #undef inline */ /* #undef inline */
#endif #endif
#define AIX 0 /* Define to empty if `const' does not conform to ANSI C. */
#define BEOS 0 /* #undef const */
#define CYGWIN 0
#define DARWIN 0
#define FREEBSD 0
#define HPUX 0
#define LINUX 1
#define MACOSX 0
#define OPENBSD 0
#define OSF 0
#define QNX 0
#define SCO_UNIX 0
#define SOLARIS 0
#define WIN32 0
#define JAVAGLUE 0 /* Define if you have the <aio.h> header file. */
#define HAVE_AIO_H 1
#define LEADING_UNDERSCORE 0 /* Define if you have the <ctype.h> header file. */
#define WORDS_BIGENDIAN 0 #define HAVE_CTYPE_H 1
#define HAVE_ERRNO_H 1 /* Define if you have the <errno.h> header file. */
#define HAVE_STRING_H 1 #define HAVE_ERRNO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_CTYPE_H 1
#define HAVE_UNISTD_H 1
#define HAVE_FCNTL_H 1
#define HAVE_TIME_H 1
#define HAVE_SYS_TYPES_H 1 /* Define if you have the <fcntl.h> header file. */
#define HAVE_SYS_STAT_H 1 #define HAVE_FCNTL_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_THREAD_H 0 /* Define if you have the <inttypes.h> header file. */
#define HAVE_SYNCH_H 0 /* #undef HAVE_INTTYPES_H */
#define HAVE_PTHREAD_H 1
#define HAVE_SEMAPHORE_H 1
#define HAVE_TERMIO_H 1 /* Define if you have the `mtmalloc' library (-lmtmalloc). */
#define HAVE_TERMIOS_H 1 /* #undef HAVE_LIBMTMALLOC */
#define HAVE_SYS_AUDIOIO_H 0
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_SOUNDCARD_H 1
#define HAVE_ALLOCA 0 /* Define if you have the `pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1
#define HAVE_GETTIMEOFDAY 1 /* Define if you have the `thread' library (-lthread). */
#define HAVE_GETHRTIME 0 /* #undef HAVE_LIBTHREAD */
#define HAVE_DEV_AUDIO 0 /* Define if you have the <memory.h> header file. */
#define HAVE_DEV_DSP 1 /* #undef HAVE_MEMORY_H */
#define HAVE_DEV_RANDOM 1
#define HAVE_DEV_URANDOM 1
#define HAVE_DEV_TTY 1
#define SIZEOF_CHAR 1 /* Define if you have the <mtmalloc.h> header file. */
#define SIZEOF_UNSIGNED_CHAR 1 /* #undef HAVE_MTMALLOC_H */
#define SIZEOF_SHORT 2
#define SIZEOF_UNSIGNED_SHORT 2
#define SIZEOF_INT 4
#define SIZEOF_UNSIGNED_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_UNSIGNED_LONG 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF_UNSIGNED_LONG_LONG 8
#define SIZEOF_FLOAT 4 /* Define if you have the <pthread.h> header file. */
#define SIZEOF_DOUBLE 8 #define HAVE_PTHREAD_H 1
#if (SIZEOF_CHAR == 1) /* Define if you have the <semaphore.h> header file. */
#define INT8_TYPE char #define HAVE_SEMAPHORE_H 1
#else
#error sizeof(char) not 1
#endif
#if (SIZEOF_SHORT == 2) /* Define if you have the <stdlib.h> header file. */
#define INT16_TYPE short #define HAVE_STDLIB_H 1
#else
#error sizeof(short) not 2
#endif
#if (SIZEOF_INT == 4) /* Define if you have the <string.h> header file. */
#define INT32_TYPE int #define HAVE_STRING_H 1
#elif (SIZEOF_LONG == 4)
#define INT32_TYPE long
#else
#error compiler has no 32 bit integer
#endif
#if (SIZEOF_LONG == 8) /* Define if you have the <strings.h> header file. */
#define INT64_TYPE long /* #undef HAVE_STRINGS_H */
#define HAVE_LONG_LONG 0
#elif (SIZEOF_LONG_LONG == 8)
#define INT64_TYPE long long
#define HAVE_LONG_LONG 1
#else
#error compiler has no 64 bit integer
#endif
#if (SIZEOF_UNSIGNED_CHAR == 1) /* Define if you have the <synch.h> header file. */
#define UINT8_TYPE unsigned char /* #undef HAVE_SYNCH_H */
#else
#error sizeof(unsigned char) not 1
#endif
#if (SIZEOF_UNSIGNED_SHORT == 2) /* Define if you have the <sys/audioio.h> header file. */
#define UINT16_TYPE unsigned short /* #undef HAVE_SYS_AUDIOIO_H */
#else
#error sizeof(unsigned short) not 2
#endif
#if (SIZEOF_UNSIGNED_INT == 4) /* Define if you have the <sys/ioctl.h> header file. */
#define UINT32_TYPE unsigned int #define HAVE_SYS_IOCTL_H 1
#elif (SIZEOF_UNSIGNED_LONG == 4)
#define UINT32_TYPE unsigned long
#else
#error compiler has no 32 bit unsigned integer
#endif
#if (SIZEOF_UNSIGNED_LONG == 8) /* Define if you have the <sys/soundcard.h> header file. */
#define UINT64_TYPE unsigned long #define HAVE_SYS_SOUNDCARD_H 1
#elif (SIZEOF_UNSIGNED_LONG_LONG == 8)
#define UINT64_TYPE unsigned long long
#else
#error compiler has no 64 bit unsigned integer
#endif
#if (SIZEOF_FLOAT == 4) /* Define if you have the <sys/stat.h> header file. */
#define FLOAT4_TYPE float #define HAVE_SYS_STAT_H 1
#else
#error compile has no 32 bit float
#endif
#if (SIZEOF_DOUBLE == 8) /* Define if you have the <sys/time.h> header file. */
#define DOUBLE8_TYPE double #define HAVE_SYS_TIME_H 1
#else
#error compile has no 64 bit double
#endif
#endif /* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the <termio.h> header file. */
#define HAVE_TERMIO_H 1
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <thread.h> header file. */
/* #undef HAVE_THREAD_H */
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define as `__inline' if that's what the C compiler calls it, or to nothi
ng
if it is not supported. */
/* #undef inline */
/* Name of package */
#define PACKAGE "beecrypt"
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */
/* The size of a `char', as computed by sizeof. */
#define SIZEOF_CHAR 1
/* The size of a `double', as computed by sizeof. */
#define SIZEOF_DOUBLE 8
/* The size of a `float', as computed by sizeof. */
#define SIZEOF_FLOAT 4
/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of a `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
/* The size of a `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
/* The size of a `unsigned char', as computed by sizeof. */
#define SIZEOF_UNSIGNED_CHAR 1
/* The size of a `unsigned int', as computed by sizeof. */
#define SIZEOF_UNSIGNED_INT 4
/* The size of a `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4
/* The size of a `unsigned long long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG_LONG 8
/* The size of a `unsigned short', as computed by sizeof. */
#define SIZEOF_UNSIGNED_SHORT 2
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "2.1.0"
/* Define if your processor stores words with the most significant byte fir
st
(like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
 End of changes. 29 change blocks. 
123 lines changed or deleted 132 lines changed or added


 config.h   config.h 
skipping to change at line 34 skipping to change at line 34
*/ */
#ifndef _CONFIG_H #ifndef _CONFIG_H
#define _CONFIG_H #define _CONFIG_H
#if defined(_WIN32) && !defined(WIN32) #if defined(_WIN32) && !defined(WIN32)
# define WIN32 1 # define WIN32 1
#endif #endif
#if WIN32 && !__CYGWIN32__ #if WIN32 && !__CYGWIN32__
# include <win32/config.win.h> # include "config.win.h"
# ifdef BEECRYPT_DLL_EXPORT # ifdef BEECRYPT_DLL_EXPORT
# define BEEDLLAPI # define BEEDLLAPI
# else # else
# define BEEDLLAPI __declspec(dllimport) # define BEEDLLAPI __declspec(dllimport)
# endif # endif
/*typedef UINT8_TYPE byte;*/ /*typedef UINT8_TYPE byte;*/
#else #else
# include <gnu/config.gnu.h> # include "config.gnu.h"
# define BEEDLLAPI # define BEEDLLAPI
typedef UINT8_TYPE byte; typedef UINT8_TYPE byte;
#endif #endif
#ifndef ROTL32 #ifndef ROTL32
# define ROTL32(x, s) (((x) << (s)) | ((x) >> (32 - (s)))) # define ROTL32(x, s) (((x) << (s)) | ((x) >> (32 - (s))))
#endif #endif
#ifndef ROTR32 #ifndef ROTR32
# define ROTR32(x, s) (((x) >> (s)) | ((x) << (32 - (s)))) # define ROTR32(x, s) (((x) >> (s)) | ((x) << (32 - (s))))
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 dhaes.h   dhaes.h 
skipping to change at line 34 skipping to change at line 34
*/ */
#ifndef _DHAES_H #ifndef _DHAES_H
#define _DHAES_H #define _DHAES_H
#include "beecrypt.h" #include "beecrypt.h"
#include "dldp.h" #include "dldp.h"
typedef struct typedef struct
{ {
dldp_p param; const dldp_p* param;
hashFunctionContext hash; const hashFunction* hash;
blockCipherContext cipher; const blockCipher* cipher;
keyedHashFunctionContext mac; const keyedHashFunction* mac;
randomGeneratorContext rng; int cipherkeybit
} dhaes_p; s;
int mackeybits;
} dhaes_pParameters;
typedef struct
{
dldp_p param;
mp32number pub;
mp32number pri;
hashFunctionContext hash;
blockCipherContext cipher;
keyedHashFunctionContext mac;
int cipherkeybit
s;
int mackeybits;
} dhaes_pContext;
BEEDLLAPI BEEDLLAPI
int dhaes_usable(const blockCipher*, const keyedHashFunction*, const hashFu nction*); int dhaes_pUsable(const dhaes_pParameters*);
BEEDLLAPI BEEDLLAPI
int dhaes_pInit(dhaes_p*, const dldp_p*, const blockCipher*, const keyedHas hFunction*, const hashFunction*, const randomGenerator*); int dhaes_pContextInit (dhaes_pContext*, const dhaes_pParameters*);
BEEDLLAPI BEEDLLAPI
int dhaes_pFree(dhaes_p*); int dhaes_pContextInitDecrypt(dhaes_pContext*, const dhaes_pParameters*, co
nst mp32number*);
BEEDLLAPI
int dhaes_pContextInitEncrypt(dhaes_pContext*, const dhaes_pParameters*, co
nst mp32number*);
BEEDLLAPI
int dhaes_pContextFree (dhaes_pContext*);
BEEDLLAPI BEEDLLAPI
memchunk* dhaes_pEncrypt(dhaes_p*, const mp32number*, mp32number*, mp32number*, const memchunk*); memchunk* dhaes_pContextEncrypt(dhaes_pContext*, mp32number*, m p32number*, const memchunk*, randomGeneratorContext*);
BEEDLLAPI BEEDLLAPI
memchunk* dhaes_pDecrypt(dhaes_p*, const mp32number*, const mp32number*, co nst mp32number*, const memchunk*); memchunk* dhaes_pContextDecrypt(dhaes_pContext*, const mp32number*, const m p32number*, const memchunk*);
#endif #endif
 End of changes. 6 change blocks. 
11 lines changed or deleted 32 lines changed or added


 fips180opt.h   fips180opt.h 
skipping to change at line 45 skipping to change at line 45
#if WIN32 #if WIN32
# if defined(_MSC_VER) && defined(_M_IX86) # if defined(_MSC_VER) && defined(_M_IX86)
# define ASM_SHA1PROCESS # define ASM_SHA1PROCESS
# elif __INTEL__ && __MWERKS__ # elif __INTEL__ && __MWERKS__
# define ASM_SHA1PROCESS # define ASM_SHA1PROCESS
# endif # endif
#endif #endif
#ifdef __GNUC__ #ifdef __GNUC__
#if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) # if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686)
#define ASM_SHA1PROCESS # define ASM_SHA1PROCESS
#endif # endif
#endif #endif
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) # if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686)
#define ASM_SHA1PROCESS # define ASM_SHA1PROCESS
#endif # endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 2 change blocks. 
6 lines changed or deleted 6 lines changed or added


 fips186.h   fips186.h 
skipping to change at line 33 skipping to change at line 33
* *
*/ */
#ifndef _FIPS186_H #ifndef _FIPS186_H
#define _FIPS186_H #define _FIPS186_H
#include "beecrypt.h" #include "beecrypt.h"
#ifdef _REENTRANT #ifdef _REENTRANT
# if WIN32 # if WIN32
# include <Winbase.h> # include <windows.h>
# include <winbase.h>
# else # else
# if HAVE_SYNCH_H # if HAVE_SYNCH_H
# include <synch.h> # include <synch.h>
# elif HAVE_PTHREAD_H # elif HAVE_PTHREAD_H
# include <pthread.h> # include <pthread.h>
# else # else
# error need locking mechanism # error need locking mechanism
# endif # endif
# endif # endif
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 mp32.h   mp32.h 
skipping to change at line 32 skipping to change at line 32
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
* *
*/ */
#ifndef _MP32_H #ifndef _MP32_H
#define _MP32_H #define _MP32_H
#include "beecrypt.h" #include "beecrypt.h"
#if HAVE_STRING_H #if HAVE_STRING_H
#include <string.h> # include <string.h>
#endif #endif
#include "mp32opt.h" #include "mp32opt.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef ASM_MP32COPY #ifndef ASM_MP32COPY
#define mp32copy(size, dst, src) memcpy(dst, src, (size) << 2) #define mp32copy(size, dst, src) memcpy(dst, src, (size) << 2)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 mp32opt.h   mp32opt.h 
skipping to change at line 36 skipping to change at line 36
#ifndef _MP32OPT_H #ifndef _MP32OPT_H
#define _MP32OPT_H #define _MP32OPT_H
#include "beecrypt.h" #include "beecrypt.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if WIN32 #if WIN32
# if defined(_MSC_VER) && defined(_M_IX86) # if __MWERKS__ && __INTEL__
# define ASM_MP32ZERO
# define ASM_MP32FILL
# define ASM_MP32EVEN
# define ASM_MP32ODD
# define ASM_MP32ADDW # define ASM_MP32ADDW
# define ASM_MP32ADD # define ASM_MP32ADD
# define ASM_MP32SUBW # define ASM_MP32SUBW
# define ASM_MP32SUB # define ASM_MP32SUB
# define ASM_MP32MULTWO
# define ASM_MP32SETMUL # define ASM_MP32SETMUL
# define ASM_MP32ADDMUL # define ASM_MP32ADDMUL
# define ASM_MP32ADDSQRTRC # define ASM_MP32ADDSQRTRC
# elif __INTEL__ && __MWERKS__ # elif defined(_MSC_VER) && defined(_M_IX86)
# define ASM_MP32ZERO
# define ASM_MP32FILL
# define ASM_MP32EVEN
# define ASM_MP32ODD
# define ASM_MP32ADDW # define ASM_MP32ADDW
# define ASM_MP32ADD # define ASM_MP32ADD
# define ASM_MP32SUBW # define ASM_MP32SUBW
# define ASM_MP32SUB # define ASM_MP32SUB
# define ASM_MP32DIVTWO
# define ASM_MP32MULTWO # define ASM_MP32MULTWO
# define ASM_MP32SETMUL # define ASM_MP32SETMUL
# define ASM_MP32ADDMUL # define ASM_MP32ADDMUL
# define ASM_MP32ADDSQRTRC # define ASM_MP32ADDSQRTRC
# endif # endif
#endif #endif
#if defined(__GNUC__) #if defined(__GNUC__)
# if defined(OPTIMIZE_ARM)
# define ASM_MP32SETMUL
# define ASM_MP32ADDMUL
# endif
# if defined(OPTIMIZE_I386) || defined(OPTIMIZE_I486) || defined(OPTIMIZE_I 586) || defined(OPTIMIZE_I686) # if defined(OPTIMIZE_I386) || defined(OPTIMIZE_I486) || defined(OPTIMIZE_I 586) || defined(OPTIMIZE_I686)
# define ASM_MP32ZERO
# define ASM_MP32FILL
# define ASM_MP32EVEN
# define ASM_MP32ODD
# define ASM_MP32ADDW # define ASM_MP32ADDW
# define ASM_MP32ADD # define ASM_MP32ADD
# define ASM_MP32SUBW # define ASM_MP32SUBW
# define ASM_MP32SUB # define ASM_MP32SUB
# define ASM_MP32DIVTWO
# define ASM_MP32MULTWO # define ASM_MP32MULTWO
# define ASM_MP32SETMUL # define ASM_MP32SETMUL
# define ASM_MP32ADDMUL # define ASM_MP32ADDMUL
# define ASM_MP32ADDSQRTRC # define ASM_MP32ADDSQRTRC
# endif # endif
# if defined(OPTIMIZE_IA64) # if defined(OPTIMIZE_IA64)
# define ASM_MP32ZERO # define ASM_MP32ZERO
# define ASM_MP32COPY # define ASM_MP32COPY
# define ASM_MP32ADD # define ASM_MP32ADD
# define ASM_MP32SUB # define ASM_MP32SUB
# undef ASM_MP32SETMUL # undef ASM_MP32SETMUL
# undef ASM_MP32ADDMUL # undef ASM_MP32ADDMUL
# endif # endif
# if defined(OPTIMIZE_POWERPC) # if defined(OPTIMIZE_POWERPC)
# define ASM_MP32ADDW # define ASM_MP32ADDW
# define ASM_MP32ADD # define ASM_MP32ADD
# define ASM_MP32SUBW # define ASM_MP32SUBW
# define ASM_MP32SUB # define ASM_MP32SUB
# define ASM_MP32MULTWO
# define ASM_MP32SETMUL # define ASM_MP32SETMUL
# define ASM_MP32ADDMUL # define ASM_MP32ADDMUL
# define ASM_MP32ADDSQRTRC # define ASM_MP32ADDSQRTRC
# endif # endif
# if defined(OPTIMIZE_SPARCV8)
# define ASM_MP32SETMUL
# define ASM_MP32ADDMUL
# endif
# if defined(OPTIMIZE_SPARCV8PLUS) || defined(OPTIMIZE_SPARCV9) # if defined(OPTIMIZE_SPARCV8PLUS) || defined(OPTIMIZE_SPARCV9)
# define ASM_MP32ADDW # define ASM_MP32ADDW
# define ASM_MP32ADD # define ASM_MP32ADD
# define ASM_MP32SUBW # define ASM_MP32SUBW
# define ASM_MP32SUB # define ASM_MP32SUB
# define ASM_MP32MULTWO
# define ASM_MP32SETMUL # define ASM_MP32SETMUL
# define ASM_MP32ADDMUL # define ASM_MP32ADDMUL
# define ASM_MP32ADDSQRTRC # define ASM_MP32ADDSQRTRC
# endif # endif
#endif #endif
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(OPTIMIZE_SPARCV8PLUS) /* || defined(OPTIMIZE_SPARCV9) */ # if defined(OPTIMIZE_SPARCV8PLUS) /* || defined(OPTIMIZE_SPARCV9) */
# define ASM_MP32ADDW # define ASM_MP32ADDW
# define ASM_MP32ADD # define ASM_MP32ADD
 End of changes. 10 change blocks. 
3 lines changed or deleted 26 lines changed or added


 mtprng.h   mtprng.h 
skipping to change at line 32 skipping to change at line 32
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
* *
*/ */
#ifndef _MTPRNG_H #ifndef _MTPRNG_H
#define _MTPRNG_H #define _MTPRNG_H
#include "beecrypt.h" #include "beecrypt.h"
#if WIN32 #if WIN32
# include <Winbase.h> # include <windows.h>
# include <winbase.h>
#else #else
# if HAVE_SYNCH_H # if HAVE_SYNCH_H
# include <synch.h> # include <synch.h>
# elif HAVE_PTHREAD_H # elif HAVE_PTHREAD_H
# include <pthread.h> # include <pthread.h>
# else # else
# error need locking mechanism # error need locking mechanism
# endif # endif
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/