BeeCrypt  4.2.1
Files | Data Structures | Typedefs | Enumerations
Block ciphers
Collaboration diagram for Block ciphers:

Files

file  aes.h
 AES block cipher, as specified by NIST FIPS 197.
 
file  beecrypt.h
 BeeCrypt API, headers.
 
file  blockmode.h
 Blockcipher operation modes.
 
file  blockpad.h
 Blockcipher padding algorithms.
 
file  blowfish.h
 Blowfish block cipher.
 

Data Structures

struct  blockCipher
 Holds information and pointers to code specific to each cipher. More...
 
struct  blockCipherContext
 Holds a pointer to a blockcipher as well as its parameters. More...
 

Typedefs

typedef int(* blockCipherSetup )(blockCipherParam *, const byte *, size_t, cipherOperation)
 Prototype definition for a setup function. More...
 
typedef void blockCipherParam
 Placeholder type definition for blockcipher parameters. More...
 
typedef int(* blockCipherSetIV )(blockCipherParam *, const byte *)
 Prototype definition for an initialization vector setup function. More...
 
typedef int(* blockCipherSetCTR )(blockCipherParam *, const byte *, size_t)
 Prototype definition for an initialization vector setup function. More...
 
typedef int(* blockCipherRawcrypt )(blockCipherParam *, uint32_t *, const uint32_t *)
 Prototype for a raw encryption or decryption function. More...
 
typedef int(* blockCipherModcrypt )(blockCipherParam *, uint32_t *, const uint32_t *, unsigned int)
 Prototype for a encryption or decryption function which operates on multiple blocks in a certain mode. More...
 

Enumerations

enum  cipherOperation { NOCRYPT, ENCRYPT, DECRYPT }
 Specifies whether to perform encryption or decryption. More...
 

Detailed Description

Typedef Documentation

int(* blockCipherModcrypt)(blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)

Prototype for a encryption or decryption function which operates on multiple blocks in a certain mode.

Parameters
bpThe blockcipher's parameters.
dstThe ciphertext address; must be aligned on 32-bit boundary.
srcThe cleartext address; must be aligned on 32-bit boundary.
nblocksThe number of blocks to process.
Return values
0on success.
-1on failure.

Placeholder type definition for blockcipher parameters.

See Also
aesParam, blowfishParam.
int(* blockCipherRawcrypt)(blockCipherParam *bp, uint32_t *dst, const uint32_t *src)

Prototype for a raw encryption or decryption function.

Parameters
bpThe blockcipher's parameters.
dstThe ciphertext address; must be aligned on 32-bit boundary.
srcThe cleartext address; must be aligned on 32-bit boundary.
Return values
0on success.
-1on failure.
int(* blockCipherSetCTR)(blockCipherParam *bp, const byte *nivz, size_t counter)

Prototype definition for an initialization vector setup function.

Parameters
bpThe blockcipher's parameters.
nivzThe concatenation of the Nonce, IV and padding Zero bytes.
counterThe blockciphers' counter value.
Note
nivz length must be equal to the cipher's block size.
Return values
0on success.
-1on failure.
int(* blockCipherSetIV)(blockCipherParam *bp, const byte *iv)

Prototype definition for an initialization vector setup function.

Parameters
bpThe blockcipher's parameters.
ivThe blockciphers' IV value.
Note
iv length must be equal to the cipher's block size.
Return values
0on success.
-1on failure.
typedef int(* blockCipherSetup)(blockCipherParam *, const byte *, size_t, cipherOperation)

Prototype definition for a setup function.

Enumeration Type Documentation

Specifies whether to perform encryption or decryption.

Enumerator
NOCRYPT 
ENCRYPT 
DECRYPT