blob: dd4a639e57c404384ab7077f8fde1e47c91e7c2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#ifndef CHACHA20_H
#define CHACHA20_H
#include <typedefs.h>
#define KEY 4
#define KEY_SIZE 8 * sizeof(u32)
#define COUNT 12
#define COUNT_SIZE sizeof(u32)
#define COUNT_MAX (0x100000000 - 1) // 2^32 - 1
#define NONCE 13
#define NONCE_SIZE 2 * sizeof(u32)
#define BLOCK_SIZE 16 * sizeof(u32)
void chacha_block(u32 out[16], u32 const in[16]);
#endif
|