Lines Matching refs:alg
496 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_ccm_create_common()
500 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_ccm_create_common()
505 inst->alg.base.cra_priority = (mac->base.cra_priority + in crypto_ccm_create_common()
507 inst->alg.base.cra_blocksize = 1; in crypto_ccm_create_common()
508 inst->alg.base.cra_alignmask = mac->base.cra_alignmask | in crypto_ccm_create_common()
510 inst->alg.ivsize = 16; in crypto_ccm_create_common()
511 inst->alg.chunksize = crypto_skcipher_alg_chunksize(ctr); in crypto_ccm_create_common()
512 inst->alg.maxauthsize = 16; in crypto_ccm_create_common()
513 inst->alg.base.cra_ctxsize = sizeof(struct crypto_ccm_ctx); in crypto_ccm_create_common()
514 inst->alg.init = crypto_ccm_init_tfm; in crypto_ccm_create_common()
515 inst->alg.exit = crypto_ccm_exit_tfm; in crypto_ccm_create_common()
516 inst->alg.setkey = crypto_ccm_setkey; in crypto_ccm_create_common()
517 inst->alg.setauthsize = crypto_ccm_setauthsize; in crypto_ccm_create_common()
518 inst->alg.encrypt = crypto_ccm_encrypt; in crypto_ccm_create_common()
519 inst->alg.decrypt = crypto_ccm_decrypt; in crypto_ccm_create_common()
712 struct aead_alg *alg; in crypto_rfc4309_create() local
729 alg = crypto_spawn_aead_alg(spawn); in crypto_rfc4309_create()
734 if (crypto_aead_alg_ivsize(alg) != 16) in crypto_rfc4309_create()
738 if (alg->base.cra_blocksize != 1) in crypto_rfc4309_create()
742 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4309_create()
743 "rfc4309(%s)", alg->base.cra_name) >= in crypto_rfc4309_create()
745 snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4309_create()
746 "rfc4309(%s)", alg->base.cra_driver_name) >= in crypto_rfc4309_create()
750 inst->alg.base.cra_priority = alg->base.cra_priority; in crypto_rfc4309_create()
751 inst->alg.base.cra_blocksize = 1; in crypto_rfc4309_create()
752 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; in crypto_rfc4309_create()
754 inst->alg.ivsize = 8; in crypto_rfc4309_create()
755 inst->alg.chunksize = crypto_aead_alg_chunksize(alg); in crypto_rfc4309_create()
756 inst->alg.maxauthsize = 16; in crypto_rfc4309_create()
758 inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc4309_ctx); in crypto_rfc4309_create()
760 inst->alg.init = crypto_rfc4309_init_tfm; in crypto_rfc4309_create()
761 inst->alg.exit = crypto_rfc4309_exit_tfm; in crypto_rfc4309_create()
763 inst->alg.setkey = crypto_rfc4309_setkey; in crypto_rfc4309_create()
764 inst->alg.setauthsize = crypto_rfc4309_setauthsize; in crypto_rfc4309_create()
765 inst->alg.encrypt = crypto_rfc4309_encrypt; in crypto_rfc4309_create()
766 inst->alg.decrypt = crypto_rfc4309_decrypt; in crypto_rfc4309_create()
867 struct crypto_alg *alg; in cbcmac_create() local
884 alg = crypto_spawn_cipher_alg(spawn); in cbcmac_create()
886 err = crypto_inst_setname(shash_crypto_instance(inst), tmpl->name, alg); in cbcmac_create()
890 inst->alg.base.cra_priority = alg->cra_priority; in cbcmac_create()
891 inst->alg.base.cra_blocksize = 1; in cbcmac_create()
893 inst->alg.digestsize = alg->cra_blocksize; in cbcmac_create()
894 inst->alg.descsize = ALIGN(sizeof(struct cbcmac_desc_ctx), in cbcmac_create()
895 alg->cra_alignmask + 1) + in cbcmac_create()
896 alg->cra_blocksize; in cbcmac_create()
898 inst->alg.base.cra_ctxsize = sizeof(struct cbcmac_tfm_ctx); in cbcmac_create()
899 inst->alg.base.cra_init = cbcmac_init_tfm; in cbcmac_create()
900 inst->alg.base.cra_exit = cbcmac_exit_tfm; in cbcmac_create()
902 inst->alg.init = crypto_cbcmac_digest_init; in cbcmac_create()
903 inst->alg.update = crypto_cbcmac_digest_update; in cbcmac_create()
904 inst->alg.final = crypto_cbcmac_digest_final; in cbcmac_create()
905 inst->alg.setkey = crypto_cbcmac_digest_setkey; in cbcmac_create()