tinc: update to 1.1pre11
[tomato.git] / release / src / router / tinc / src / chacha-poly1305 / chacha.h
blobaf1b9a407906447274547d9a3b3568e549f7d145
1 /*
2 chacha-merged.c version 20080118
3 D. J. Bernstein
4 Public domain.
5 */
7 #ifndef CHACHA_H
8 #define CHACHA_H
10 struct chacha_ctx {
11 uint32_t input[16];
14 #define CHACHA_MINKEYLEN 16
15 #define CHACHA_NONCELEN 8
16 #define CHACHA_CTRLEN 8
17 #define CHACHA_STATELEN (CHACHA_NONCELEN+CHACHA_CTRLEN)
18 #define CHACHA_BLOCKLEN 64
20 void chacha_keysetup(struct chacha_ctx *x, const uint8_t *k, uint32_t kbits);
21 void chacha_ivsetup(struct chacha_ctx *x, const uint8_t *iv, const uint8_t *ctr);
22 void chacha_encrypt_bytes(struct chacha_ctx *x, const uint8_t *m, uint8_t * c, uint32_t bytes);
24 #endif /* CHACHA_H */