#include "sw_ecrypt-sync.h"
Macros | |
#define | ECRYPT_LITTLE_ENDIAN |
#define | ROTATE(v, c) (ROTL32(v,c)) |
#define | XOR(v, w) ((v) ^ (w)) |
#define | PLUS(v, w) (U32V((v) + (w))) |
#define | PLUSONE(v) (PLUS((v),1)) |
#define | QUARTERROUND(a, b, c, d) |
Functions | |
static void | salsa20_wordtobyte (u8 output[64], const u32 input[16]) |
void | ECRYPT_init (void) |
void | ECRYPT_keysetup (ECRYPT_ctx *x, const u8 *k, u32 kbits, u32 ivbits) |
void | ECRYPT_ivsetup (ECRYPT_ctx *x, const u8 *iv) |
void | ECRYPT_encrypt_bytes (ECRYPT_ctx *x, const u8 *m, u8 *c, u32 bytes) |
void | ECRYPT_decrypt_bytes (ECRYPT_ctx *x, const u8 *c, u8 *m, u32 bytes) |
void | ECRYPT_keystream_bytes (ECRYPT_ctx *x, u8 *stream, u32 bytes) |
Variables | |
static const char | sigma [16] = "expand 32-byte k" |
static const char | tau [16] = "expand 16-byte k" |
#define ECRYPT_LITTLE_ENDIAN |
#define PLUS | ( | v, | |
w | |||
) | (U32V((v) + (w))) |
Referenced by salsa20_wordtobyte().
#define PLUSONE | ( | v | ) | (PLUS((v),1)) |
Referenced by ECRYPT_encrypt_bytes().
#define QUARTERROUND | ( | a, | |
b, | |||
c, | |||
d | |||
) |
Referenced by salsa20_wordtobyte().
#define ROTATE | ( | v, | |
c | |||
) | (ROTL32(v,c)) |
#define XOR | ( | v, | |
w | |||
) | ((v) ^ (w)) |
void ECRYPT_decrypt_bytes | ( | ECRYPT_ctx * | x, |
const u8 * | c, | ||
u8 * | m, | ||
u32 | bytes | ||
) |
void ECRYPT_encrypt_bytes | ( | ECRYPT_ctx * | x, |
const u8 * | m, | ||
u8 * | c, | ||
u32 | bytes | ||
) |
Referenced by ECRYPT_decrypt_bytes(), and ECRYPT_keystream_bytes().
void ECRYPT_ivsetup | ( | ECRYPT_ctx * | x, |
const u8 * | iv | ||
) |
void ECRYPT_keysetup | ( | ECRYPT_ctx * | x, |
const u8 * | k, | ||
u32 | kbits, | ||
u32 | ivbits | ||
) |
void ECRYPT_keystream_bytes | ( | ECRYPT_ctx * | x, |
u8 * | stream, | ||
u32 | bytes | ||
) |
|
static |
Referenced by ECRYPT_encrypt_bytes().
|
static |
Referenced by ECRYPT_keysetup().
|
static |
Referenced by ECRYPT_keysetup().