Lines Matching refs:dat
19 static int cipher_hw_aes_initkey(PROV_CIPHER_CTX *dat, in cipher_hw_aes_initkey() argument
23 PROV_AES_CTX *adat = (PROV_AES_CTX *)dat; in cipher_hw_aes_initkey()
26 dat->ks = ks; in cipher_hw_aes_initkey()
28 if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE) in cipher_hw_aes_initkey()
29 && !dat->enc) { in cipher_hw_aes_initkey()
33 dat->block = (block128_f)HWAES_decrypt; in cipher_hw_aes_initkey()
34 dat->stream.cbc = NULL; in cipher_hw_aes_initkey()
36 if (dat->mode == EVP_CIPH_CBC_MODE) in cipher_hw_aes_initkey()
37 dat->stream.cbc = (cbc128_f)HWAES_cbc_encrypt; in cipher_hw_aes_initkey()
40 if (dat->mode == EVP_CIPH_ECB_MODE) in cipher_hw_aes_initkey()
41 dat->stream.ecb = (ecb128_f)HWAES_ecb_encrypt; in cipher_hw_aes_initkey()
46 if (BSAES_CAPABLE && dat->mode == EVP_CIPH_CBC_MODE) { in cipher_hw_aes_initkey()
48 dat->block = (block128_f)AES_decrypt; in cipher_hw_aes_initkey()
49 dat->stream.cbc = (cbc128_f)ossl_bsaes_cbc_encrypt; in cipher_hw_aes_initkey()
55 dat->block = (block128_f)vpaes_decrypt; in cipher_hw_aes_initkey()
56 dat->stream.cbc = (dat->mode == EVP_CIPH_CBC_MODE) in cipher_hw_aes_initkey()
62 dat->block = (block128_f)AES_decrypt; in cipher_hw_aes_initkey()
63 dat->stream.cbc = (dat->mode == EVP_CIPH_CBC_MODE) in cipher_hw_aes_initkey()
70 dat->block = (block128_f)HWAES_encrypt; in cipher_hw_aes_initkey()
71 dat->stream.cbc = NULL; in cipher_hw_aes_initkey()
73 if (dat->mode == EVP_CIPH_CBC_MODE) in cipher_hw_aes_initkey()
74 dat->stream.cbc = (cbc128_f)HWAES_cbc_encrypt; in cipher_hw_aes_initkey()
78 if (dat->mode == EVP_CIPH_ECB_MODE) in cipher_hw_aes_initkey()
79 dat->stream.ecb = (ecb128_f)HWAES_ecb_encrypt; in cipher_hw_aes_initkey()
83 if (dat->mode == EVP_CIPH_CTR_MODE) in cipher_hw_aes_initkey()
84 dat->stream.ctr = (ctr128_f)HWAES_ctr32_encrypt_blocks; in cipher_hw_aes_initkey()
91 if (BSAES_CAPABLE && dat->mode == EVP_CIPH_CTR_MODE) { in cipher_hw_aes_initkey()
93 dat->block = (block128_f)AES_encrypt; in cipher_hw_aes_initkey()
94 dat->stream.ctr = (ctr128_f)ossl_bsaes_ctr32_encrypt_blocks; in cipher_hw_aes_initkey()
100 dat->block = (block128_f)vpaes_encrypt; in cipher_hw_aes_initkey()
101 dat->stream.cbc = (dat->mode == EVP_CIPH_CBC_MODE) in cipher_hw_aes_initkey()
107 dat->block = (block128_f)AES_encrypt; in cipher_hw_aes_initkey()
108 dat->stream.cbc = (dat->mode == EVP_CIPH_CBC_MODE) in cipher_hw_aes_initkey()
111 if (dat->mode == EVP_CIPH_CTR_MODE) in cipher_hw_aes_initkey()
112 dat->stream.ctr = (ctr128_f)AES_ctr32_encrypt; in cipher_hw_aes_initkey()