![]() |
![]() |
|
CC23x0R5DriverLibrary
|
#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 ROTATE | ( | v, | |
| c | |||
| ) | (ROTL32(v, c)) |
| #define XOR | ( | v, | |
| w | |||
| ) | ((v) ^ (w)) |
| #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().
|
static |
References PLUS, QUARTERROUND, and U32TO8_LITTLE.
Referenced by ECRYPT_encrypt_bytes().
| void ECRYPT_init | ( | void | ) |
| void ECRYPT_keysetup | ( | ECRYPT_ctx * | x, |
| const u8 * | k, | ||
| u32 | kbits, | ||
| u32 | ivbits | ||
| ) |
References ECRYPT_ctx::input, sigma, tau, and U8TO32_LITTLE.
| void ECRYPT_ivsetup | ( | ECRYPT_ctx * | x, |
| const u8 * | iv | ||
| ) |
References ECRYPT_ctx::input, and U8TO32_LITTLE.
| void ECRYPT_encrypt_bytes | ( | ECRYPT_ctx * | x, |
| const u8 * | m, | ||
| u8 * | c, | ||
| u32 | bytes | ||
| ) |
References ECRYPT_ctx::input, PLUSONE, and salsa20_wordtobyte().
Referenced by ECRYPT_decrypt_bytes(), and ECRYPT_keystream_bytes().
| void ECRYPT_decrypt_bytes | ( | ECRYPT_ctx * | x, |
| const u8 * | c, | ||
| u8 * | m, | ||
| u32 | bytes | ||
| ) |
References ECRYPT_encrypt_bytes().
| void ECRYPT_keystream_bytes | ( | ECRYPT_ctx * | x, |
| u8 * | stream, | ||
| u32 | bytes | ||
| ) |
References ECRYPT_encrypt_bytes().
|
static |
Referenced by ECRYPT_keysetup().
|
static |
Referenced by ECRYPT_keysetup().