Go to the documentation of this file.
34 #ifndef CRYPTO_CHACHA_H
35 #define CRYPTO_CHACHA_H
67 const uint8_t *key, uint32_t keylen,
68 const uint8_t nonce[8]);
void chacha_encrypt_bytes(chacha_ctx *ctx, const uint8_t *m, uint8_t *c)
Encode or decode a block of data.
static void chacha_decrypt_bytes(chacha_ctx *ctx, const uint8_t *m, uint8_t *c)
Encode or decode a block of data.
int chacha_init(chacha_ctx *ctx, unsigned rounds, const uint8_t *key, uint32_t keylen, const uint8_t nonce[8])
Initialize a ChaCha context.
uint8_t rounds
Number of iterations.
void chacha_prng_seed(const void *data, size_t bytes)
Seed the pseudo-random number generator.
A ChaCha cipher stream context.
uint32_t chacha_prng_next(void)
Extract a number from the pseudo-random number generator.
void chacha_keystream_bytes(chacha_ctx *ctx, void *x)
Generate next block in the keystream.