aes.h | aes.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file aes.h | /*!\file aes.h | |||
* \brief AES block cipher, as specified by NIST FIPS 197. | * \brief AES block cipher, as specified by NIST FIPS 197. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup BC_m BC_aes_m | * \ingroup BC_m BC_aes_m | |||
*/ | */ | |||
#ifndef _AES_H | #ifndef _AES_H | |||
#define _AES_H | #define _AES_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#include "beecrypt/aesopt.h" | #include "beecrypt/aesopt.h" | |||
/*!\brief Holds all the parameters necessary for the AES cipher. | /*!\brief Holds all the parameters necessary for the AES cipher. | |||
skipping to change at line 91 | skipping to change at line 91 | |||
/*!\fn int aesSetIV(aesParam* ap, const byte* iv) | /*!\fn int aesSetIV(aesParam* ap, const byte* iv) | |||
* \brief This function sets the Initialization Vector. | * \brief This function sets the Initialization Vector. | |||
* \note This function is only useful in block chaining or feedback modes. | * \note This function is only useful in block chaining or feedback modes. | |||
* \param ap The cipher's parameter block. | * \param ap The cipher's parameter block. | |||
* \param iv The initialization vector; may be null. | * \param iv The initialization vector; may be null. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int aesSetIV (aesParam* ap, const byte* iv); | int aesSetIV (aesParam* ap, const byte* iv); | |||
/*!\fn int aesSetCTR(aesParam* ap, const byte* nivz, size_t counter) | ||||
* \brief This function sets the CTR mode counter. | ||||
* \note This function is only useful in CTR modes. | ||||
* \param ap The cipher's parameter block. | ||||
* \param nivz The concatenation of Nonce, IV, and padding Zeroes. | ||||
* \param counter The counter. | ||||
* \retval 0 on success. | ||||
*/ | ||||
BEECRYPTAPI | ||||
int aesSetCTR (aesParam* ap, const byte* nivz, size_t c | ||||
ounter); | ||||
/*!\fn aesEncrypt(aesParam* ap, uint32_t* dst, const uint32_t* src) | /*!\fn aesEncrypt(aesParam* ap, uint32_t* dst, const uint32_t* src) | |||
* \brief This function performs the raw AES encryption; it encrypts one bl ock | * \brief This function performs the raw AES encryption; it encrypts one bl ock | |||
* of 128 bits. | * of 128 bits. | |||
* \param ap The cipher's parameter block. | * \param ap The cipher's parameter block. | |||
* \param dst The ciphertext; should be aligned on 32-bit boundary. | * \param dst The ciphertext; should be aligned on 32-bit boundary. | |||
* \param src The cleartext; should be aligned on 32-bit boundary. | * \param src The cleartext; should be aligned on 32-bit boundary. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int aesEncrypt (aesParam* ap, uint32_t* dst, const uint3 2_t* src); | int aesEncrypt (aesParam* ap, uint32_t* dst, const uint3 2_t* src); | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 13 lines changed or added | |||
aesopt.h | aesopt.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file aesopt.h | /*!\file aesopt.h | |||
* \brief AES block cipher, assembler-optimized routines, headers. | * \brief AES block cipher, assembler-optimized routines, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup BC_aes_m | * \ingroup BC_aes_m | |||
*/ | */ | |||
#ifndef _AESOPT_H | #ifndef _AESOPT_H | |||
#define _AESOPT_H | #define _AESOPT_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#include "beecrypt/aes.h" | #include "beecrypt/aes.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
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) | |||
/* this space intentionally left blank */ | /* this space intentionally left blank */ | |||
# elif __INTEL__ && __MWERKS__ | # elif __INTEL__ && __MWERKS__ | |||
# endif | # endif | |||
#endif | #endif | |||
#if defined(__GNUC__) | #if defined(__GNUC__) | |||
# if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) | # if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) | |||
# if defined(OPTIMIZE_MMX) | ||||
# define ASM_AESENCRYPT | ||||
# define ASM_AESENCRYPTECB | ||||
# define ASM_AESDECRYPT | ||||
# define ASM_AESDECRYPTECB | ||||
# endif | ||||
# endif | # endif | |||
#endif | #endif | |||
#if defined(__INTEL_COMPILER) | #if defined(__INTEL_COMPILER) | |||
# if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) | # if defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) | |||
# if defined(OPTIMIZE_MMX) | ||||
# define ASM_AESENCRYPT | ||||
# define ASM_AESENCRYPTECB | ||||
# define ASM_AESDECRYPT | ||||
# define ASM_AESDECRYPTECB | ||||
# endif | ||||
# endif | # endif | |||
#endif | #endif | |||
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) | #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) | |||
/* this space intentionally left blank */ | /* this space intentionally left blank */ | |||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
13 lines changed or deleted | 1 lines changed or added | |||
api.h | api.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2001, 2002, 2004 Beeyond Software Holding BV | * Copyright (c) 2001, 2002, 2004 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file api.h | /*!\file api.h | |||
* \brief BeeCrypt API, portability headers. | * \brief BeeCrypt API, portability headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
*/ | */ | |||
#ifndef _BEECRYPT_API_H | #ifndef _BEECRYPT_API_H | |||
#define _BEECRYPT_API_H | #define _BEECRYPT_API_H | |||
#if defined(_WIN32) && !defined(WIN32) | #if defined(_WIN32) && !defined(WIN32) | |||
# define WIN32 1 | # define WIN32 1 | |||
#endif | #endif | |||
#if WIN32 | #if WIN32 | |||
# if !__CYGWIN32__ | # if !__CYGWIN32__ && !__MINGW32__ | |||
# include "beecrypt/win.h" | # include "beecrypt/win.h" | |||
# else | # else | |||
# include "beecrypt/gnu.h" | # include "beecrypt/gnu.h" | |||
# endif | # endif | |||
# ifdef BEECRYPT_DLL_EXPORT | # ifdef BEECRYPT_DLL_EXPORT | |||
# define BEECRYPTAPI __declspec(dllexport) | # define BEECRYPTAPI __declspec(dllexport) | |||
# else | # else | |||
# define BEECRYPTAPI __declspec(dllimport) | # define BEECRYPTAPI __declspec(dllimport) | |||
# endif | # endif | |||
# ifdef BEECRYPT_CXX_DLL_EXPORT | # ifdef BEECRYPT_CXX_DLL_EXPORT | |||
skipping to change at line 56 | skipping to change at line 56 | |||
# else | # else | |||
# define BEECRYPTCXXAPI __declspec(dllimport) | # define BEECRYPTCXXAPI __declspec(dllimport) | |||
# define BEECRYPTCXXTEMPLATE extern | # define BEECRYPTCXXTEMPLATE extern | |||
# endif | # endif | |||
#else | #else | |||
# include "beecrypt/gnu.h" | # include "beecrypt/gnu.h" | |||
# define BEECRYPTAPI | # define BEECRYPTAPI | |||
# define BEECRYPTCXXAPI | # define BEECRYPTCXXAPI | |||
#endif | #endif | |||
#if HAVE_ASSERT_H | ||||
# include <assert.h> | ||||
#else | ||||
# define assert(x) | ||||
#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 | |||
#ifndef ROTR64 | #ifndef ROTR64 | |||
# define ROTR64(x, s) (((x) >> (s)) | ((x) << (64 - (s)))) | # define ROTR64(x, s) (((x) >> (s)) | ((x) << (64 - (s)))) | |||
#endif | #endif | |||
typedef uint8_t byte; | typedef uint8_t byte; | |||
typedef int8_t javabyte; | #if JAVAGLUE | |||
typedef int16_t javashort; | # include <jni.h> | |||
typedef int32_t javaint; | #else | |||
typedef int64_t javalong; | typedef int8_t jbyte; | |||
typedef int16_t jshort; | ||||
typedef uint16_t javachar; | typedef int32_t jint; | |||
typedef int64_t jlong; | ||||
typedef uint16_t jchar; | ||||
typedef float jfloat; | ||||
typedef double jdouble; | ||||
#endif | ||||
#if (MP_WBITS == 64) | #if (MP_WBITS == 64) | |||
typedef uint64_t mpw; | typedef uint64_t mpw; | |||
typedef uint32_t mphw; | typedef uint32_t mphw; | |||
#elif (MP_WBITS == 32) | #elif (MP_WBITS == 32) | |||
# if HAVE_UINT64_T | # if HAVE_UINT64_T | |||
# define HAVE_MPDW 1 | # define HAVE_MPDW 1 | |||
typedef uint64_t mpdw; | typedef uint64_t mpdw; | |||
# endif | # endif | |||
typedef uint32_t mpw; | typedef uint32_t mpw; | |||
End of changes. 5 change blocks. | ||||
9 lines changed or deleted | 20 lines changed or added | |||
base64.h | base64.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file base64.h | /*!\file base64.h | |||
* \brief Base64 encoding and decoding, headers. | * \brief Base64 encoding and decoding, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
*/ | */ | |||
#ifndef _BASE64_H | #ifndef _BASE64_H | |||
#define _BASE64_H | #define _BASE64_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
/*!\ | /*!\ | |||
* Decode white space character set (default). | * Decode white space character set (default). | |||
*/ | */ | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
beecrypt.h | beecrypt.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 1999, 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 1999, 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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. | |||
skipping to change at line 26 | skipping to change at line 26 | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file beecrypt.h | /*!\file beecrypt.h | |||
* \brief BeeCrypt API, headers. | * \brief BeeCrypt API, headers. | |||
* | * | |||
* These API functions provide an abstract way for using most of | * These API functions provide an abstract way for using most of | |||
* the various algorithms implemented by the library. | * the various algorithms implemented by the library. | |||
* | * | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup ES_m PRNG_m HASH_m HMAC_m BC_m | * \ingroup ES_m PRNG_m HASH_m HMAC_m BC_m | |||
*/ | */ | |||
#ifndef _BEECRYPT_H | #ifndef _BEECRYPT_H | |||
#define _BEECRYPT_H | #define _BEECRYPT_H | |||
#include "beecrypt/api.h" | #include "beecrypt/api.h" | |||
#include "beecrypt/memchunk.h" | #include "beecrypt/memchunk.h" | |||
#include "beecrypt/mpnumber.h" | #include "beecrypt/mpnumber.h" | |||
skipping to change at line 586 | skipping to change at line 586 | |||
* \brief Prototype definition for an initialization vector setup function. | * \brief Prototype definition for an initialization vector setup function. | |||
* \param bp The blockcipher's parameters. | * \param bp The blockcipher's parameters. | |||
* \param iv The blockciphers' IV value. | * \param iv The blockciphers' IV value. | |||
* \note iv length must be equal to the cipher's block size. | * \note iv length must be equal to the cipher's block size. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
* \retval -1 on failure. | * \retval -1 on failure. | |||
* \ingroup BC_m | * \ingroup BC_m | |||
*/ | */ | |||
typedef int (*blockCipherSetIV )(blockCipherParam*, const byte*); | typedef int (*blockCipherSetIV )(blockCipherParam*, const byte*); | |||
/*!\typedef int (*blockCipherSetCTR)(blockCipherParam* bp, const byte* nivz | ||||
, size_t counter) | ||||
* \brief Prototype definition for an initialization vector setup function. | ||||
* \param bp The blockcipher's parameters. | ||||
* \param nivz The concatenation of the Nonce, IV and padding Zero bytes. | ||||
* \param counter The blockciphers' counter value. | ||||
* \note nivz length must be equal to the cipher's block size. | ||||
* \retval 0 on success. | ||||
* \retval -1 on failure. | ||||
* \ingroup BC_m | ||||
*/ | ||||
typedef int (*blockCipherSetCTR )(blockCipherParam*, const byte*, size_t); | ||||
/*!\typedef int (*blockCipherRawcrypt)(blockCipherParam* bp, uint32_t* dst, const uint32_t* src) | /*!\typedef int (*blockCipherRawcrypt)(blockCipherParam* bp, uint32_t* dst, const uint32_t* src) | |||
* \brief Prototype for a \e raw encryption or decryption function. | * \brief Prototype for a \e raw encryption or decryption function. | |||
* \param bp The blockcipher's parameters. | * \param bp The blockcipher's parameters. | |||
* \param dst The ciphertext address; must be aligned on 32-bit boundary. | * \param dst The ciphertext address; must be aligned on 32-bit boundary. | |||
* \param src The cleartext address; must be aligned on 32-bit boundary. | * \param src The cleartext address; must be aligned on 32-bit boundary. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
* \retval -1 on failure. | * \retval -1 on failure. | |||
* \ingroup BC_m | * \ingroup BC_m | |||
*/ | */ | |||
typedef int (*blockCipherRawcrypt)(blockCipherParam*, uint32_t*, const uint 32_t*); | typedef int (*blockCipherRawcrypt)(blockCipherParam*, uint32_t*, const uint 32_t*); | |||
skipping to change at line 669 | skipping to change at line 681 | |||
*/ | */ | |||
const size_t keybitsinc; | const size_t keybitsinc; | |||
/*!\var setup | /*!\var setup | |||
* \brief Pointer to the cipher's setup function. | * \brief Pointer to the cipher's setup function. | |||
*/ | */ | |||
const blockCipherSetup setup; | const blockCipherSetup setup; | |||
/*!\var setiv | /*!\var setiv | |||
* \brief Pointer to the cipher's initialization vector setup functi on. | * \brief Pointer to the cipher's initialization vector setup functi on. | |||
*/ | */ | |||
const blockCipherSetIV setiv; | const blockCipherSetIV setiv; | |||
/*!\var setctr | ||||
* \brief Pointer to the cipher's ctr setup function. | ||||
*/ | ||||
const blockCipherSetCTR setctr; | ||||
/*!\var getfb | ||||
* \brief Pointer to the cipher's feedback-returning function. | ||||
*/ | ||||
const blockCipherFeedback getfb; | ||||
/*!\var raw | /*!\var raw | |||
* \brief The cipher's raw functions. | * \brief The cipher's raw functions. | |||
*/ | */ | |||
const blockCipherRaw raw; | const blockCipherRaw raw; | |||
/*!\var ecb | /*!\var ecb | |||
* \brief The cipher's ECB functions. | * \brief The cipher's ECB functions. | |||
*/ | */ | |||
const blockCipherMode ecb; | const blockCipherMode ecb; | |||
/*!\var cbc | ||||
* \brief The cipher's CBC functions. | ||||
*/ | ||||
const blockCipherMode cbc; | const blockCipherMode cbc; | |||
/*!\var getfb | /*!\var ctr | |||
* \brief Pointer to the cipher's feedback-returning function. | * \brief The cipher's CTR functions. | |||
*/ | */ | |||
const blockCipherFeedback getfb; | const blockCipherMode ctr; | |||
}; | }; | |||
#ifndef __cplusplus | #ifndef __cplusplus | |||
typedef struct _blockCipher blockCipher; | typedef struct _blockCipher blockCipher; | |||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
skipping to change at line 784 | skipping to change at line 807 | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blockCipherContextInit(blockCipherContext*, const blockCipher*); | int blockCipherContextInit(blockCipherContext*, const blockCipher*); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blockCipherContextSetup(blockCipherContext*, const byte*, size_t, ciphe rOperation); | int blockCipherContextSetup(blockCipherContext*, const byte*, size_t, ciphe rOperation); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blockCipherContextSetIV(blockCipherContext*, const byte*); | int blockCipherContextSetIV(blockCipherContext*, const byte*); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blockCipherContextSetCTR(blockCipherContext*, const byte*, size_t); | ||||
BEECRYPTAPI | ||||
int blockCipherContextFree(blockCipherContext*); | int blockCipherContextFree(blockCipherContext*); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blockCipherContextECB(blockCipherContext*, uint32_t*, const uint32_t*, int); | int blockCipherContextECB(blockCipherContext*, uint32_t*, const uint32_t*, int); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blockCipherContextCBC(blockCipherContext*, uint32_t*, const uint32_t*, int); | int blockCipherContextCBC(blockCipherContext*, uint32_t*, const uint32_t*, int); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blockCipherContextCTR(blockCipherContext*, uint32_t*, const uint32_t*, | ||||
int); | ||||
BEECRYPTAPI | ||||
int blockCipherContextValidKeylen(blockCipherContext*, size_t); | int blockCipherContextValidKeylen(blockCipherContext*, size_t); | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 9 change blocks. | ||||
5 lines changed or deleted | 36 lines changed or added | |||
blockmode.h | blockmode.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2002, 2005 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file blockmode.h | /*!\file blockmode.h | |||
* \brief Blockcipher operation modes. | * \brief Blockcipher operation modes. | |||
* \todo Additional modes, such as CFB and OFB. | * \todo Additional modes, such as CFB and OFB. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup BC_m | * \ingroup BC_m | |||
*/ | */ | |||
#ifndef _BLOCKMODE_H | #ifndef _BLOCKMODE_H | |||
#define _BLOCKMODE_H | #define _BLOCKMODE_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
skipping to change at line 88 | skipping to change at line 88 | |||
* \param bc The blockcipher. | * \param bc The blockcipher. | |||
* \param bp The cipher's parameter block. | * \param bp The cipher's parameter block. | |||
* \param dst The cleartext data; should be aligned on a 32-bit boundary. | * \param dst The cleartext data; should be aligned on a 32-bit boundary. | |||
* \param src The ciphertext data; should be aligned on a 32-bit boundary. | * \param src The ciphertext data; should be aligned on a 32-bit boundary. | |||
* \param nblocks The number of blocks to be decrypted. | * \param nblocks The number of blocks to be decrypted. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blockDecryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks); | int blockDecryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks); | |||
BEECRYPTAPI | ||||
int blockEncryptCTR(const blockCipher* bc, blockCipherParam* bp, uint32_t* | ||||
dst, const uint32_t* src, unsigned int nblocks); | ||||
BEECRYPTAPI | ||||
int blockDecryptCTR(const blockCipher* bc, blockCipherParam* bp, uint32_t* | ||||
dst, const uint32_t* src, unsigned int nblocks); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 10 lines changed or added | |||
blockpad.h | blockpad.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file blockpad.h | /*!\file blockpad.h | |||
* \brief Blockcipher padding algorithms. | * \brief Blockcipher padding algorithms. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup BC_m | * \ingroup BC_m | |||
*/ | */ | |||
#ifndef _BLOCKPAD_H | #ifndef _BLOCKPAD_H | |||
#define _BLOCKPAD_H | #define _BLOCKPAD_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
blowfish.h | blowfish.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 1999, 2000, 2002 Virtual Unlimited B.V. | * Copyright (c) 1999, 2000, 2002 X-Way Rights BV | |||
* | * | |||
* 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. | |||
skipping to change at line 30 | skipping to change at line 30 | |||
/*!\file blowfish.h | /*!\file blowfish.h | |||
* \brief Blowfish block cipher. | * \brief Blowfish block cipher. | |||
* | * | |||
* For more information on this blockcipher, see: | * For more information on this blockcipher, see: | |||
* "Applied Cryptography", second edition | * "Applied Cryptography", second edition | |||
* Bruce Schneier | * Bruce Schneier | |||
* Wiley & Sons | * Wiley & Sons | |||
* | * | |||
* Also see http://www.counterpane.com/blowfish.html | * Also see http://www.counterpane.com/blowfish.html | |||
* | * | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup BC_m BC_blowfish_m | * \ingroup BC_m BC_blowfish_m | |||
*/ | */ | |||
#ifndef _BLOWFISH_H | #ifndef _BLOWFISH_H | |||
#define _BLOWFISH_H | #define _BLOWFISH_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#include "beecrypt/blowfishopt.h" | #include "beecrypt/blowfishopt.h" | |||
#define BLOWFISHROUNDS 16 | #define BLOWFISHROUNDS 16 | |||
skipping to change at line 79 | skipping to change at line 79 | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/*!\var blowfish | /*!\var blowfish | |||
* \brief Holds the full API description of the Blowfish algorithm. | * \brief Holds the full API description of the Blowfish algorithm. | |||
*/ | */ | |||
extern const BEECRYPTAPI blockCipher blowfish; | extern const BEECRYPTAPI blockCipher blowfish; | |||
/*!\fn int blowfishSetup(blowfishParam* bp, const byte* key, size_t keybits | /*!\fn int blowfishSetup(blowfishParam* bp, const byte* key, size_t keybits | |||
, cipherOperation | , cipherOperation op) | |||
op) | ||||
* \brief The function performs the cipher's key expansion. | * \brief The function performs the cipher's key expansion. | |||
* \param bp The cipher's parameter block. | * \param bp The cipher's parameter block. | |||
* \param key The key value. | * \param key The key value. | |||
* \param keybits The number of bits in the key; legal values are: 32 to 44 8, | * \param keybits The number of bits in the key; legal values are: 32 to 44 8, | |||
* in multiples of 8. | * in multiples of 8. | |||
* \param op ENCRYPT or DECRYPT. | * \param op ENCRYPT or DECRYPT. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
* \retval -1 on failure. | * \retval -1 on failure. | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blowfishSetup (blowfishParam*, const byte*, size_t, cipher Operation); | int blowfishSetup (blowfishParam*, const byte*, size_t, cipher Operation); | |||
/*!\fn int blowfishSetIV(blowfishParam* bp, const byte* iv) | /*!\fn int blowfishSetIV(blowfishParam* bp, const byte* iv) | |||
* \brief This function sets the Initialization Vector. | * \brief This function sets the Initialization Vector. | |||
* \note This function is only useful in block chaining or feedback modes. | * \note This function is only useful in block chaining or feedback modes. | |||
* \param bp The cipher's parameter block. | * \param bp The cipher's parameter block. | |||
* \param iv The initialization vector; may be null. | * \param iv The initialization vector; may be null. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int blowfishSetIV (blowfishParam*, const byte*); | int blowfishSetIV (blowfishParam*, const byte* iv); | |||
BEECRYPTAPI | ||||
int blowfishSetCTR (blowfishParam*, const byte* nivz, size_t co | ||||
unter); | ||||
/*!\fn blowfishEncrypt(blowfishParam* bp, uint32_t* dst, const uint32_t* sr c) | /*!\fn blowfishEncrypt(blowfishParam* bp, uint32_t* dst, const uint32_t* sr c) | |||
* \brief This function performs the Blowfish encryption; it encrypts one b lock | * \brief This function performs the Blowfish encryption; it encrypts one b lock | |||
* of 64 bits. | * of 64 bits. | |||
* \param bp The cipher's parameter block. | * \param bp The cipher's parameter block. | |||
* \param dst The ciphertext; should be aligned on 32-bit boundary. | * \param dst The ciphertext; should be aligned on 32-bit boundary. | |||
* \param src The cleartext; should be aligned on 32-bit boundary. | * \param src The cleartext; should be aligned on 32-bit boundary. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
End of changes. 4 change blocks. | ||||
6 lines changed or deleted | 9 lines changed or added | |||
blowfishopt.h | blowfishopt.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2002, 2003 Virtual Unlimited B.V. | * Copyright (c) 2000, 2002, 2003 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file blowfishopt.h | /*!\file blowfishopt.h | |||
* \brief Blowfish block cipher, assembler-optimized routines, headers. | * \brief Blowfish block cipher, assembler-optimized routines, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup BC_blowfish_m | * \ingroup BC_blowfish_m | |||
*/ | */ | |||
#ifndef _BLOWFISHOPT_H | #ifndef _BLOWFISHOPT_H | |||
#define _BLOWFISHOPT_H | #define _BLOWFISHOPT_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#include "beecrypt/blowfish.h" | #include "beecrypt/blowfish.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
dldp.h | dldp.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file dldp.h | /*!\file dldp.h | |||
* \brief Discrete Logarithm domain parameters, headers. | * \brief Discrete Logarithm domain parameters, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup DL_m | * \ingroup DL_m | |||
*/ | */ | |||
#ifndef _DLDP_H | #ifndef _DLDP_H | |||
#define _DLDP_H | #define _DLDP_H | |||
#include "beecrypt/mpbarrett.h" | #include "beecrypt/mpbarrett.h" | |||
/* | /* | |||
* Discrete Logarithm Domain Parameters - Prime | * Discrete Logarithm Domain Parameters - Prime | |||
skipping to change at line 49 | skipping to change at line 49 | |||
* | * | |||
* Make sure q is large enough to foil Pohlig-Hellman attacks | * Make sure q is large enough to foil Pohlig-Hellman attacks | |||
* See: "Handbook of Applied Cryptography", Chapter 3.6.4 | * See: "Handbook of Applied Cryptography", Chapter 3.6.4 | |||
* | * | |||
* g is either a generator of a subgroup of order q, or a generator of orde r | * g is either a generator of a subgroup of order q, or a generator of orde r | |||
* n = (p-1) | * n = (p-1) | |||
*/ | */ | |||
/*!\brief Discrete Logarithm Domain Parameters over a prime field. | /*!\brief Discrete Logarithm Domain Parameters over a prime field. | |||
* | * | |||
* For the variables in this structure /f$p=qr+1/f$; if /f$p=2q+1 then r=2/ f$. | * For the variables in this structure \f$p=qr+1\f$; if \f$p=2q+1\f$ then \ f$r=2\f$. | |||
* | * | |||
* \ingroup DL_m | * \ingroup DL_m | |||
*/ | */ | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
struct BEECRYPTAPI dldp_p | struct BEECRYPTAPI dldp_p | |||
#else | #else | |||
struct _dldp_p | struct _dldp_p | |||
#endif | #endif | |||
{ | { | |||
/*!\var p | /*!\var p | |||
skipping to change at line 124 | skipping to change at line 124 | |||
* Functions for generating keys | * Functions for generating keys | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int dldp_pPrivate (const dldp_p*, randomGeneratorContext*, mpnumber*); | int dldp_pPrivate (const dldp_p*, randomGeneratorContext*, mpnumber*); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int dldp_pPrivate_s(const dldp_p*, randomGeneratorContext*, mpnumber*, size _t); | int dldp_pPrivate_s(const dldp_p*, randomGeneratorContext*, mpnumber*, size _t); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int dldp_pPublic (const dldp_p*, const mpnumber*, mpnumber*); | int dldp_pPublic (const dldp_p*, const mpnumber*, mpnumber*); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int dldp_pPair (const dldp_p*, randomGeneratorContext*, mpnumber*, mpnu mber*); | int dldp_pPair (const dldp_p*, randomGeneratorContext*, mpnumber* x, mp number* y); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int dldp_pPair_s (const dldp_p*, randomGeneratorContext*, mpnumber*, mpnu mber*, size_t); | int dldp_pPair_s (const dldp_p*, randomGeneratorContext*, mpnumber* x, mp number* y, size_t); | |||
/* | /* | |||
* Function for comparing domain parameters | * Function for comparing domain parameters | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int dldp_pEqual (const dldp_p*, const dldp_p*); | int dldp_pEqual (const dldp_p*, const dldp_p*); | |||
/* | /* | |||
* Functions for generating and validating dldp_pgoq variant domain paramet ers | * Functions for generating and validating dldp_pgoq variant domain paramet ers | |||
End of changes. 5 change blocks. | ||||
5 lines changed or deleted | 5 lines changed or added | |||
dlkp.h | dlkp.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file dlkp.h | /*!\file dlkp.h | |||
* \brief Discrete Logarithm keypair, headers. | * \brief Discrete Logarithm keypair, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup DL_m | * \ingroup DL_m | |||
*/ | */ | |||
#ifndef _DLKP_H | #ifndef _DLKP_H | |||
#define _DLKP_H | #define _DLKP_H | |||
#include "beecrypt/dlpk.h" | #include "beecrypt/dlpk.h" | |||
/*!\ingroup DL_m | /*!\ingroup DL_m | |||
*/ | */ | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
dlpk.h | dlpk.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file dlpk.h | /*!\file dlpk.h | |||
* \brief Discrete Logarithm public key, headers. | * \brief Discrete Logarithm public key, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup DL_m | * \ingroup DL_m | |||
*/ | */ | |||
#ifndef _DLPK_H | #ifndef _DLPK_H | |||
#define _DLPK_H | #define _DLPK_H | |||
#include "beecrypt/dldp.h" | #include "beecrypt/dldp.h" | |||
/*!\ingroup DL_m | /*!\ingroup DL_m | |||
*/ | */ | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
dlsvdp-dh.h | dlsvdp-dh.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file dlsvdp-dh.h | /*!\file dlsvdp-dh.h | |||
* \brief Diffie-Hellman algorithm, headers. | * \brief Diffie-Hellman algorithm, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup DL_m DL_dh_m | * \ingroup DL_m DL_dh_m | |||
*/ | */ | |||
#ifndef _DLSVDP_DH_H | #ifndef _DLSVDP_DH_H | |||
#define _DLSVDP_DH_H | #define _DLSVDP_DH_H | |||
#include "beecrypt/dldp.h" | ||||
#include "beecrypt/dlkp.h" | #include "beecrypt/dlkp.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
typedef dldp_p dhparam; | typedef dldp_p dhparam; | |||
typedef dlkp_p dhkp; | typedef dlkp_p dhkp; | |||
BEECRYPTAPI | BEECRYPTAPI | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 2 lines changed or added | |||
dsa.h | dsa.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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. | |||
skipping to change at line 28 | skipping to change at line 28 | |||
*/ | */ | |||
/*!\file dsa.h | /*!\file dsa.h | |||
* \brief Digital Signature Algorithm, as specified by NIST FIPS 186. | * \brief Digital Signature Algorithm, as specified by NIST FIPS 186. | |||
* | * | |||
* FIPS 186 specifies the DSA algorithm as having a large prime \f$p\f$, | * FIPS 186 specifies the DSA algorithm as having a large prime \f$p\f$, | |||
* a cofactor \f$q\f$ and a generator \f$g\f$ of a subgroup of | * a cofactor \f$q\f$ and a generator \f$g\f$ of a subgroup of | |||
* \f$\mathds{Z}^{*}_p\f$ with order \f$q\f$. The private and public key | * \f$\mathds{Z}^{*}_p\f$ with order \f$q\f$. The private and public key | |||
* values are \f$x\f$ and \f$y\f$ respectively. | * values are \f$x\f$ and \f$y\f$ respectively. | |||
* | * | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup DL_dsa_m | * \ingroup DL_dsa_m | |||
*/ | */ | |||
#ifndef _DSA_H | #ifndef _DSA_H | |||
#define _DSA_H | #define _DSA_H | |||
#include "beecrypt/dlkp.h" | #include "beecrypt/dlkp.h" | |||
typedef dldp_p dsaparam; | typedef dldp_p dsaparam; | |||
typedef dlpk_p dsapub; | typedef dlpk_p dsapub; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
elgamal.h | elgamal.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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. | |||
skipping to change at line 34 | skipping to change at line 34 | |||
* "Handbook of Applied Cryptography", | * "Handbook of Applied Cryptography", | |||
* 11.5.2: "The ElGamal signature scheme", p. 454-459 | * 11.5.2: "The ElGamal signature scheme", p. 454-459 | |||
* | * | |||
* Two of the signature variants in Note 11.70 are implemented. | * Two of the signature variants in Note 11.70 are implemented. | |||
* | * | |||
* \todo Implement ElGamal encryption and decryption. | * \todo Implement ElGamal encryption and decryption. | |||
* | * | |||
* \todo Explore the possibility of using simultaneous multiple exponentiat ion, | * \todo Explore the possibility of using simultaneous multiple exponentiat ion, | |||
* as described in HAC, 14.87 (iii). | * as described in HAC, 14.87 (iii). | |||
* | * | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup DL_m DL_elgamal_m | * \ingroup DL_m DL_elgamal_m | |||
*/ | */ | |||
#ifndef _ELGAMAL_H | #ifndef _ELGAMAL_H | |||
#define _ELGAMAL_H | #define _ELGAMAL_H | |||
#include "beecrypt/mpbarrett.h" | #include "beecrypt/mpbarrett.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/*!\fn int elgv1sign(const mpbarrett* p, const mpbarrett* n, const mpnumber | /*!\fn int elgv1sign(const mpbarrett* p, const mpbarrett* n, const mpnumber | |||
* g, | * g, randomGeneratorContext* rgc, const mpnumber* hm, const mpnumber* x, mp | |||
randomGeneratorContext* rgc, const mpnumber* hm, const mpnumber* x, mpnumbe | number* r, mpnumber* s) | |||
r* r, | ||||
mpnumber* s) | ||||
* \brief This function performs raw ElGamal signing, variant 1. | * \brief This function performs raw ElGamal signing, variant 1. | |||
* | * | |||
* Signing equations: | * Signing equations: | |||
* | * | |||
* \li \f$r=g^{k}\ \textrm{mod}\ p\f$ | * \li \f$r=g^{k}\ \textrm{mod}\ p\f$ | |||
* \li \f$s=k^{-1}(h(m)-xr)\ \textrm{mod}\ (p-1)\f$ | * \li \f$s=k^{-1}(h(m)-xr)\ \textrm{mod}\ (p-1)\f$ | |||
* | * | |||
* \param p The prime. | * \param p The prime. | |||
* \param n The reducer mod (p-1). | * \param n The reducer mod (p-1). | |||
* \param g The generator. | * \param g The generator. | |||
End of changes. 3 change blocks. | ||||
7 lines changed or deleted | 5 lines changed or added | |||
endianness.h | endianness.h | |||
---|---|---|---|---|
/* | /* | |||
* endianness.h | * Copyright (c) 1998, 1999, 2000, 2001, 2004 X-Way Rights BV | |||
* | ||||
* Endian-dependant encoding/decoding, header | ||||
* | ||||
* Copyright (c) 1998, 1999, 2000, 2001, 2004 Beeyond Software Holding | ||||
* | ||||
* Author: Bob Deblier <bob.deblier@telenet.be> | ||||
* | * | |||
* 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. | |||
End of changes. 1 change blocks. | ||||
7 lines changed or deleted | 1 lines changed or added | |||
entropy.h | entropy.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 1998, 1999, 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 1998, 1999, 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file entropy.h | /*!\file entropy.h | |||
* \brief Entropy sources, headers. | * \brief Entropy sources, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup ES_m ES_audio_m ES_dsp_m ES_random_m ES_urandom_m ES_tty_m | * \ingroup ES_m ES_audio_m ES_dsp_m ES_random_m ES_urandom_m ES_tty_m | |||
*/ | */ | |||
#ifndef _ENTROPY_H | #ifndef _ENTROPY_H | |||
#define _ENTROPY_H | #define _ENTROPY_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#if WIN32 | #if WIN32 | |||
#include <windows.h> | #include <windows.h> | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
fips186.h | fips186.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 1998, 1999, 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 1998, 1999, 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file fips186.h | /*!\file fips186.h | |||
* \brief FIPS-186 pseudo-random number generator, headers. | * \brief FIPS-186 pseudo-random number generator, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup PRNG_m PRNG_fips186_m | * \ingroup PRNG_m PRNG_fips186_m | |||
*/ | */ | |||
#ifndef _FIPS186_H | #ifndef _FIPS186_H | |||
#define _FIPS186_H | #define _FIPS186_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#ifdef _REENTRANT | #ifdef _REENTRANT | |||
# if WIN32 | # if WIN32 | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
gnu.h | gnu.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2003 Bob Deblier | * Copyright (c) 2003, 2009 Bob Deblier | |||
* | * | |||
* 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_GNU_H | #ifndef _BEECRYPT_GNU_H | |||
#define _BEECRYPT_GNU_H | #define _BEECRYPT_GNU_H | |||
#if __MINGW32__ | ||||
# define _REENTRANT | ||||
# if !defined(_WIN32_WINNT) | ||||
# define _WIN32_WINNT 0x0400 | ||||
# endif | ||||
# include <windows.h> | ||||
#endif | ||||
#include <inttypes.h> | #include <inttypes.h> | |||
#include <stdint.h> | #include <stdint.h> | |||
#include <pthread.h> | #include <pthread.h> | |||
#include <semaphore.h> | ||||
#include <sched.h> | ||||
#include <stdio.h> | #include <stdio.h> | |||
#include <stdlib.h> | #include <stdlib.h> | |||
#include <string.h> | #include <string.h> | |||
#include <unistd.h> | #include <unistd.h> | |||
#include <dlfcn.h> | #include <dlfcn.h> | |||
typedef pthread_cond_t bc_cond_t; | typedef pthread_cond_t bc_cond_t; | |||
typedef pthread_mutex_t bc_mutex_t; | typedef pthread_mutex_t bc_mutex_t; | |||
typedef pthread_t bc_thread_t; | typedef pthread_t bc_thread_t; | |||
typedef pthread_t bc_threadid_t; | ||||
#if defined(__GNUC__) | #if defined(__GNUC__) | |||
# if !defined(__GNUC_PREREQ__) | # if !defined(__GNUC_PREREQ__) | |||
# define __GNUC_PREREQ__(maj, min) (__GNUC__ > (maj) || __GNUC__ == (maj) && __GNUC_MINOR__ >= (min)) | # define __GNUC_PREREQ__(maj, min) (__GNUC__ > (maj) || __GNUC__ == (maj) && __GNUC_MINOR__ >= (min)) | |||
# endif | # endif | |||
#else | #else | |||
# define __GNUC__ 0 | # define __GNUC__ 0 | |||
# define __GNUC_PREREQ__(maj, min) 0 | # define __GNUC_PREREQ__(maj, min) 0 | |||
#endif | #endif | |||
End of changes. 4 change blocks. | ||||
1 lines changed or deleted | 12 lines changed or added | |||
hmac.h | hmac.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 1999, 2000, 2002 Virtual Unlimited B.V. | * Copyright (c) 1999, 2000, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file hmac.h | /*!\file hmac.h | |||
* \brief HMAC algorithm, headers. | * \brief HMAC algorithm, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup HMAC_m | * \ingroup HMAC_m | |||
*/ | */ | |||
#ifndef _HMAC_H | #ifndef _HMAC_H | |||
#define _HMAC_H | #define _HMAC_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
/*!\ingroup HMAC_m | /*!\ingroup HMAC_m | |||
*/ | */ | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
hmacmd5.h | hmacmd5.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file hmacmd5.h | /*!\file hmacmd5.h | |||
* \brief HMAC-MD5 message authentication code, headers. | * \brief HMAC-MD5 message authentication code, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup HMAC_m HMAC_md5_m | * \ingroup HMAC_m HMAC_md5_m | |||
*/ | */ | |||
#ifndef _HMACMD5_H | #ifndef _HMACMD5_H | |||
#define _HMACMD5_H | #define _HMACMD5_H | |||
#include "beecrypt/hmac.h" | #include "beecrypt/hmac.h" | |||
#include "beecrypt/md5.h" | #include "beecrypt/md5.h" | |||
/*!\ingroup HMAC_md5_m | /*!\ingroup HMAC_md5_m | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
hmacsha1.h | hmacsha1.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 1999, 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 1999, 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file hmacsha1.h | /*!\file hmacsha1.h | |||
* \brief HMAC-SHA-1 message authentication code, headers. | * \brief HMAC-SHA-1 message authentication code, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup HMAC_m HMAC_sha1_m | * \ingroup HMAC_m HMAC_sha1_m | |||
*/ | */ | |||
#ifndef _HMACSHA1_H | #ifndef _HMACSHA1_H | |||
#define _HMACSHA1_H | #define _HMACSHA1_H | |||
#include "beecrypt/hmac.h" | #include "beecrypt/hmac.h" | |||
#include "beecrypt/sha1.h" | #include "beecrypt/sha1.h" | |||
/*!\ingroup HMAC_sha1_m | /*!\ingroup HMAC_sha1_m | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
hmacsha256.h | hmacsha256.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file hmacsha256.h | /*!\file hmacsha256.h | |||
* \brief HMAC-SHA-256 message authentication code, headers. | * \brief HMAC-SHA-256 message authentication code, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup HMAC_m HMAC_sha256_m | * \ingroup HMAC_m HMAC_sha256_m | |||
*/ | */ | |||
#ifndef _HMACSHA256_H | #ifndef _HMACSHA256_H | |||
#define _HMACSHA256_H | #define _HMACSHA256_H | |||
#include "beecrypt/hmac.h" | #include "beecrypt/hmac.h" | |||
#include "beecrypt/sha256.h" | #include "beecrypt/sha256.h" | |||
/*!\ingroup HMAC_sha256_m | /*!\ingroup HMAC_sha256_m | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
hmacsha384.h | hmacsha384.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2004 Beeyond Software Holding B.V. | * Copyright (c) 2004 X-Way Rights BV | |||
* | * | |||
* 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. | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
hmacsha512.h | hmacsha512.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file hmacsha512.h | /*!\file hmacsha512.h | |||
* \brief HMAC-SHA-512 message authentication code, headers. | * \brief HMAC-SHA-512 message authentication code, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup HMAC_m HMAC_sha512_m | * \ingroup HMAC_m HMAC_sha512_m | |||
*/ | */ | |||
#ifndef _HMACSHA512_H | #ifndef _HMACSHA512_H | |||
#define _HMACSHA512_H | #define _HMACSHA512_H | |||
#include "beecrypt/hmac.h" | #include "beecrypt/hmac.h" | |||
#include "beecrypt/sha512.h" | #include "beecrypt/sha512.h" | |||
/*!\ingroup HMAC_sha512_m | /*!\ingroup HMAC_sha512_m | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
md5.h | md5.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file md5.h | /*!\file md5.h | |||
* \brief MD5 hash function. | * \brief MD5 hash function. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup HASH_m HASH_md5_m | * \ingroup HASH_m HASH_md5_m | |||
*/ | */ | |||
#ifndef _MD5_H | #ifndef _MD5_H | |||
#define _MD5_H | #define _MD5_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
/*!\brief Holds all the parameters necessary for the MD5 algorithm. | /*!\brief Holds all the parameters necessary for the MD5 algorithm. | |||
* \ingroup HASH_md5_h | * \ingroup HASH_md5_h | |||
skipping to change at line 72 | skipping to change at line 72 | |||
}; | }; | |||
#ifndef __cplusplus | #ifndef __cplusplus | |||
typedef struct _md5Param md5Param; | typedef struct _md5Param md5Param; | |||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/*!\var sha1 | /*!\var md5 | |||
* \brief Holds the full API description of the MD5 algorithm. | * \brief Holds the full API description of the MD5 algorithm. | |||
*/ | */ | |||
extern BEECRYPTAPI const hashFunction md5; | extern BEECRYPTAPI const hashFunction md5; | |||
/*!\fn int md5Reset(md5Param* mp) | /*!\fn int md5Reset(md5Param* mp) | |||
* \brief This function resets the parameter block so that it's ready for a | * \brief This function resets the parameter block so that it's ready for a | |||
* new hash. | * new hash. | |||
* \param mp The hash function's parameter block. | * \param mp The hash function's parameter block. | |||
* \retval 0 on success. | * \retval 0 on success. | |||
*/ | */ | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||
memchunk.h | memchunk.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2001 Virtual Unlimited B.V. | * Copyright (c) 2001 X-Way Rights BV | |||
* | * | |||
* 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 | |||
*/ | */ | |||
/*!\file memchunk.h | /*!\file memchunk.h | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
*/ | */ | |||
#ifndef _MEMCHUNK_H | #ifndef _MEMCHUNK_H | |||
#define _MEMCHUNK_H | #define _MEMCHUNK_H | |||
#include "beecrypt/api.h" | #include "beecrypt/api.h" | |||
typedef struct | typedef struct | |||
{ | { | |||
size_t size; | size_t size; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
mp.h | mp.h | |||
---|---|---|---|---|
skipping to change at line 37 | skipping to change at line 37 | |||
* <li>mpaddmul | * <li>mpaddmul | |||
* <li>mpsetmul | * <li>mpsetmul | |||
* <li>mpaddsqrtrc | * <li>mpaddsqrtrc | |||
* <li>mpsub | * <li>mpsub | |||
* <li>mpadd | * <li>mpadd | |||
* </ul> | * </ul> | |||
* | * | |||
* With some smart use of available assembler instructions, it's possible | * With some smart use of available assembler instructions, it's possible | |||
* to speed these routines up by a factor of 2 to 4. | * to speed these routines up by a factor of 2 to 4. | |||
* | * | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup MP_m | * \ingroup MP_m | |||
*/ | */ | |||
#ifndef _MP_H | #ifndef _MP_H | |||
#define _MP_H | #define _MP_H | |||
#include "beecrypt/api.h" | #include "beecrypt/api.h" | |||
#include "beecrypt/mpopt.h" | #include "beecrypt/mpopt.h" | |||
#define MP_HWBITS (MP_WBITS >> 1) | #define MP_HWBITS (MP_WBITS >> 1) | |||
skipping to change at line 225 | skipping to change at line 225 | |||
* \note The comparison treats the arguments as unsigned. | * \note The comparison treats the arguments as unsigned. | |||
* \param size The size of the multi-precision integers. | * \param size The size of the multi-precision integers. | |||
* \param xdata The first multi-precision integer. | * \param xdata The first multi-precision integer. | |||
* \param ydata The second multi-precision integer. | * \param ydata The second multi-precision integer. | |||
* \retval 1 if less or equal | * \retval 1 if less or equal | |||
* \retval 0 if greater | * \retval 0 if greater | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int mple (size_t size, const mpw* xdata, const mpw* ydata); | int mple (size_t size, const mpw* xdata, const mpw* ydata); | |||
/*!\fn int mpcmp(size_t size, const mpw* xdata, const mpw* ydata) | ||||
* \brief This function performs a comparison of two multi-precision | ||||
* integers of the same size. | ||||
* \note The comparison treats the arguments as unsigned. | ||||
* \retval -1 if x < y | ||||
* \retval 0 if x == y | ||||
* \retval 1 if x > y | ||||
*/ | ||||
BEECRYPTAPI | ||||
int mpcmp(size_t size, const mpw* xdata, const mpw* ydata); | ||||
/*!\fn int mpeqx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* y data) | /*!\fn int mpeqx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* y data) | |||
* \brief This function tests if two multi-precision integers of different | * \brief This function tests if two multi-precision integers of different | |||
* size are equal. | * size are equal. | |||
* \param xsize The size of the first multi-precision integer. | * \param xsize The size of the first multi-precision integer. | |||
* \param xdata The first multi-precision integer. | * \param xdata The first multi-precision integer. | |||
* \param ysize The size of the first multi-precision integer. | * \param ysize The size of the first multi-precision integer. | |||
* \param ydata The second multi-precision integer. | * \param ydata The second multi-precision integer. | |||
* \retval 1 if equal | * \retval 1 if equal | |||
* \retval 0 if not equal | * \retval 0 if not equal | |||
*/ | */ | |||
skipping to change at line 307 | skipping to change at line 318 | |||
* \param xsize The size of the first multi-precision integer. | * \param xsize The size of the first multi-precision integer. | |||
* \param xdata The first multi-precision integer. | * \param xdata The first multi-precision integer. | |||
* \param ysize The size of the second multi-precision integer. | * \param ysize The size of the second multi-precision integer. | |||
* \param ydata The second multi-precision integer. | * \param ydata The second multi-precision integer. | |||
* \retval 1 if less or equal | * \retval 1 if less or equal | |||
* \retval 0 if greater | * \retval 0 if greater | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int mplex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata); | int mplex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata); | |||
/*!\fn int mpcmpx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* | ||||
ydata) | ||||
* \brief This function performs a comparison of two multi-precision | ||||
* integers of the different size. | ||||
* \note The comparison treats the arguments as unsigned. | ||||
* \retval -1 if x < y | ||||
* \retval 0 if x == y | ||||
* \retval 1 if x > y | ||||
*/ | ||||
BEECRYPTAPI | ||||
int mpcmpx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata); | ||||
/*!\fn int mpisone(size_t size, const mpw* data) | /*!\fn int mpisone(size_t size, const mpw* data) | |||
* \brief This functions tests if the value of a multi-precision integer is | * \brief This functions tests if the value of a multi-precision integer is | |||
* equal to one. | * equal to one. | |||
* \param size The size of the multi-precision integer. | * \param size The size of the multi-precision integer. | |||
* \param data The multi-precision integer data. | * \param data The multi-precision integer data. | |||
* \retval 1 if one | * \retval 1 if one | |||
* \retval 0 if not one | * \retval 0 if not one | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int mpisone(size_t size, const mpw* data); | int mpisone(size_t size, const mpw* data); | |||
skipping to change at line 453 | skipping to change at line 475 | |||
* \param data The multi-precision integer data. | * \param data The multi-precision integer data. | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
void mpnot(size_t size, mpw* data); | void mpnot(size_t size, mpw* data); | |||
/*!\fn void mpsetw(size_t size, mpw* xdata, mpw y) | /*!\fn void mpsetw(size_t size, mpw* xdata, mpw y) | |||
* \brief This function sets the value of a multi-precision integer to the | * \brief This function sets the value of a multi-precision integer to the | |||
* given word. The given value is copied into the least significant word, | * given word. The given value is copied into the least significant word, | |||
* while the most significant words are zeroed. | * while the most significant words are zeroed. | |||
* \param size The size of the multi-precision integer. | * \param size The size of the multi-precision integer. | |||
* \param xdata The first multi-precision integer. | * \param xdata The multi-precision integer data. | |||
* \param y The multi-precision word. | * \param y The value to be assigned. | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
void mpsetw(size_t size, mpw* xdata, mpw y); | void mpsetw(size_t size, mpw* xdata, mpw y); | |||
/*!\fn void mpsetws(size_t size, mpw* xdata, size_t y) | ||||
* \brief This function sets the value of a multi-precision integer to the | ||||
* given word. The given value is copied into the least significant word(s | ||||
), | ||||
* while the most significant words are zeroed. | ||||
* \param size The size of the multi-precision integer. | ||||
* \param xdata The multi-precision integer data. | ||||
* \param y The value. | ||||
*/ | ||||
BEECRYPTAPI | ||||
void mpsetws(size_t size, mpw* xdata, size_t y); | ||||
/*!\fn void mpsetx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata ) | /*!\fn void mpsetx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata ) | |||
* \brief This function set the value of the first multi-precision integer | * \brief This function set the value of the first multi-precision integer | |||
* to the second, truncating the most significant words if ysize > xsize, or | * to the second, truncating the most significant words if ysize > xsize, or | |||
* zeroing the most significant words if ysize < xsize. | * zeroing the most significant words if ysize < xsize. | |||
* \param xsize The size of the first multi-precision integer. | * \param xsize The size of the first multi-precision integer. | |||
* \param xdata The first multi-precision integer. | * \param xdata The first multi-precision integer. | |||
* \param ysize The size of the second multi-precision integer. | * \param ysize The size of the second multi-precision integer. | |||
* \param ydata The second multi-precision integer. | * \param ydata The second multi-precision integer. | |||
*/ | */ | |||
BEECRYPTAPI | ||||
void mpsetx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata); | void mpsetx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata); | |||
/*!\fn int mpaddw(size_t size, mpw* xdata, mpw y) | /*!\fn int mpaddw(size_t size, mpw* xdata, mpw y) | |||
* \brief This function adds one word to a multi-precision integer. | * \brief This function adds one word to a multi-precision integer. | |||
* The performed operation is in pseudocode: x += y. | * The performed operation is in pseudocode: x += y. | |||
* \param size The size of the multi-precision integer. | * \param size The size of the multi-precision integer. | |||
* \param xdata The first multi-precision integer. | * \param xdata The first multi-precision integer. | |||
* \param y The multi-precision word. | * \param y The multi-precision word. | |||
* \return The carry-over value of the operation; this value is either 0 or 1. | * \return The carry-over value of the operation; this value is either 0 or 1. | |||
*/ | */ | |||
skipping to change at line 679 | skipping to change at line 713 | |||
void mpfprint(FILE* f, size_t size, const mpw* data); | void mpfprint(FILE* f, size_t size, const mpw* data); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
void mpfprintln(FILE* f, size_t size, const mpw* data); | void mpfprintln(FILE* f, size_t size, const mpw* data); | |||
/* | /* | |||
* Conversion Routines | * Conversion Routines | |||
*/ | */ | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int os2ip(mpw* idata, size_t isize, const byte* osdata, size_t ossize); | int i2osp(byte* osdata, size_t ossize, const mpw* idata, size_t isize); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int i2osp(byte* osdata, size_t ossize, const mpw* idata, size_t isize); | int os2ip(mpw* idata, size_t isize, const byte* osdata, size_t ossize); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
int hs2ip(mpw* idata, size_t isize, const char* hsdata, size_t hssize); | int hs2ip(mpw* idata, size_t isize, const char* hsdata, size_t hssize); | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 8 change blocks. | ||||
5 lines changed or deleted | 41 lines changed or added | |||
mpbarrett.h | mpbarrett.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file mpbarrett.h | /*!\file mpbarrett.h | |||
* \brief Multi-precision integer routines using Barrett modular reduction, headers. | * \brief Multi-precision integer routines using Barrett modular reduction, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup MP_m | * \ingroup MP_m | |||
*/ | */ | |||
#ifndef _MPBARRETT_H | #ifndef _MPBARRETT_H | |||
#define _MPBARRETT_H | #define _MPBARRETT_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#include "beecrypt/mpnumber.h" | #include "beecrypt/mpnumber.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
skipping to change at line 52 | skipping to change at line 52 | |||
size_t size; | size_t size; | |||
mpw* modl; /* (size) words */ | mpw* modl; /* (size) words */ | |||
mpw* mu; /* (size+1) words */ | mpw* mu; /* (size+1) words */ | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
mpbarrett(); | mpbarrett(); | |||
mpbarrett(const mpbarrett&); | mpbarrett(const mpbarrett&); | |||
~mpbarrett(); | ~mpbarrett(); | |||
const mpbarrett& operator=(const mpbarrett&); | const mpbarrett& operator=(const mpbarrett&); | |||
bool operator==(const mpbarrett&) const throw (); | ||||
bool operator!=(const mpbarrett&) const throw (); | ||||
void wipe(); | void wipe(); | |||
size_t bitlength() const throw (); | ||||
size_t bitlength() const; | ||||
#endif | #endif | |||
}; | }; | |||
#ifndef __cplusplus | #ifndef __cplusplus | |||
typedef struct _mpbarrett mpbarrett; | typedef struct _mpbarrett mpbarrett; | |||
#else | #else | |||
BEECRYPTAPI | BEECRYPTAPI | |||
std::ostream& operator<<(std::ostream&, const mpbarrett&); | std::ostream& operator<<(std::ostream&, const mpbarrett&); | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 3 lines changed or added | |||
mpnumber.h | mpnumber.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file mpnumber.h | /*!\file mpnumber.h | |||
* \brief Multi-precision numbers, headers. | * \brief Multi-precision numbers, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup MP_m | * \ingroup MP_m | |||
*/ | */ | |||
#ifndef _MPNUMBER_H | #ifndef _MPNUMBER_H | |||
#define _MPNUMBER_H | #define _MPNUMBER_H | |||
#include "beecrypt/mp.h" | #include "beecrypt/mp.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
# include <iostream> | # include <iostream> | |||
skipping to change at line 50 | skipping to change at line 50 | |||
{ | { | |||
size_t size; | size_t size; | |||
mpw* data; | mpw* data; | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
static const mpnumber ZERO; | static const mpnumber ZERO; | |||
static const mpnumber ONE; | static const mpnumber ONE; | |||
mpnumber(); | mpnumber(); | |||
mpnumber(unsigned int); | mpnumber(unsigned int); | |||
mpnumber(size_t, const mpw*); | ||||
mpnumber(const mpnumber&); | mpnumber(const mpnumber&); | |||
~mpnumber(); | ~mpnumber(); | |||
const mpnumber& operator=(const mpnumber&); | const mpnumber& operator=(const mpnumber&); | |||
bool operator==(const mpnumber&) const throw (); | ||||
bool operator!=(const mpnumber&) const throw (); | ||||
void wipe(); | void wipe(); | |||
size_t bitlength() const throw (); | size_t bitlength() const; | |||
#endif | #endif | |||
}; | }; | |||
#ifndef __cplusplus | #ifndef __cplusplus | |||
typedef struct _mpnumber mpnumber; | typedef struct _mpnumber mpnumber; | |||
#else | #else | |||
BEECRYPTAPI | BEECRYPTAPI | |||
std::ostream& operator<<(std::ostream&, const mpnumber&); | std::ostream& operator<<(std::ostream&, const mpnumber&); | |||
/* | ||||
BEECRYPTAPI | ||||
std::istream& operator>>(std::istream&, mpnumber&); | ||||
*/ | ||||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
BEECRYPTAPI | BEECRYPTAPI | |||
void mpnzero(mpnumber*); | void mpnzero(mpnumber*); | |||
BEECRYPTAPI | BEECRYPTAPI | |||
void mpnsize(mpnumber*, size_t); | void mpnsize(mpnumber*, size_t); | |||
End of changes. 5 change blocks. | ||||
8 lines changed or deleted | 3 lines changed or added | |||
mpopt.h | mpopt.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file mpopt.h | /*!\file mpopt.h | |||
* \brief Multi-precision integer optimization definitions. | * \brief Multi-precision integer optimization definitions. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup MP_m | * \ingroup MP_m | |||
*/ | */ | |||
#ifndef _MPOPT_H | #ifndef _MPOPT_H | |||
#define _MPOPT_H | #define _MPOPT_H | |||
#if WIN32 | #if WIN32 | |||
# if __MWERKS__ && __INTEL__ | # if __MWERKS__ && __INTEL__ | |||
# elif defined(_MSC_VER) && defined(_M_IX86) | # elif defined(_MSC_VER) && defined(_M_IX86) | |||
# define ASM_MPZERO | # define ASM_MPZERO | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
mpprime.h | mpprime.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file mpprime.h | /*!\file mpprime.h | |||
* \brief Multi-precision primes, headers. | * \brief Multi-precision primes, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup MP_m | * \ingroup MP_m | |||
*/ | */ | |||
#ifndef _MPPRIME_H | #ifndef _MPPRIME_H | |||
#define _MPPRIME_H | #define _MPPRIME_H | |||
#include "beecrypt/mpbarrett.h" | #include "beecrypt/mpbarrett.h" | |||
#define SMALL_PRIMES_PRODUCT_MAX 32 | #define SMALL_PRIMES_PRODUCT_MAX 32 | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
mtprng.h | mtprng.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 1998, 1999, 2000, 2003 Virtual Unlimited B.V. | * Copyright (c) 1998, 1999, 2000, 2003 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file mtprng.h | /*!\file mtprng.h | |||
* \brief Mersenne Twister pseudo-random number generator, headers. | * \brief Mersenne Twister pseudo-random number generator, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup PRNG_m | * \ingroup PRNG_m | |||
*/ | */ | |||
#ifndef _MTPRNG_H | #ifndef _MTPRNG_H | |||
#define _MTPRNG_H | #define _MTPRNG_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#ifdef _REENTRANT | #ifdef _REENTRANT | |||
# if WIN32 | # if WIN32 | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
pkcs1.h | pkcs1.h | |||
---|---|---|---|---|
/* | ||||
* Copyright (c) 2004 X-Way Rights BV | ||||
* | ||||
* This library is free software; you can redistribute it and/or | ||||
* modify it under the terms of the GNU Lesser General Public | ||||
* License as published by the Free Software Foundation; either | ||||
* 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, | ||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
* Lesser General Public License for more details. | ||||
* | ||||
* You should have received a copy of the GNU Lesser General Public | ||||
* 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 | ||||
* | ||||
*/ | ||||
/*!\file pkcs1.h | /*!\file pkcs1.h | |||
* \brief PKCS#1 utility routines | * \brief PKCS#1 utility routines | |||
* \author Bob Deblier <bob.deblier@telenet.be> | ||||
* \ingroup PKCS1_m | * \ingroup PKCS1_m | |||
*/ | */ | |||
#ifndef _PKCS1_H | #ifndef _PKCS1_H | |||
#define _PKCS1_H | #define _PKCS1_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 21 lines changed or added | |||
pkcs12.h | pkcs12.h | |||
---|---|---|---|---|
/* | ||||
* Copyright (c) 2004 X-Way Rights BV | ||||
* | ||||
* This library is free software; you can redistribute it and/or | ||||
* modify it under the terms of the GNU Lesser General Public | ||||
* License as published by the Free Software Foundation; either | ||||
* 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, | ||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
* Lesser General Public License for more details. | ||||
* | ||||
* You should have received a copy of the GNU Lesser General Public | ||||
* 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 | ||||
* | ||||
*/ | ||||
/*!\file pkcs12.h | /*!\file pkcs12.h | |||
* \brief PKCS#12 utility routines | * \brief PKCS#12 utility routines | |||
* \ingroup PKCS12_m | * \ingroup PKCS12_m | |||
* \author Bob Deblier <bob.deblier@telenet.be> | ||||
*/ | */ | |||
#ifndef _PKCS12_H | #ifndef _PKCS12_H | |||
#define _PKCS12_H | #define _PKCS12_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 21 lines changed or added | |||
sha1.h | sha1.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 1997, 1998, 1999, 2000, 2002 Virtual Unlimited B.V. | * Copyright (c) 1997, 1998, 1999, 2000, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file sha1.h | /*!\file sha1.h | |||
* \brief SHA-1 hash function, headers. | * \brief SHA-1 hash function, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup HASH_m HASH_sha1_m | * \ingroup HASH_m HASH_sha1_m | |||
*/ | */ | |||
#ifndef _SHA1_H | #ifndef _SHA1_H | |||
#define _SHA1_H | #define _SHA1_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
#include "beecrypt/sha1opt.h" | #include "beecrypt/sha1opt.h" | |||
/*!\brief Holds all the parameters necessary for the SHA-1 algorithm. | /*!\brief Holds all the parameters necessary for the SHA-1 algorithm. | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
sha1opt.h | sha1opt.h | |||
---|---|---|---|---|
/* | /* | |||
* sha1opt.h | * Copyright (c) 2000, 2003 X-Way Rights BV | |||
* | ||||
* SHA-1 assembler-optimized routines, header | ||||
* | ||||
* Copyright (c) 2000, 2003 Virtual Unlimited B.V. | ||||
* | ||||
* Author: Bob Deblier <bob.deblier@pandora.be> | ||||
* | * | |||
* 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. | |||
End of changes. 1 change blocks. | ||||
7 lines changed or deleted | 1 lines changed or added | |||
sha256.h | sha256.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. | * Copyright (c) 2000, 2001, 2002 X-Way Rights BV | |||
* | * | |||
* 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 | |||
* | * | |||
*/ | */ | |||
/*!\file sha256.h | /*!\file sha256.h | |||
* \brief SHA-256 hash function, headers. | * \brief SHA-256 hash function, headers. | |||
* \author Bob Deblier <bob.deblier@pandora.be> | * \author Bob Deblier <bob.deblier@telenet.be> | |||
* \ingroup HASH_m HASH_sha256_m | * \ingroup HASH_m HASH_sha256_m | |||
*/ | */ | |||
#ifndef _SHA256_H | #ifndef _SHA256_H | |||
#define _SHA256_H | #define _SHA256_H | |||
#include "beecrypt/beecrypt.h" | #include "beecrypt/beecrypt.h" | |||
/*!\brief Holds all the parameters necessary for the SHA-256 algorithm. | /*!\brief Holds all the parameters necessary for the SHA-256 algorithm. | |||
* \ingroup HASH_sha256_m | * \ingroup HASH_sha256_m | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
sha384.h | sha384.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2004 Beeyond Software Holding BV | * Copyright (c) 2004 X-Way Rights BV | |||
* | * | |||
* 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. | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
sha512.h | sha512.h | |||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2004 Beeyond Software Holding BV | * Copyright (c) 2004 X-Way Rights BV | |||
* | * | |||
* 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. | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||