Lines Matching defs:cipher_tfm
185 } cipher_tfm;
254 return cc->cipher_tfm.tfms[0];
259 return cc->cipher_tfm.tfms_aead[0];
1491 skcipher_request_set_tfm(ctx->r.req, cc->cipher_tfm.tfms[key_index]);
1513 aead_request_set_tfm(ctx->r.req_aead, cc->cipher_tfm.tfms_aead[0]);
2317 if (!cc->cipher_tfm.tfms_aead)
2320 if (cc->cipher_tfm.tfms_aead[0] && !IS_ERR(cc->cipher_tfm.tfms_aead[0])) {
2321 crypto_free_aead(cc->cipher_tfm.tfms_aead[0]);
2322 cc->cipher_tfm.tfms_aead[0] = NULL;
2325 kfree(cc->cipher_tfm.tfms_aead);
2326 cc->cipher_tfm.tfms_aead = NULL;
2333 if (!cc->cipher_tfm.tfms)
2337 if (cc->cipher_tfm.tfms[i] && !IS_ERR(cc->cipher_tfm.tfms[i])) {
2338 crypto_free_skcipher(cc->cipher_tfm.tfms[i]);
2339 cc->cipher_tfm.tfms[i] = NULL;
2342 kfree(cc->cipher_tfm.tfms);
2343 cc->cipher_tfm.tfms = NULL;
2359 cc->cipher_tfm.tfms = kcalloc(cc->tfms_count,
2362 if (!cc->cipher_tfm.tfms)
2366 cc->cipher_tfm.tfms[i] = crypto_alloc_skcipher(ciphermode, 0,
2368 if (IS_ERR(cc->cipher_tfm.tfms[i])) {
2369 err = PTR_ERR(cc->cipher_tfm.tfms[i]);
2389 cc->cipher_tfm.tfms = kmalloc(sizeof(struct crypto_aead *), GFP_KERNEL);
2390 if (!cc->cipher_tfm.tfms)
2393 cc->cipher_tfm.tfms_aead[0] = crypto_alloc_aead(ciphermode, 0,
2395 if (IS_ERR(cc->cipher_tfm.tfms_aead[0])) {
2396 err = PTR_ERR(cc->cipher_tfm.tfms_aead[0]);
2465 r = crypto_aead_setkey(cc->cipher_tfm.tfms_aead[i],
2468 r = crypto_aead_setkey(cc->cipher_tfm.tfms_aead[i],
2472 r = crypto_skcipher_setkey(cc->cipher_tfm.tfms[i],