![]() |
libfortuna
1
FortunalibraryfunctionsextractedfromPostgreSQLsource
|
Macros | |
#define | GET_32BIT_MSB_FIRST(p) |
#define | PUT_32BIT_MSB_FIRST(p, v) |
#define | Fprime(a, b, c, d) ( ( (S0[a] + S1[b]) ^ S2[c] ) + S3[d] ) |
#define | F(x) Fprime( ((x>>24)&0xFF), ((x>>16)&0xFF), ((x>>8)&0xFF), (x&0xFF) ) |
#define | ROUND(n) ( xL ^= P[n], t = xL, xL = F(xL) ^ xR, xR = t ) |
Functions | |
void | blowfish_encrypt (uint32 xL, uint32 xR, uint32 *output, BlowfishContext *ctx) |
void | blowfish_decrypt (uint32 xL, uint32 xR, uint32 *output, BlowfishContext *ctx) |
void | blowfish_encrypt_cbc (uint8 *blk, int len, BlowfishContext *ctx) |
void | blowfish_decrypt_cbc (uint8 *blk, int len, BlowfishContext *ctx) |
void | blowfish_encrypt_ecb (uint8 *blk, int len, BlowfishContext *ctx) |
void | blowfish_decrypt_ecb (uint8 *blk, int len, BlowfishContext *ctx) |
void | blowfish_setkey (BlowfishContext *ctx, const uint8 *key, short keybytes) |
void | blowfish_setiv (BlowfishContext *ctx, const uint8 *iv) |
Variables | |
const uint32 | parray [] |
const uint32 | sbox0 [] |
const uint32 | sbox1 [] |
const uint32 | sbox2 [] |
const uint32 | sbox3 [] |
#define F | ( | x | ) | Fprime( ((x>>24)&0xFF), ((x>>16)&0xFF), ((x>>8)&0xFF), (x&0xFF) ) |
#define Fprime | ( | a, | |
b, | |||
c, | |||
d | |||
) | ( ( (S0[a] + S1[b]) ^ S2[c] ) + S3[d] ) |
#define GET_32BIT_MSB_FIRST | ( | p | ) |
#define PUT_32BIT_MSB_FIRST | ( | p, | |
v | |||
) |
#define ROUND | ( | n | ) | ( xL ^= P[n], t = xL, xL = F(xL) ^ xR, xR = t ) |
void blowfish_decrypt | ( | uint32 | xL, |
uint32 | xR, | ||
uint32 * | output, | ||
BlowfishContext * | ctx | ||
) |
void blowfish_decrypt_cbc | ( | uint8 * | blk, |
int | len, | ||
BlowfishContext * | ctx | ||
) |
void blowfish_decrypt_ecb | ( | uint8 * | blk, |
int | len, | ||
BlowfishContext * | ctx | ||
) |
void blowfish_encrypt | ( | uint32 | xL, |
uint32 | xR, | ||
uint32 * | output, | ||
BlowfishContext * | ctx | ||
) |
void blowfish_encrypt_cbc | ( | uint8 * | blk, |
int | len, | ||
BlowfishContext * | ctx | ||
) |
void blowfish_encrypt_ecb | ( | uint8 * | blk, |
int | len, | ||
BlowfishContext * | ctx | ||
) |
void blowfish_setiv | ( | BlowfishContext * | ctx, |
const uint8 * | iv | ||
) |
void blowfish_setkey | ( | BlowfishContext * | ctx, |
const uint8 * | key, | ||
short | keybytes | ||
) |
const uint32 parray[] |
const uint32 sbox0[] |
const uint32 sbox1[] |
const uint32 sbox2[] |
const uint32 sbox3[] |