Lines Matching refs:aes
143 static void aes_gctr(void *aes, const u8 *icb, const u8 *x, size_t xlen, u8 *y) in aes_gctr() argument
158 aes_encrypt(aes, cb, ypos); in aes_gctr()
168 aes_encrypt(aes, cb, tmp); in aes_gctr()
177 void *aes; in aes_gcm_init_hash_subkey() local
179 aes = aes_encrypt_init(key, key_len); in aes_gcm_init_hash_subkey()
180 if (aes == NULL) in aes_gcm_init_hash_subkey()
185 aes_encrypt(aes, H, H); in aes_gcm_init_hash_subkey()
188 return aes; in aes_gcm_init_hash_subkey()
215 static void aes_gcm_gctr(void *aes, const u8 *J0, const u8 *in, size_t len, in aes_gcm_gctr() argument
225 aes_gctr(aes, J0inc, in, len, out); in aes_gcm_gctr()
261 void *aes; in aes_gcm_ae() local
263 aes = aes_gcm_init_hash_subkey(key, key_len, H); in aes_gcm_ae()
264 if (aes == NULL) in aes_gcm_ae()
270 aes_gcm_gctr(aes, J0, plain, plain_len, crypt); in aes_gcm_ae()
275 aes_gctr(aes, J0, S, sizeof(S), tag); in aes_gcm_ae()
279 aes_encrypt_deinit(aes); in aes_gcm_ae()
295 void *aes; in aes_gcm_ad() local
297 aes = aes_gcm_init_hash_subkey(key, key_len, H); in aes_gcm_ad()
298 if (aes == NULL) in aes_gcm_ad()
304 aes_gcm_gctr(aes, J0, crypt, crypt_len, plain); in aes_gcm_ad()
309 aes_gctr(aes, J0, S, sizeof(S), T); in aes_gcm_ad()
311 aes_encrypt_deinit(aes); in aes_gcm_ad()