Lines Matching refs:dat
60 EVP_SM4_KEY *dat = EVP_C_DATA(EVP_SM4_KEY,ctx); in sm4_init_key() local
67 HWSM4_set_decrypt_key(key, &dat->ks.ks); in sm4_init_key()
68 dat->block = (block128_f) HWSM4_decrypt; in sm4_init_key()
69 dat->stream.cbc = NULL; in sm4_init_key()
72 dat->stream.cbc = (cbc128_f) HWSM4_cbc_encrypt; in sm4_init_key()
76 dat->stream.ecb = (ecb128_f) HWSM4_ecb_encrypt; in sm4_init_key()
82 vpsm4_set_decrypt_key(key, &dat->ks.ks); in sm4_init_key()
83 dat->block = (block128_f) vpsm4_decrypt; in sm4_init_key()
84 dat->stream.cbc = NULL; in sm4_init_key()
86 dat->stream.cbc = (cbc128_f) vpsm4_cbc_encrypt; in sm4_init_key()
88 dat->stream.ecb = (ecb128_f) vpsm4_ecb_encrypt; in sm4_init_key()
92 dat->block = (block128_f) ossl_sm4_decrypt; in sm4_init_key()
98 HWSM4_set_encrypt_key(key, &dat->ks.ks); in sm4_init_key()
99 dat->block = (block128_f) HWSM4_encrypt; in sm4_init_key()
100 dat->stream.cbc = NULL; in sm4_init_key()
103 dat->stream.cbc = (cbc128_f) HWSM4_cbc_encrypt; in sm4_init_key()
108 dat->stream.ecb = (ecb128_f) HWSM4_ecb_encrypt; in sm4_init_key()
113 dat->stream.ctr = (ctr128_f) HWSM4_ctr32_encrypt_blocks; in sm4_init_key()
121 vpsm4_set_encrypt_key(key, &dat->ks.ks); in sm4_init_key()
122 dat->block = (block128_f) vpsm4_encrypt; in sm4_init_key()
123 dat->stream.cbc = NULL; in sm4_init_key()
125 dat->stream.cbc = (cbc128_f) vpsm4_cbc_encrypt; in sm4_init_key()
127 dat->stream.ecb = (ecb128_f) vpsm4_ecb_encrypt; in sm4_init_key()
129 dat->stream.ctr = (ctr128_f) vpsm4_ctr32_encrypt_blocks; in sm4_init_key()
133 dat->block = (block128_f) ossl_sm4_encrypt; in sm4_init_key()
142 EVP_SM4_KEY *dat = EVP_C_DATA(EVP_SM4_KEY,ctx); in sm4_cbc_cipher() local
144 if (dat->stream.cbc) in sm4_cbc_cipher()
145 (*dat->stream.cbc) (in, out, len, &dat->ks.ks, ctx->iv, in sm4_cbc_cipher()
148 CRYPTO_cbc128_encrypt(in, out, len, &dat->ks, ctx->iv, in sm4_cbc_cipher()
149 dat->block); in sm4_cbc_cipher()
151 CRYPTO_cbc128_decrypt(in, out, len, &dat->ks, in sm4_cbc_cipher()
152 ctx->iv, dat->block); in sm4_cbc_cipher()
159 EVP_SM4_KEY *dat = EVP_C_DATA(EVP_SM4_KEY,ctx); in sm4_cfb_cipher() local
162 CRYPTO_cfb128_encrypt(in, out, len, &dat->ks, in sm4_cfb_cipher()
164 EVP_CIPHER_CTX_is_encrypting(ctx), dat->block); in sm4_cfb_cipher()
174 EVP_SM4_KEY *dat = EVP_C_DATA(EVP_SM4_KEY,ctx); in sm4_ecb_cipher() local
179 if (dat->stream.ecb != NULL) in sm4_ecb_cipher()
180 (*dat->stream.ecb) (in, out, len, &dat->ks.ks, in sm4_ecb_cipher()
184 (*dat->block) (in + i, out + i, &dat->ks); in sm4_ecb_cipher()
192 EVP_SM4_KEY *dat = EVP_C_DATA(EVP_SM4_KEY,ctx); in sm4_ofb_cipher() local
195 CRYPTO_ofb128_encrypt(in, out, len, &dat->ks, in sm4_ofb_cipher()
196 ctx->iv, &num, dat->block); in sm4_ofb_cipher()
206 EVP_SM4_KEY *dat = EVP_C_DATA(EVP_SM4_KEY,ctx); in sm4_ctr_cipher() local
212 if (dat->stream.ctr) in sm4_ctr_cipher()
213 CRYPTO_ctr128_encrypt_ctr32(in, out, len, &dat->ks, in sm4_ctr_cipher()
216 &num, dat->stream.ctr); in sm4_ctr_cipher()
218 CRYPTO_ctr128_encrypt(in, out, len, &dat->ks, in sm4_ctr_cipher()
221 dat->block); in sm4_ctr_cipher()