#include "beecrypt/beecrypt.h"
#include "beecrypt/blowfishopt.h"
Go to the source code of this file.
Data Structures | |
struct | blowfishParam |
Holds all the parameters necessary for the Blowfish cipher. More... | |
Defines | |
#define | BLOWFISHROUNDS 16 |
#define | BLOWFISHPSIZE (BLOWFISHROUNDS+2) |
Functions | |
BEECRYPTAPI int | blowfishSetup (blowfishParam *, const byte *, size_t, cipherOperation) |
The function performs the cipher's key expansion. | |
BEECRYPTAPI int | blowfishSetIV (blowfishParam *, const byte *iv) |
This function sets the Initialization Vector. | |
BEECRYPTAPI int | blowfishSetCTR (blowfishParam *, const byte *nivz, size_t counter) |
BEECRYPTAPI int | blowfishEncrypt (blowfishParam *, uint32_t *, const uint32_t *) |
This function performs the Blowfish encryption; it encrypts one block of 64 bits. | |
BEECRYPTAPI int | blowfishDecrypt (blowfishParam *, uint32_t *, const uint32_t *) |
This function performs the Blowfish decryption; it Rderypts one block of 64 bits. | |
BEECRYPTAPI uint32_t * | blowfishFeedback (blowfishParam *) |
Variables | |
const BEECRYPTAPI blockCipher | blowfish |
Holds the full API description of the Blowfish algorithm. |
For more information on this blockcipher, see: "Applied Cryptography", second edition Bruce Schneier Wiley & Sons
Also see http://www.counterpane.com/blowfish.html
#define BLOWFISHPSIZE (BLOWFISHROUNDS+2) |
#define BLOWFISHROUNDS 16 |
blowfishDecrypt | ( | blowfishParam * | bp, | |
uint32_t * | dst, | |||
const uint32_t * | src | |||
) |
This function performs the Blowfish decryption; it Rderypts one block of 64 bits.
bp | The cipher's parameter block. | |
dst | The cleartext; should be aligned on 32-bit boundary. | |
src | The ciphertext; should be aligned on 32-bit boundary. |
0 | on success. |
blowfishEncrypt | ( | blowfishParam * | bp, | |
uint32_t * | dst, | |||
const uint32_t * | src | |||
) |
This function performs the Blowfish encryption; it encrypts one block of 64 bits.
bp | The cipher's parameter block. | |
dst | The ciphertext; should be aligned on 32-bit boundary. | |
src | The cleartext; should be aligned on 32-bit boundary. |
0 | on success. |
BEECRYPTAPI uint32_t* blowfishFeedback | ( | blowfishParam * | ) |
BEECRYPTAPI int blowfishSetCTR | ( | blowfishParam * | , | |
const byte * | nivz, | |||
size_t | counter | |||
) |
int blowfishSetIV | ( | blowfishParam * | bp, | |
const byte * | iv | |||
) |
This function sets the Initialization Vector.
bp | The cipher's parameter block. | |
iv | The initialization vector; may be null. |
0 | on success. |
int blowfishSetup | ( | blowfishParam * | bp, | |
const byte * | key, | |||
size_t | keybits, | |||
cipherOperation | op | |||
) |
The function performs the cipher's key expansion.
bp | The cipher's parameter block. | |
key | The key value. | |
keybits | The number of bits in the key; legal values are: 32 to 448, in multiples of 8. | |
op | ENCRYPT or DECRYPT. |
0 | on success. | |
-1 | on failure. |
Holds the full API description of the Blowfish algorithm.