Lines Matching refs:aes
29 } aes; member
65 ctx->u.aes.ctx_enc = aes_encrypt_init(key, key_len); in crypto_cipher_init()
66 if (ctx->u.aes.ctx_enc == NULL) { in crypto_cipher_init()
70 ctx->u.aes.ctx_dec = aes_decrypt_init(key, key_len); in crypto_cipher_init()
71 if (ctx->u.aes.ctx_dec == NULL) { in crypto_cipher_init()
72 aes_encrypt_deinit(ctx->u.aes.ctx_enc); in crypto_cipher_init()
76 os_memcpy(ctx->u.aes.cbc, iv, AES_BLOCK_SIZE); in crypto_cipher_init()
122 ctx->u.aes.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
123 aes_encrypt(ctx->u.aes.ctx_enc, ctx->u.aes.cbc, in crypto_cipher_encrypt()
124 ctx->u.aes.cbc); in crypto_cipher_encrypt()
125 os_memcpy(crypt, ctx->u.aes.cbc, AES_BLOCK_SIZE); in crypto_cipher_encrypt()
186 aes_decrypt(ctx->u.aes.ctx_dec, crypt, plain); in crypto_cipher_decrypt()
188 plain[j] ^= ctx->u.aes.cbc[j]; in crypto_cipher_decrypt()
189 os_memcpy(ctx->u.aes.cbc, tmp, AES_BLOCK_SIZE); in crypto_cipher_decrypt()
234 aes_encrypt_deinit(ctx->u.aes.ctx_enc); in crypto_cipher_deinit()
235 aes_decrypt_deinit(ctx->u.aes.ctx_dec); in crypto_cipher_deinit()