• Home
  • Raw
  • Download

Lines Matching refs:alg

519 	if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME,  in crypto_ccm_create_common()
523 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_ccm_create_common()
528 inst->alg.base.cra_flags = ctr->base.cra_flags & CRYPTO_ALG_ASYNC; in crypto_ccm_create_common()
529 inst->alg.base.cra_priority = (mac->base.cra_priority + in crypto_ccm_create_common()
531 inst->alg.base.cra_blocksize = 1; in crypto_ccm_create_common()
532 inst->alg.base.cra_alignmask = mac->base.cra_alignmask | in crypto_ccm_create_common()
534 inst->alg.ivsize = 16; in crypto_ccm_create_common()
535 inst->alg.chunksize = crypto_skcipher_alg_chunksize(ctr); in crypto_ccm_create_common()
536 inst->alg.maxauthsize = 16; in crypto_ccm_create_common()
537 inst->alg.base.cra_ctxsize = sizeof(struct crypto_ccm_ctx); in crypto_ccm_create_common()
538 inst->alg.init = crypto_ccm_init_tfm; in crypto_ccm_create_common()
539 inst->alg.exit = crypto_ccm_exit_tfm; in crypto_ccm_create_common()
540 inst->alg.setkey = crypto_ccm_setkey; in crypto_ccm_create_common()
541 inst->alg.setauthsize = crypto_ccm_setauthsize; in crypto_ccm_create_common()
542 inst->alg.encrypt = crypto_ccm_encrypt; in crypto_ccm_create_common()
543 inst->alg.decrypt = crypto_ccm_decrypt; in crypto_ccm_create_common()
750 struct aead_alg *alg; in crypto_rfc4309_create() local
776 alg = crypto_spawn_aead_alg(spawn); in crypto_rfc4309_create()
781 if (crypto_aead_alg_ivsize(alg) != 16) in crypto_rfc4309_create()
785 if (alg->base.cra_blocksize != 1) in crypto_rfc4309_create()
789 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4309_create()
790 "rfc4309(%s)", alg->base.cra_name) >= in crypto_rfc4309_create()
792 snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4309_create()
793 "rfc4309(%s)", alg->base.cra_driver_name) >= in crypto_rfc4309_create()
797 inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC; in crypto_rfc4309_create()
798 inst->alg.base.cra_priority = alg->base.cra_priority; in crypto_rfc4309_create()
799 inst->alg.base.cra_blocksize = 1; in crypto_rfc4309_create()
800 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; in crypto_rfc4309_create()
802 inst->alg.ivsize = 8; in crypto_rfc4309_create()
803 inst->alg.chunksize = crypto_aead_alg_chunksize(alg); in crypto_rfc4309_create()
804 inst->alg.maxauthsize = 16; in crypto_rfc4309_create()
806 inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc4309_ctx); in crypto_rfc4309_create()
808 inst->alg.init = crypto_rfc4309_init_tfm; in crypto_rfc4309_create()
809 inst->alg.exit = crypto_rfc4309_exit_tfm; in crypto_rfc4309_create()
811 inst->alg.setkey = crypto_rfc4309_setkey; in crypto_rfc4309_create()
812 inst->alg.setauthsize = crypto_rfc4309_setauthsize; in crypto_rfc4309_create()
813 inst->alg.encrypt = crypto_rfc4309_encrypt; in crypto_rfc4309_create()
814 inst->alg.decrypt = crypto_rfc4309_decrypt; in crypto_rfc4309_create()
920 struct crypto_alg *alg; in cbcmac_create() local
927 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in cbcmac_create()
929 if (IS_ERR(alg)) in cbcmac_create()
930 return PTR_ERR(alg); in cbcmac_create()
932 inst = shash_alloc_instance("cbcmac", alg); in cbcmac_create()
937 err = crypto_init_spawn(shash_instance_ctx(inst), alg, in cbcmac_create()
943 inst->alg.base.cra_priority = alg->cra_priority; in cbcmac_create()
944 inst->alg.base.cra_blocksize = 1; in cbcmac_create()
946 inst->alg.digestsize = alg->cra_blocksize; in cbcmac_create()
947 inst->alg.descsize = ALIGN(sizeof(struct cbcmac_desc_ctx), in cbcmac_create()
948 alg->cra_alignmask + 1) + in cbcmac_create()
949 alg->cra_blocksize; in cbcmac_create()
951 inst->alg.base.cra_ctxsize = sizeof(struct cbcmac_tfm_ctx); in cbcmac_create()
952 inst->alg.base.cra_init = cbcmac_init_tfm; in cbcmac_create()
953 inst->alg.base.cra_exit = cbcmac_exit_tfm; in cbcmac_create()
955 inst->alg.init = crypto_cbcmac_digest_init; in cbcmac_create()
956 inst->alg.update = crypto_cbcmac_digest_update; in cbcmac_create()
957 inst->alg.final = crypto_cbcmac_digest_final; in cbcmac_create()
958 inst->alg.setkey = crypto_cbcmac_digest_setkey; in cbcmac_create()
967 crypto_mod_put(alg); in cbcmac_create()