drop 128-bit keys from ChaCha implementation

This commit is contained in:
Daniel Micay 2018-09-11 10:22:28 -04:00
parent b52d9ca831
commit 433af6d4ba
3 changed files with 16 additions and 25 deletions

View file

@ -3,6 +3,9 @@
#include <stdint.h>
#define CHACHA_KEY_SIZE 32
#define CHACHA_IV_SIZE 8
typedef uint8_t u8;
typedef uint32_t u32;
@ -11,7 +14,7 @@ typedef struct
u32 input[16];
} chacha_ctx;
void chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits);
void chacha_keysetup(chacha_ctx *x,const u8 *k);
void chacha_ivsetup(chacha_ctx *x,const u8 *iv);
void chacha_keystream_bytes(chacha_ctx *x,u8 *c,u32 bytes);