Home | History | Annotate | Download | only in crypto

Lines Matching refs:aes

2  * Galois/Counter Mode (GCM) and GMAC with AES
13 #include "aes.h"
143 static void aes_gctr(void *aes, const u8 *icb, const u8 *x, size_t xlen, u8 *y)
158 aes_encrypt(aes, cb, ypos);
168 aes_encrypt(aes, cb, tmp);
177 void *aes;
179 aes = aes_encrypt_init(key, key_len);
180 if (aes == NULL)
185 aes_encrypt(aes, H, H);
188 return aes;
215 static void aes_gcm_gctr(void *aes, const u8 *J0, const u8 *in, size_t len,
225 aes_gctr(aes, J0inc, in, len, out);
261 void *aes;
263 aes = aes_gcm_init_hash_subkey(key, key_len, H);
264 if (aes == NULL)
270 aes_gcm_gctr(aes, J0, plain, plain_len, crypt);
275 aes_gctr(aes, J0, S, sizeof(S), tag);
279 aes_encrypt_deinit(aes);
295 void *aes;
297 aes = aes_gcm_init_hash_subkey(key, key_len, H);
298 if (aes == NULL)
304 aes_gcm_gctr(aes, J0, crypt, crypt_len, plain);
309 aes_gctr(aes, J0, S, sizeof(S), T);
311 aes_encrypt_deinit(aes);