BeeCrypt  4.2.1
Functions
blockmode.h File Reference

Blockcipher operation modes. More...

#include "beecrypt/beecrypt.h"
Include dependency graph for blockmode.h:

Go to the source code of this file.

Functions

int blockEncryptECB (const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
 This function encrypts a number of data blocks in Electronic Code Book mode. More...
 
int blockDecryptECB (const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
 This function decrypts a number of data blocks in Electronic Code Book mode. More...
 
int blockEncryptCBC (const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
 This function encrypts a number of data blocks in Cipher Block Chaining mode. More...
 
int blockDecryptCBC (const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
 This function decrypts a number of data blocks in Cipher Block Chaining mode. More...
 
int blockEncryptCTR (const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
 
int blockDecryptCTR (const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
 

Detailed Description

Blockcipher operation modes.

Todo:
Additional modes, such as CFB and OFB.
Author
Bob Deblier bob.d.nosp@m.ebli.nosp@m.er@te.nosp@m.lene.nosp@m.t.be

Function Documentation

int blockDecryptCBC ( const blockCipher bc,
blockCipherParam bp,
uint32_t *  dst,
const uint32_t *  src,
unsigned int  nblocks 
)

This function decrypts a number of data blocks in Cipher Block Chaining mode.

Parameters
bcThe blockcipher.
bpThe cipher's parameter block.
dstThe cleartext data; should be aligned on a 32-bit boundary.
srcThe ciphertext data; should be aligned on a 32-bit boundary.
nblocksThe number of blocks to be decrypted.
Return values
0on success.
int blockDecryptCTR ( const blockCipher bc,
blockCipherParam bp,
uint32_t *  dst,
const uint32_t *  src,
unsigned int  nblocks 
)
int blockDecryptECB ( const blockCipher bc,
blockCipherParam bp,
uint32_t *  dst,
const uint32_t *  src,
unsigned int  nblocks 
)

This function decrypts a number of data blocks in Electronic Code Book mode.

Parameters
bcThe blockcipher.
bpThe cipher's parameter block.
dstThe cleartext data; should be aligned on a 32-bit boundary.
srcThe ciphertext data; should be aligned on a 32-bit boundary.
nblocksThe number of blocks to be decrypted.
Return values
0on success.
int blockEncryptCBC ( const blockCipher bc,
blockCipherParam bp,
uint32_t *  dst,
const uint32_t *  src,
unsigned int  nblocks 
)

This function encrypts a number of data blocks in Cipher Block Chaining mode.

Parameters
bcThe blockcipher.
bpThe cipher's parameter block.
dstThe ciphertext data; should be aligned on a 32-bit boundary.
srcThe cleartext data; should be aligned on a 32-bit boundary.
nblocksThe number of blocks to be encrypted.
Return values
0on success.
int blockEncryptCTR ( const blockCipher bc,
blockCipherParam bp,
uint32_t *  dst,
const uint32_t *  src,
unsigned int  nblocks 
)
int blockEncryptECB ( const blockCipher bc,
blockCipherParam bp,
uint32_t *  dst,
const uint32_t *  src,
unsigned int  nblocks 
)

This function encrypts a number of data blocks in Electronic Code Book mode.

Parameters
bcThe blockcipher.
bpThe cipher's parameter block.
dstThe ciphertext data; should be aligned on a 32-bit boundary.
srcThe cleartext data; should be aligned on a 32-bit boundary.
nblocksThe number of blocks to be encrypted.
Return values
0on success.