summaryrefslogtreecommitdiff
path: root/kernel/crypto/ChaCha20/chacha20.h
blob: 17532f346932b7dccb349201d3f6f0b54a531dfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef CHACHA20_H
#define CHACHA20_H
#include <stdint.h>

#define KEY 4
#define KEY_SIZE 8*sizeof(uint32_t)
#define COUNT 12
#define COUNT_SIZE sizeof(uint32_t)
#define COUNT_MAX (0x100000000-1) // 2^32 - 1
#define NONCE 13
#define NONCE_SIZE 2*sizeof(uint32_t)
#define BLOCK_SIZE 16*sizeof(uint32_t)

void chacha_block(uint32_t out[16], uint32_t const in[16]);
#endif