Lines Matching refs:cipher_tfm

180 	} cipher_tfm;  member
249 return cc->cipher_tfm.tfms[0]; in any_tfm()
254 return cc->cipher_tfm.tfms_aead[0]; in any_tfm_aead()
1475 skcipher_request_set_tfm(ctx->r.req, cc->cipher_tfm.tfms[key_index]); in crypt_alloc_req_skcipher()
1497 aead_request_set_tfm(ctx->r.req_aead, cc->cipher_tfm.tfms_aead[0]); in crypt_alloc_req_aead()
2246 if (!cc->cipher_tfm.tfms_aead) in crypt_free_tfms_aead()
2249 if (cc->cipher_tfm.tfms_aead[0] && !IS_ERR(cc->cipher_tfm.tfms_aead[0])) { in crypt_free_tfms_aead()
2250 crypto_free_aead(cc->cipher_tfm.tfms_aead[0]); in crypt_free_tfms_aead()
2251 cc->cipher_tfm.tfms_aead[0] = NULL; in crypt_free_tfms_aead()
2254 kfree(cc->cipher_tfm.tfms_aead); in crypt_free_tfms_aead()
2255 cc->cipher_tfm.tfms_aead = NULL; in crypt_free_tfms_aead()
2262 if (!cc->cipher_tfm.tfms) in crypt_free_tfms_skcipher()
2266 if (cc->cipher_tfm.tfms[i] && !IS_ERR(cc->cipher_tfm.tfms[i])) { in crypt_free_tfms_skcipher()
2267 crypto_free_skcipher(cc->cipher_tfm.tfms[i]); in crypt_free_tfms_skcipher()
2268 cc->cipher_tfm.tfms[i] = NULL; in crypt_free_tfms_skcipher()
2271 kfree(cc->cipher_tfm.tfms); in crypt_free_tfms_skcipher()
2272 cc->cipher_tfm.tfms = NULL; in crypt_free_tfms_skcipher()
2288 cc->cipher_tfm.tfms = kcalloc(cc->tfms_count, in crypt_alloc_tfms_skcipher()
2291 if (!cc->cipher_tfm.tfms) in crypt_alloc_tfms_skcipher()
2295 cc->cipher_tfm.tfms[i] = crypto_alloc_skcipher(ciphermode, 0, in crypt_alloc_tfms_skcipher()
2297 if (IS_ERR(cc->cipher_tfm.tfms[i])) { in crypt_alloc_tfms_skcipher()
2298 err = PTR_ERR(cc->cipher_tfm.tfms[i]); in crypt_alloc_tfms_skcipher()
2318 cc->cipher_tfm.tfms = kmalloc(sizeof(struct crypto_aead *), GFP_KERNEL); in crypt_alloc_tfms_aead()
2319 if (!cc->cipher_tfm.tfms) in crypt_alloc_tfms_aead()
2322 cc->cipher_tfm.tfms_aead[0] = crypto_alloc_aead(ciphermode, 0, in crypt_alloc_tfms_aead()
2324 if (IS_ERR(cc->cipher_tfm.tfms_aead[0])) { in crypt_alloc_tfms_aead()
2325 err = PTR_ERR(cc->cipher_tfm.tfms_aead[0]); in crypt_alloc_tfms_aead()
2394 r = crypto_aead_setkey(cc->cipher_tfm.tfms_aead[i], in crypt_setkey()
2397 r = crypto_aead_setkey(cc->cipher_tfm.tfms_aead[i], in crypt_setkey()
2401 r = crypto_skcipher_setkey(cc->cipher_tfm.tfms[i], in crypt_setkey()