enchive/src/chacha.h

17 lines
374 B
C
Raw Permalink Normal View History

2017-03-03 14:39:32 +01:00
#ifndef CHACHA_H
#define CHACHA_H
2017-03-06 02:20:24 +01:00
#include "../config.h"
2017-03-03 14:39:32 +01:00
2017-03-03 19:35:48 +01:00
#define CHACHA_BLOCKLENGTH 64
2017-03-03 16:42:48 +01:00
typedef struct {
uint32_t input[16];
2017-03-03 14:39:32 +01:00
} chacha_ctx;
void chacha_keysetup(chacha_ctx *, const uint8_t *k, uint32_t kbits);
void chacha_ivsetup(chacha_ctx *, const uint8_t *iv);
void chacha_encrypt(chacha_ctx *, const uint8_t *m, uint8_t *c, uint32_t bytes);
2017-03-03 14:39:32 +01:00
#endif /* CHACHA_H */