23 #ifndef LW_INTERNAL_CHACHAPOLY_H
24 #define LW_INTERNAL_CHACHAPOLY_H
50 #define CHACHAPOLY_KEY_SIZE 32
55 #define CHACHAPOLY_NONCE_SIZE 8
60 #define CHACHAPOLY_TAG_SIZE 16
88 (
unsigned char *c,
size_t *clen,
89 const unsigned char *m,
size_t mlen,
90 const unsigned char *ad,
size_t adlen,
91 const unsigned char *npub,
92 const unsigned char *k);
116 (
unsigned char *m,
size_t *mlen,
117 const unsigned char *c,
size_t clen,
118 const unsigned char *ad,
size_t adlen,
119 const unsigned char *npub,
120 const unsigned char *k);
Meta-information about an AEAD cipher.
Definition: aead-metadata.h:204
aead_cipher_t const internal_chachapoly_cipher
Meta-information block for the ChaChaPoly cipher.
Definition: internal-chachapoly.c:27
int internal_chachapoly_aead_decrypt(unsigned char *m, size_t *mlen, const unsigned char *c, size_t clen, const unsigned char *ad, size_t adlen, const unsigned char *npub, const unsigned char *k)
Decrypts and authenticates a packet with ChaChaPoly.
Definition: internal-chachapoly.c:410
int internal_chachapoly_aead_encrypt(unsigned char *c, size_t *clen, const unsigned char *m, size_t mlen, const unsigned char *ad, size_t adlen, const unsigned char *npub, const unsigned char *k)
Encrypts and authenticates a packet with ChaChaPoly.
Definition: internal-chachapoly.c:364