Lines Matching refs:cipher_tfm

173 	} cipher_tfm;  member
240 return cc->cipher_tfm.tfms[0]; in any_tfm()
245 return cc->cipher_tfm.tfms_aead[0]; in any_tfm_aead()
1247 skcipher_request_set_tfm(ctx->r.req, cc->cipher_tfm.tfms[key_index]); in crypt_alloc_req_skcipher()
1264 aead_request_set_tfm(ctx->r.req_aead, cc->cipher_tfm.tfms_aead[0]); in crypt_alloc_req_aead()
1831 if (!cc->cipher_tfm.tfms_aead) in crypt_free_tfms_aead()
1834 if (cc->cipher_tfm.tfms_aead[0] && !IS_ERR(cc->cipher_tfm.tfms_aead[0])) { in crypt_free_tfms_aead()
1835 crypto_free_aead(cc->cipher_tfm.tfms_aead[0]); in crypt_free_tfms_aead()
1836 cc->cipher_tfm.tfms_aead[0] = NULL; in crypt_free_tfms_aead()
1839 kfree(cc->cipher_tfm.tfms_aead); in crypt_free_tfms_aead()
1840 cc->cipher_tfm.tfms_aead = NULL; in crypt_free_tfms_aead()
1847 if (!cc->cipher_tfm.tfms) in crypt_free_tfms_skcipher()
1851 if (cc->cipher_tfm.tfms[i] && !IS_ERR(cc->cipher_tfm.tfms[i])) { in crypt_free_tfms_skcipher()
1852 crypto_free_skcipher(cc->cipher_tfm.tfms[i]); in crypt_free_tfms_skcipher()
1853 cc->cipher_tfm.tfms[i] = NULL; in crypt_free_tfms_skcipher()
1856 kfree(cc->cipher_tfm.tfms); in crypt_free_tfms_skcipher()
1857 cc->cipher_tfm.tfms = NULL; in crypt_free_tfms_skcipher()
1873 cc->cipher_tfm.tfms = kcalloc(cc->tfms_count, in crypt_alloc_tfms_skcipher()
1876 if (!cc->cipher_tfm.tfms) in crypt_alloc_tfms_skcipher()
1880 cc->cipher_tfm.tfms[i] = crypto_alloc_skcipher(ciphermode, 0, 0); in crypt_alloc_tfms_skcipher()
1881 if (IS_ERR(cc->cipher_tfm.tfms[i])) { in crypt_alloc_tfms_skcipher()
1882 err = PTR_ERR(cc->cipher_tfm.tfms[i]); in crypt_alloc_tfms_skcipher()
1895 cc->cipher_tfm.tfms = kmalloc(sizeof(struct crypto_aead *), GFP_KERNEL); in crypt_alloc_tfms_aead()
1896 if (!cc->cipher_tfm.tfms) in crypt_alloc_tfms_aead()
1899 cc->cipher_tfm.tfms_aead[0] = crypto_alloc_aead(ciphermode, 0, 0); in crypt_alloc_tfms_aead()
1900 if (IS_ERR(cc->cipher_tfm.tfms_aead[0])) { in crypt_alloc_tfms_aead()
1901 err = PTR_ERR(cc->cipher_tfm.tfms_aead[0]); in crypt_alloc_tfms_aead()
1968 r = crypto_aead_setkey(cc->cipher_tfm.tfms_aead[i], in crypt_setkey()
1971 r = crypto_aead_setkey(cc->cipher_tfm.tfms_aead[i], in crypt_setkey()
1975 r = crypto_skcipher_setkey(cc->cipher_tfm.tfms[i], in crypt_setkey()