Lines Matching refs:cipher_tfm

176 	} cipher_tfm;  member
245 return cc->cipher_tfm.tfms[0]; in any_tfm()
250 return cc->cipher_tfm.tfms_aead[0]; in any_tfm_aead()
1465 skcipher_request_set_tfm(ctx->r.req, cc->cipher_tfm.tfms[key_index]); in crypt_alloc_req_skcipher()
1482 aead_request_set_tfm(ctx->r.req_aead, cc->cipher_tfm.tfms_aead[0]); in crypt_alloc_req_aead()
2111 if (!cc->cipher_tfm.tfms_aead) in crypt_free_tfms_aead()
2114 if (cc->cipher_tfm.tfms_aead[0] && !IS_ERR(cc->cipher_tfm.tfms_aead[0])) { in crypt_free_tfms_aead()
2115 crypto_free_aead(cc->cipher_tfm.tfms_aead[0]); in crypt_free_tfms_aead()
2116 cc->cipher_tfm.tfms_aead[0] = NULL; in crypt_free_tfms_aead()
2119 kfree(cc->cipher_tfm.tfms_aead); in crypt_free_tfms_aead()
2120 cc->cipher_tfm.tfms_aead = NULL; in crypt_free_tfms_aead()
2127 if (!cc->cipher_tfm.tfms) in crypt_free_tfms_skcipher()
2131 if (cc->cipher_tfm.tfms[i] && !IS_ERR(cc->cipher_tfm.tfms[i])) { in crypt_free_tfms_skcipher()
2132 crypto_free_skcipher(cc->cipher_tfm.tfms[i]); in crypt_free_tfms_skcipher()
2133 cc->cipher_tfm.tfms[i] = NULL; in crypt_free_tfms_skcipher()
2136 kfree(cc->cipher_tfm.tfms); in crypt_free_tfms_skcipher()
2137 cc->cipher_tfm.tfms = NULL; in crypt_free_tfms_skcipher()
2153 cc->cipher_tfm.tfms = kcalloc(cc->tfms_count, in crypt_alloc_tfms_skcipher()
2156 if (!cc->cipher_tfm.tfms) in crypt_alloc_tfms_skcipher()
2160 cc->cipher_tfm.tfms[i] = crypto_alloc_skcipher(ciphermode, 0, in crypt_alloc_tfms_skcipher()
2162 if (IS_ERR(cc->cipher_tfm.tfms[i])) { in crypt_alloc_tfms_skcipher()
2163 err = PTR_ERR(cc->cipher_tfm.tfms[i]); in crypt_alloc_tfms_skcipher()
2183 cc->cipher_tfm.tfms = kmalloc(sizeof(struct crypto_aead *), GFP_KERNEL); in crypt_alloc_tfms_aead()
2184 if (!cc->cipher_tfm.tfms) in crypt_alloc_tfms_aead()
2187 cc->cipher_tfm.tfms_aead[0] = crypto_alloc_aead(ciphermode, 0, in crypt_alloc_tfms_aead()
2189 if (IS_ERR(cc->cipher_tfm.tfms_aead[0])) { in crypt_alloc_tfms_aead()
2190 err = PTR_ERR(cc->cipher_tfm.tfms_aead[0]); in crypt_alloc_tfms_aead()
2259 r = crypto_aead_setkey(cc->cipher_tfm.tfms_aead[i], in crypt_setkey()
2262 r = crypto_aead_setkey(cc->cipher_tfm.tfms_aead[i], in crypt_setkey()
2266 r = crypto_skcipher_setkey(cc->cipher_tfm.tfms[i], in crypt_setkey()