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()
375 struct skcipher_alg *alg; in cryptd_create_skcipher() local
394 alg = crypto_spawn_skcipher_alg(&ctx->spawn); in cryptd_create_skcipher()
395 err = cryptd_init_instance(skcipher_crypto_instance(inst), &alg->base); in cryptd_create_skcipher()
399 inst->alg.base.cra_flags |= CRYPTO_ALG_ASYNC | in cryptd_create_skcipher()
400 (alg->base.cra_flags & CRYPTO_ALG_INTERNAL); in cryptd_create_skcipher()
401 inst->alg.ivsize = crypto_skcipher_alg_ivsize(alg); in cryptd_create_skcipher()
402 inst->alg.chunksize = crypto_skcipher_alg_chunksize(alg); in cryptd_create_skcipher()
403 inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg); in cryptd_create_skcipher()
404 inst->alg.max_keysize = crypto_skcipher_alg_max_keysize(alg); in cryptd_create_skcipher()
406 inst->alg.base.cra_ctxsize = sizeof(struct cryptd_skcipher_ctx); in cryptd_create_skcipher()
408 inst->alg.init = cryptd_skcipher_init_tfm; in cryptd_create_skcipher()
409 inst->alg.exit = cryptd_skcipher_exit_tfm; in cryptd_create_skcipher()
411 inst->alg.setkey = cryptd_skcipher_setkey; in cryptd_create_skcipher()
412 inst->alg.encrypt = cryptd_skcipher_encrypt_enqueue; in cryptd_create_skcipher()
413 inst->alg.decrypt = cryptd_skcipher_decrypt_enqueue; in cryptd_create_skcipher()
641 struct shash_alg *alg; in cryptd_create_hash() local
659 alg = crypto_spawn_shash_alg(&ctx->spawn); in cryptd_create_hash()
661 err = cryptd_init_instance(ahash_crypto_instance(inst), &alg->base); in cryptd_create_hash()
665 inst->alg.halg.base.cra_flags |= CRYPTO_ALG_ASYNC | in cryptd_create_hash()
666 (alg->base.cra_flags & (CRYPTO_ALG_INTERNAL| in cryptd_create_hash()
668 inst->alg.halg.digestsize = alg->digestsize; in cryptd_create_hash()
669 inst->alg.halg.statesize = alg->statesize; in cryptd_create_hash()
670 inst->alg.halg.base.cra_ctxsize = sizeof(struct cryptd_hash_ctx); in cryptd_create_hash()
672 inst->alg.halg.base.cra_init = cryptd_hash_init_tfm; in cryptd_create_hash()
673 inst->alg.halg.base.cra_exit = cryptd_hash_exit_tfm; in cryptd_create_hash()
675 inst->alg.init = cryptd_hash_init_enqueue; in cryptd_create_hash()
676 inst->alg.update = cryptd_hash_update_enqueue; in cryptd_create_hash()
677 inst->alg.final = cryptd_hash_final_enqueue; in cryptd_create_hash()
678 inst->alg.finup = cryptd_hash_finup_enqueue; in cryptd_create_hash()
679 inst->alg.export = cryptd_hash_export; in cryptd_create_hash()
680 inst->alg.import = cryptd_hash_import; in cryptd_create_hash()
681 if (crypto_shash_alg_has_setkey(alg)) in cryptd_create_hash()
682 inst->alg.setkey = cryptd_hash_setkey; in cryptd_create_hash()
683 inst->alg.digest = cryptd_hash_digest_enqueue; in cryptd_create_hash()
828 struct aead_alg *alg; in cryptd_create_aead() local
847 alg = crypto_spawn_aead_alg(&ctx->aead_spawn); in cryptd_create_aead()
848 err = cryptd_init_instance(aead_crypto_instance(inst), &alg->base); in cryptd_create_aead()
852 inst->alg.base.cra_flags |= CRYPTO_ALG_ASYNC | in cryptd_create_aead()
853 (alg->base.cra_flags & CRYPTO_ALG_INTERNAL); in cryptd_create_aead()
854 inst->alg.base.cra_ctxsize = sizeof(struct cryptd_aead_ctx); in cryptd_create_aead()
856 inst->alg.ivsize = crypto_aead_alg_ivsize(alg); in cryptd_create_aead()
857 inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg); in cryptd_create_aead()
859 inst->alg.init = cryptd_aead_init_tfm; in cryptd_create_aead()
860 inst->alg.exit = cryptd_aead_exit_tfm; in cryptd_create_aead()
861 inst->alg.setkey = cryptd_aead_setkey; in cryptd_create_aead()
862 inst->alg.setauthsize = cryptd_aead_setauthsize; in cryptd_create_aead()
863 inst->alg.encrypt = cryptd_aead_encrypt_enqueue; in cryptd_create_aead()
864 inst->alg.decrypt = cryptd_aead_decrypt_enqueue; in cryptd_create_aead()