2 chacha-merged.c version 20080118
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
);