Lines Matching defs:tfm

141 	refcnt = crypto_tfm_ctx(request->tfm);
187 static inline struct cryptd_queue *cryptd_get_queue(struct crypto_tfm *tfm)
189 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm);
270 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
271 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm);
285 crypto_free_skcipher(tfm);
316 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
320 queue = cryptd_get_queue(crypto_skcipher_tfm(tfm));
339 static int cryptd_skcipher_init_tfm(struct crypto_skcipher *tfm)
341 struct skcipher_instance *inst = skcipher_alg_instance(tfm);
344 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm);
353 tfm, sizeof(struct cryptd_skcipher_request_ctx) +
358 static void cryptd_skcipher_exit_tfm(struct crypto_skcipher *tfm)
360 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm);
430 static int cryptd_hash_init_tfm(struct crypto_ahash *tfm)
432 struct ahash_instance *inst = ahash_alg_instance(tfm);
435 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
443 crypto_ahash_set_reqsize(tfm,
450 struct crypto_ahash *tfm)
453 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
464 static void cryptd_hash_exit_tfm(struct crypto_ahash *tfm)
466 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
487 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
489 cryptd_get_queue(crypto_ahash_tfm(tfm));
516 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
517 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
528 crypto_free_ahash(tfm);
534 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
535 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
543 desc->tfm = child;
610 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
611 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
619 desc->tfm = child;
641 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
642 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
645 desc->tfm = ctx->child;
745 struct crypto_aead *tfm;
753 tfm = crypto_aead_reqtfm(req);
768 ctx = crypto_aead_ctx(tfm);
781 crypto_free_aead(tfm);
812 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
813 struct cryptd_queue *queue = cryptd_get_queue(crypto_aead_tfm(tfm));
833 static int cryptd_aead_init_tfm(struct crypto_aead *tfm)
835 struct aead_instance *inst = aead_alg_instance(tfm);
838 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(tfm);
847 tfm, sizeof(struct cryptd_aead_request_ctx) +
852 static void cryptd_aead_exit_tfm(struct crypto_aead *tfm)
854 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(tfm);
954 struct crypto_skcipher *tfm;
960 tfm = crypto_alloc_skcipher(cryptd_alg_name, type, mask);
961 if (IS_ERR(tfm))
962 return ERR_CAST(tfm);
964 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) {
965 crypto_free_skcipher(tfm);
969 ctx = crypto_skcipher_ctx(tfm);
972 return container_of(tfm, struct cryptd_skcipher, base);
976 struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm)
978 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base);
984 bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm)
986 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base);
992 void cryptd_free_skcipher(struct cryptd_skcipher *tfm)
994 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base);
997 crypto_free_skcipher(&tfm->base);
1006 struct crypto_ahash *tfm;
1011 tfm = crypto_alloc_ahash(cryptd_alg_name, type, mask);
1012 if (IS_ERR(tfm))
1013 return ERR_CAST(tfm);
1014 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) {
1015 crypto_free_ahash(tfm);
1019 ctx = crypto_ahash_ctx(tfm);
1022 return __cryptd_ahash_cast(tfm);
1026 struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm)
1028 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base);
1041 bool cryptd_ahash_queued(struct cryptd_ahash *tfm)
1043 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base);
1049 void cryptd_free_ahash(struct cryptd_ahash *tfm)
1051 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base);
1054 crypto_free_ahash(&tfm->base);
1063 struct crypto_aead *tfm;
1068 tfm = crypto_alloc_aead(cryptd_alg_name, type, mask);
1069 if (IS_ERR(tfm))
1070 return ERR_CAST(tfm);
1071 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) {
1072 crypto_free_aead(tfm);
1076 ctx = crypto_aead_ctx(tfm);
1079 return __cryptd_aead_cast(tfm);
1083 struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm)
1086 ctx = crypto_aead_ctx(&tfm->base);
1091 bool cryptd_aead_queued(struct cryptd_aead *tfm)
1093 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(&tfm->base);
1099 void cryptd_free_aead(struct cryptd_aead *tfm)
1101 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(&tfm->base);
1104 crypto_free_aead(&tfm->base);