Lines Matching refs:dat
23 static int cipher_hw_rv64i_zknd_zkne_initkey(PROV_CIPHER_CTX *dat,
27 PROV_AES_CTX *adat = (PROV_AES_CTX *)dat;
30 dat->ks = ks;
32 if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
33 && !dat->enc) {
35 dat->block = (block128_f) rv64i_zknd_decrypt;
36 dat->stream.cbc = NULL;
39 dat->block = (block128_f) rv64i_zkne_encrypt;
40 dat->stream.cbc = NULL;
64 static int cipher_hw_rv64i_zvkned_initkey(PROV_CIPHER_CTX *dat,
69 PROV_AES_CTX *adat = (PROV_AES_CTX *)dat;
72 dat->ks = ks;
86 if (dat->mode == EVP_CIPH_CBC_MODE) {
87 if (dat->enc) {
88 dat->stream.cbc = (cbc128_f) rv64i_zvkned_cbc_encrypt;
90 dat->stream.cbc = (cbc128_f) rv64i_zvkned_cbc_decrypt;
92 } else if (dat->mode == EVP_CIPH_CTR_MODE) {
94 dat->stream.ctr = (ctr128_f) rv64i_zvkb_zvkned_ctr32_encrypt_blocks;
96 } else if (dat->mode == EVP_CIPH_ECB_MODE) {
97 if (dat->enc) {
98 dat->stream.ecb = (ecb128_f) rv64i_zvkned_ecb_encrypt;
100 dat->stream.ecb = (ecb128_f) rv64i_zvkned_ecb_decrypt;
105 if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE) &&
106 !dat->enc) {
107 dat->block = (block128_f) rv64i_zvkned_decrypt;
109 dat->block = (block128_f) rv64i_zvkned_encrypt;