Lines Matching refs:alg

211 				struct crypto_alg *alg)  in cryptd_init_instance()  argument
213 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in cryptd_init_instance()
215 alg->cra_driver_name) >= CRYPTO_MAX_ALG_NAME) in cryptd_init_instance()
218 memcpy(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); in cryptd_init_instance()
220 inst->alg.cra_priority = alg->cra_priority + 50; in cryptd_init_instance()
221 inst->alg.cra_blocksize = alg->cra_blocksize; in cryptd_init_instance()
222 inst->alg.cra_alignmask = alg->cra_alignmask; in cryptd_init_instance()
380 struct skcipher_alg *alg; in cryptd_create_skcipher() local
399 alg = crypto_spawn_skcipher_alg(&ctx->spawn); in cryptd_create_skcipher()
400 err = cryptd_init_instance(skcipher_crypto_instance(inst), &alg->base); in cryptd_create_skcipher()
404 inst->alg.base.cra_flags |= CRYPTO_ALG_ASYNC | in cryptd_create_skcipher()
405 (alg->base.cra_flags & CRYPTO_ALG_INTERNAL); in cryptd_create_skcipher()
406 inst->alg.ivsize = crypto_skcipher_alg_ivsize(alg); in cryptd_create_skcipher()
407 inst->alg.chunksize = crypto_skcipher_alg_chunksize(alg); in cryptd_create_skcipher()
408 inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg); in cryptd_create_skcipher()
409 inst->alg.max_keysize = crypto_skcipher_alg_max_keysize(alg); in cryptd_create_skcipher()
411 inst->alg.base.cra_ctxsize = sizeof(struct cryptd_skcipher_ctx); in cryptd_create_skcipher()
413 inst->alg.init = cryptd_skcipher_init_tfm; in cryptd_create_skcipher()
414 inst->alg.exit = cryptd_skcipher_exit_tfm; in cryptd_create_skcipher()
416 inst->alg.setkey = cryptd_skcipher_setkey; in cryptd_create_skcipher()
417 inst->alg.encrypt = cryptd_skcipher_encrypt_enqueue; in cryptd_create_skcipher()
418 inst->alg.decrypt = cryptd_skcipher_decrypt_enqueue; in cryptd_create_skcipher()
649 struct shash_alg *alg; in cryptd_create_hash() local
667 alg = crypto_spawn_shash_alg(&ctx->spawn); in cryptd_create_hash()
669 err = cryptd_init_instance(ahash_crypto_instance(inst), &alg->base); in cryptd_create_hash()
673 inst->alg.halg.base.cra_flags |= CRYPTO_ALG_ASYNC | in cryptd_create_hash()
674 (alg->base.cra_flags & (CRYPTO_ALG_INTERNAL| in cryptd_create_hash()
676 inst->alg.halg.digestsize = alg->digestsize; in cryptd_create_hash()
677 inst->alg.halg.statesize = alg->statesize; in cryptd_create_hash()
678 inst->alg.halg.base.cra_ctxsize = sizeof(struct cryptd_hash_ctx); in cryptd_create_hash()
680 inst->alg.halg.base.cra_init = cryptd_hash_init_tfm; in cryptd_create_hash()
681 inst->alg.halg.base.cra_exit = cryptd_hash_exit_tfm; in cryptd_create_hash()
683 inst->alg.init = cryptd_hash_init_enqueue; in cryptd_create_hash()
684 inst->alg.update = cryptd_hash_update_enqueue; in cryptd_create_hash()
685 inst->alg.final = cryptd_hash_final_enqueue; in cryptd_create_hash()
686 inst->alg.finup = cryptd_hash_finup_enqueue; in cryptd_create_hash()
687 inst->alg.export = cryptd_hash_export; in cryptd_create_hash()
688 inst->alg.import = cryptd_hash_import; in cryptd_create_hash()
689 if (crypto_shash_alg_has_setkey(alg)) in cryptd_create_hash()
690 inst->alg.setkey = cryptd_hash_setkey; in cryptd_create_hash()
691 inst->alg.digest = cryptd_hash_digest_enqueue; in cryptd_create_hash()
857 struct aead_alg *alg; in cryptd_create_aead() local
876 alg = crypto_spawn_aead_alg(&ctx->aead_spawn); in cryptd_create_aead()
877 err = cryptd_init_instance(aead_crypto_instance(inst), &alg->base); in cryptd_create_aead()
881 inst->alg.base.cra_flags |= CRYPTO_ALG_ASYNC | in cryptd_create_aead()
882 (alg->base.cra_flags & CRYPTO_ALG_INTERNAL); in cryptd_create_aead()
883 inst->alg.base.cra_ctxsize = sizeof(struct cryptd_aead_ctx); in cryptd_create_aead()
885 inst->alg.ivsize = crypto_aead_alg_ivsize(alg); in cryptd_create_aead()
886 inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg); in cryptd_create_aead()
888 inst->alg.init = cryptd_aead_init_tfm; in cryptd_create_aead()
889 inst->alg.exit = cryptd_aead_exit_tfm; in cryptd_create_aead()
890 inst->alg.setkey = cryptd_aead_setkey; in cryptd_create_aead()
891 inst->alg.setauthsize = cryptd_aead_setauthsize; in cryptd_create_aead()
892 inst->alg.encrypt = cryptd_aead_encrypt_enqueue; in cryptd_create_aead()
893 inst->alg.decrypt = cryptd_aead_decrypt_enqueue; in cryptd_create_aead()