23 #ifndef LWCRYPTO_GRAIN_AEAD_H
24 #define LWCRYPTO_GRAIN_AEAD_H
47 #define GRAIN128_KEY_SIZE 16
52 #define GRAIN128_TAG_SIZE 8
57 #define GRAIN128_NONCE_SIZE 12
80 (
unsigned char *c,
size_t *clen,
81 const unsigned char *m,
size_t mlen,
82 const unsigned char *ad,
size_t adlen,
83 const unsigned char *npub,
84 const unsigned char *k);
108 (
unsigned char *m,
size_t *mlen,
109 const unsigned char *c,
size_t clen,
110 const unsigned char *ad,
size_t adlen,
111 const unsigned char *npub,
112 const unsigned char *k);
int grain128_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 Grain-128AEAD.
Definition: grain-aead.c:105
int grain128_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 Grain-128AEAD.
Definition: grain-aead.c:68