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

beecrypt/beecrypt.c File Reference

BeeCrypt library hooks & stubs, code. More...

#include "system.h"
#include "beecrypt.h"
#include "endianness.h"
#include "entropy.h"
#include "fips186.h"
#include "hmacmd5.h"
#include "hmacsha1.h"
#include "hmacsha256.h"
#include "md5.h"
#include "mp32.h"
#include "mtprng.h"
#include "sha1.h"
#include "sha256.h"
#include "aes.h"
#include "blowfish.h"
#include "blockmode.h"
#include "debug.h"

Go to the source code of this file.

Defines

#define ENTROPYSOURCES   (sizeof(entropySourceList) / sizeof(entropySource))
#define RANDOMGENERATORS   (sizeof(randomGeneratorList) / sizeof(randomGenerator*))
#define HASHFUNCTIONS   (sizeof(hashFunctionList) / sizeof(hashFunction*))
#define KEYEDHASHFUNCTIONS   (sizeof(keyedHashFunctionList) / sizeof(keyedHashFunction*))
#define BLOCKCIPHERS   (sizeof(blockCipherList) / sizeof(blockCipher*))

Functions

int entropySourceCount ()
const entropySource * entropySourceGet (int index)
const entropySource * entropySourceFind (const char *name)
const entropySource * entropySourceDefault ()
int entropyGatherNext (uint32 *data, int size)
int randomGeneratorCount ()
const randomGenerator * randomGeneratorGet (int index)
const randomGenerator * randomGeneratorFind (const char *name)
const randomGenerator * randomGeneratorDefault ()
int randomGeneratorContextInit (randomGeneratorContext *ctxt, const randomGenerator *rng)
int randomGeneratorContextFree (randomGeneratorContext *ctxt)
int randomGeneratorContextNext (randomGeneratorContext *ctxt, uint32 *data, int size)
int hashFunctionCount ()
const hashFunction * hashFunctionDefault ()
const hashFunction * hashFunctionGet (int index)
const hashFunction * hashFunctionFind (const char *name)
int hashFunctionContextInit (hashFunctionContext *ctxt, const hashFunction *hash)
int hashFunctionContextFree (hashFunctionContext *ctxt)
int hashFunctionContextReset (hashFunctionContext *ctxt)
int hashFunctionContextUpdate (hashFunctionContext *ctxt, const byte *data, int size)
int hashFunctionContextUpdateMC (hashFunctionContext *ctxt, const memchunk *m)
int hashFunctionContextUpdateMP32 (hashFunctionContext *ctxt, const mp32number *n)
int hashFunctionContextDigest (hashFunctionContext *ctxt, mp32number *dig)
int hashFunctionContextDigestMatch (hashFunctionContext *ctxt, const mp32number *match)
int keyedHashFunctionCount ()
const keyedHashFunction * keyedHashFunctionDefault ()
const keyedHashFunction * keyedHashFunctionGet (int index)
const keyedHashFunction * keyedHashFunctionFind (const char *name)
int keyedHashFunctionContextInit (keyedHashFunctionContext *ctxt, const keyedHashFunction *mac)
int keyedHashFunctionContextFree (keyedHashFunctionContext *ctxt)
int keyedHashFunctionContextSetup (keyedHashFunctionContext *ctxt, const uint32 *key, int keybits)
int keyedHashFunctionContextReset (keyedHashFunctionContext *ctxt)
int keyedHashFunctionContextUpdate (keyedHashFunctionContext *ctxt, const byte *data, int size)
int keyedHashFunctionContextUpdateMC (keyedHashFunctionContext *ctxt, const memchunk *m)
int keyedHashFunctionContextUpdateMP32 (keyedHashFunctionContext *ctxt, const mp32number *n)
int keyedHashFunctionContextDigest (keyedHashFunctionContext *ctxt, mp32number *dig)
int keyedHashFunctionContextDigestMatch (keyedHashFunctionContext *ctxt, const mp32number *match)
int blockCipherCount ()
const blockCipher * blockCipherDefault ()
const blockCipher * blockCipherGet (int index)
const blockCipher * blockCipherFind (const char *name)
int blockCipherContextInit (blockCipherContext *ctxt, const blockCipher *ciph)
int blockCipherContextSetup (blockCipherContext *ctxt, const uint32 *key, int keybits, cipherOperation op)
int blockCipherContextSetIV (blockCipherContext *ctxt, const uint32 *iv)
int blockCipherContextFree (blockCipherContext *ctxt)

Variables

entropySource entropySourceList []
const randomGenerator * randomGeneratorList []
const hashFunction * hashFunctionList []
const keyedHashFunction * keyedHashFunctionList []
const blockCipher * blockCipherList []


Detailed Description

BeeCrypt library hooks & stubs, code.

Definition in file beecrypt.c.


Define Documentation

#define BLOCKCIPHERS   (sizeof(blockCipherList) / sizeof(blockCipher*))
 

Definition at line 737 of file beecrypt.c.

Referenced by blockCipherCount, blockCipherFind, and blockCipherGet.

#define ENTROPYSOURCES   (sizeof(entropySourceList) / sizeof(entropySource))
 

Definition at line 87 of file beecrypt.c.

Referenced by entropyGatherNext, entropySourceCount, entropySourceFind, and entropySourceGet.

#define HASHFUNCTIONS   (sizeof(hashFunctionList) / sizeof(hashFunction*))
 

Definition at line 272 of file beecrypt.c.

Referenced by hashFunctionCount, hashFunctionFind, and hashFunctionGet.

#define KEYEDHASHFUNCTIONS   (sizeof(keyedHashFunctionList) / sizeof(keyedHashFunction*))
 

Definition at line 494 of file beecrypt.c.

Referenced by keyedHashFunctionCount, keyedHashFunctionFind, and keyedHashFunctionGet.

#define RANDOMGENERATORS   (sizeof(randomGeneratorList) / sizeof(randomGenerator*))
 

Definition at line 163 of file beecrypt.c.

Referenced by randomGeneratorCount, randomGeneratorFind, and randomGeneratorGet.


Function Documentation

int randomGeneratorContextNext (  randomGeneratorContext *    ctxt,
uint32 *    data,
int    size
) 
 

Definition at line 257 of file beecrypt.c.

References randomGenerator::next, randomGeneratorContext::param, randomGeneratorContext::rng, and uint32.


Variable Documentation

const blockCipher* blockCipherList[] [static]
 

Initial value:

{
        &aes,
        &blowfish
}

Definition at line 730 of file beecrypt.c.

entropySource entropySourceList[] [static]
 

Initial value:

{





















}

Definition at line 61 of file beecrypt.c.

const hashFunction* hashFunctionList[] [static]
 

Initial value:

{
        &md5,
        &sha1,
        &sha256
}

Definition at line 264 of file beecrypt.c.

const keyedHashFunction* keyedHashFunctionList[] [static]
 

Initial value:

{
        &hmacmd5,
        &hmacsha1,
        &hmacsha256
}

Definition at line 486 of file beecrypt.c.

const randomGenerator* randomGeneratorList[] [static]
 

Initial value:

{
        &fips186prng,
        &mtprng
}

Definition at line 156 of file beecrypt.c.


Generated on Wed Sep 4 12:49:58 2002 for rpm by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002