23 #ifndef LWCRYPTO_AESGCM_AEAD_H
24 #define LWCRYPTO_AESGCM_AEAD_H
40 #define AES128GCM_KEY_SIZE 16
45 #define AES192GCM_KEY_SIZE 24
50 #define AES256GCM_KEY_SIZE 32
55 #define AESGCM_NONCE_SIZE 12
60 #define AESGCM_TAG_SIZE 16
81 (
unsigned char *c,
size_t *clen,
82 const unsigned char *m,
size_t mlen,
83 const unsigned char *ad,
size_t adlen,
84 const unsigned char *npub,
85 const unsigned char *k);
107 (
unsigned char *m,
size_t *mlen,
108 const unsigned char *c,
size_t clen,
109 const unsigned char *ad,
size_t adlen,
110 const unsigned char *npub,
111 const unsigned char *k);
132 (
unsigned char *c,
size_t *clen,
133 const unsigned char *m,
size_t mlen,
134 const unsigned char *ad,
size_t adlen,
135 const unsigned char *npub,
136 const unsigned char *k);
158 (
unsigned char *m,
size_t *mlen,
159 const unsigned char *c,
size_t clen,
160 const unsigned char *ad,
size_t adlen,
161 const unsigned char *npub,
162 const unsigned char *k);
183 (
unsigned char *c,
size_t *clen,
184 const unsigned char *m,
size_t mlen,
185 const unsigned char *ad,
size_t adlen,
186 const unsigned char *npub,
187 const unsigned char *k);
209 (
unsigned char *m,
size_t *mlen,
210 const unsigned char *c,
size_t clen,
211 const unsigned char *ad,
size_t adlen,
212 const unsigned char *npub,
213 const unsigned char *k);
int aesgcm128_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 AES-128-GCM.
Definition: aesgcm-aead.c:193
int aesgcm128_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 AES-128-GCM.
Definition: aesgcm-aead.c:205
int aesgcm256_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 AES-256-GCM.
Definition: aesgcm-aead.c:253
int aesgcm192_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 AES-192-GCM.
Definition: aesgcm-aead.c:217
int aesgcm256_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 AES-256-GCM.
Definition: aesgcm-aead.c:241
int aesgcm192_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 AES-192-GCM.
Definition: aesgcm-aead.c:229