Lines Matching refs:alg

491 	if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME,  in crypto_ccm_create_common()
495 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_ccm_create_common()
500 inst->alg.base.cra_priority = (mac->base.cra_priority + in crypto_ccm_create_common()
502 inst->alg.base.cra_blocksize = 1; in crypto_ccm_create_common()
503 inst->alg.base.cra_alignmask = ctr->base.cra_alignmask; in crypto_ccm_create_common()
504 inst->alg.ivsize = 16; in crypto_ccm_create_common()
505 inst->alg.chunksize = ctr->chunksize; in crypto_ccm_create_common()
506 inst->alg.maxauthsize = 16; in crypto_ccm_create_common()
507 inst->alg.base.cra_ctxsize = sizeof(struct crypto_ccm_ctx); in crypto_ccm_create_common()
508 inst->alg.init = crypto_ccm_init_tfm; in crypto_ccm_create_common()
509 inst->alg.exit = crypto_ccm_exit_tfm; in crypto_ccm_create_common()
510 inst->alg.setkey = crypto_ccm_setkey; in crypto_ccm_create_common()
511 inst->alg.setauthsize = crypto_ccm_setauthsize; in crypto_ccm_create_common()
512 inst->alg.encrypt = crypto_ccm_encrypt; in crypto_ccm_create_common()
513 inst->alg.decrypt = crypto_ccm_decrypt; in crypto_ccm_create_common()
706 struct aead_alg *alg; in crypto_rfc4309_create() local
723 alg = crypto_spawn_aead_alg(spawn); in crypto_rfc4309_create()
728 if (crypto_aead_alg_ivsize(alg) != 16) in crypto_rfc4309_create()
732 if (alg->base.cra_blocksize != 1) in crypto_rfc4309_create()
736 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4309_create()
737 "rfc4309(%s)", alg->base.cra_name) >= in crypto_rfc4309_create()
739 snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4309_create()
740 "rfc4309(%s)", alg->base.cra_driver_name) >= in crypto_rfc4309_create()
744 inst->alg.base.cra_priority = alg->base.cra_priority; in crypto_rfc4309_create()
745 inst->alg.base.cra_blocksize = 1; in crypto_rfc4309_create()
746 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; in crypto_rfc4309_create()
748 inst->alg.ivsize = 8; in crypto_rfc4309_create()
749 inst->alg.chunksize = crypto_aead_alg_chunksize(alg); in crypto_rfc4309_create()
750 inst->alg.maxauthsize = 16; in crypto_rfc4309_create()
752 inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc4309_ctx); in crypto_rfc4309_create()
754 inst->alg.init = crypto_rfc4309_init_tfm; in crypto_rfc4309_create()
755 inst->alg.exit = crypto_rfc4309_exit_tfm; in crypto_rfc4309_create()
757 inst->alg.setkey = crypto_rfc4309_setkey; in crypto_rfc4309_create()
758 inst->alg.setauthsize = crypto_rfc4309_setauthsize; in crypto_rfc4309_create()
759 inst->alg.encrypt = crypto_rfc4309_encrypt; in crypto_rfc4309_create()
760 inst->alg.decrypt = crypto_rfc4309_decrypt; in crypto_rfc4309_create()
851 struct crypto_alg *alg; in cbcmac_create() local
868 alg = crypto_spawn_cipher_alg(spawn); in cbcmac_create()
870 err = crypto_inst_setname(shash_crypto_instance(inst), tmpl->name, alg); in cbcmac_create()
874 inst->alg.base.cra_priority = alg->cra_priority; in cbcmac_create()
875 inst->alg.base.cra_blocksize = alg->cra_blocksize; in cbcmac_create()
877 inst->alg.digestsize = alg->cra_blocksize; in cbcmac_create()
878 inst->alg.descsize = alg->cra_blocksize; in cbcmac_create()
880 inst->alg.base.cra_flags = CRYPTO_AHASH_ALG_BLOCK_ONLY; in cbcmac_create()
881 inst->alg.base.cra_ctxsize = sizeof(struct cbcmac_tfm_ctx); in cbcmac_create()
882 inst->alg.base.cra_init = cbcmac_init_tfm; in cbcmac_create()
883 inst->alg.base.cra_exit = cbcmac_exit_tfm; in cbcmac_create()
885 inst->alg.init = crypto_cbcmac_digest_init; in cbcmac_create()
886 inst->alg.update = crypto_cbcmac_digest_update; in cbcmac_create()
887 inst->alg.finup = crypto_cbcmac_digest_finup; in cbcmac_create()
888 inst->alg.setkey = crypto_cbcmac_digest_setkey; in cbcmac_create()