hardened_malloc/chacha.h

22 lines
367 B
C
Raw Normal View History

2018-08-26 05:00:00 +02:00
#ifndef CHACHA_H
#define CHACHA_H
#include <stdint.h>
#define CHACHA_KEY_SIZE 32
#define CHACHA_IV_SIZE 8
2018-08-26 05:00:00 +02:00
typedef uint8_t u8;
typedef uint32_t u32;
typedef struct
{
u32 input[16];
} chacha_ctx;
void chacha_keysetup(chacha_ctx *x,const u8 *k);
2018-08-26 05:00:00 +02:00
void chacha_ivsetup(chacha_ctx *x,const u8 *iv);
void chacha_keystream_bytes(chacha_ctx *x,u8 *c,u32 bytes);
#endif