Lines Matching refs:alg
754 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_gcm_alloc_common()
760 memcpy(inst->alg.cra_name, full_name, CRYPTO_MAX_ALG_NAME); in crypto_gcm_alloc_common()
762 inst->alg.cra_flags = CRYPTO_ALG_TYPE_AEAD; in crypto_gcm_alloc_common()
763 inst->alg.cra_flags |= ctr->cra_flags & CRYPTO_ALG_ASYNC; in crypto_gcm_alloc_common()
764 inst->alg.cra_priority = ctr->cra_priority; in crypto_gcm_alloc_common()
765 inst->alg.cra_blocksize = 1; in crypto_gcm_alloc_common()
766 inst->alg.cra_alignmask = ctr->cra_alignmask | (__alignof__(u64) - 1); in crypto_gcm_alloc_common()
767 inst->alg.cra_type = &crypto_aead_type; in crypto_gcm_alloc_common()
768 inst->alg.cra_aead.ivsize = 16; in crypto_gcm_alloc_common()
769 inst->alg.cra_aead.maxauthsize = 16; in crypto_gcm_alloc_common()
770 inst->alg.cra_ctxsize = sizeof(struct crypto_gcm_ctx); in crypto_gcm_alloc_common()
771 inst->alg.cra_init = crypto_gcm_init_tfm; in crypto_gcm_alloc_common()
772 inst->alg.cra_exit = crypto_gcm_exit_tfm; in crypto_gcm_alloc_common()
773 inst->alg.cra_aead.setkey = crypto_gcm_setkey; in crypto_gcm_alloc_common()
774 inst->alg.cra_aead.setauthsize = crypto_gcm_setauthsize; in crypto_gcm_alloc_common()
775 inst->alg.cra_aead.encrypt = crypto_gcm_encrypt; in crypto_gcm_alloc_common()
776 inst->alg.cra_aead.decrypt = crypto_gcm_decrypt; in crypto_gcm_alloc_common()
969 struct crypto_alg *alg; in crypto_rfc4106_alloc() local
995 alg = crypto_aead_spawn_alg(spawn); in crypto_rfc4106_alloc()
1000 if (alg->cra_aead.ivsize != 16) in crypto_rfc4106_alloc()
1004 if (alg->cra_blocksize != 1) in crypto_rfc4106_alloc()
1008 if (snprintf(inst->alg.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4106_alloc()
1009 "rfc4106(%s)", alg->cra_name) >= CRYPTO_MAX_ALG_NAME || in crypto_rfc4106_alloc()
1010 snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4106_alloc()
1011 "rfc4106(%s)", alg->cra_driver_name) >= in crypto_rfc4106_alloc()
1015 inst->alg.cra_flags = CRYPTO_ALG_TYPE_AEAD; in crypto_rfc4106_alloc()
1016 inst->alg.cra_flags |= alg->cra_flags & CRYPTO_ALG_ASYNC; in crypto_rfc4106_alloc()
1017 inst->alg.cra_priority = alg->cra_priority; in crypto_rfc4106_alloc()
1018 inst->alg.cra_blocksize = 1; in crypto_rfc4106_alloc()
1019 inst->alg.cra_alignmask = alg->cra_alignmask; in crypto_rfc4106_alloc()
1020 inst->alg.cra_type = &crypto_nivaead_type; in crypto_rfc4106_alloc()
1022 inst->alg.cra_aead.ivsize = 8; in crypto_rfc4106_alloc()
1023 inst->alg.cra_aead.maxauthsize = 16; in crypto_rfc4106_alloc()
1025 inst->alg.cra_ctxsize = sizeof(struct crypto_rfc4106_ctx); in crypto_rfc4106_alloc()
1027 inst->alg.cra_init = crypto_rfc4106_init_tfm; in crypto_rfc4106_alloc()
1028 inst->alg.cra_exit = crypto_rfc4106_exit_tfm; in crypto_rfc4106_alloc()
1030 inst->alg.cra_aead.setkey = crypto_rfc4106_setkey; in crypto_rfc4106_alloc()
1031 inst->alg.cra_aead.setauthsize = crypto_rfc4106_setauthsize; in crypto_rfc4106_alloc()
1032 inst->alg.cra_aead.encrypt = crypto_rfc4106_encrypt; in crypto_rfc4106_alloc()
1033 inst->alg.cra_aead.decrypt = crypto_rfc4106_decrypt; in crypto_rfc4106_alloc()
1035 inst->alg.cra_aead.geniv = "seqiv"; in crypto_rfc4106_alloc()
1284 struct crypto_alg *alg; in crypto_rfc4543_alloc() local
1312 alg = crypto_aead_spawn_alg(spawn); in crypto_rfc4543_alloc()
1325 if (alg->cra_aead.ivsize != 16) in crypto_rfc4543_alloc()
1329 if (alg->cra_blocksize != 1) in crypto_rfc4543_alloc()
1333 if (snprintf(inst->alg.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4543_alloc()
1334 "rfc4543(%s)", alg->cra_name) >= CRYPTO_MAX_ALG_NAME || in crypto_rfc4543_alloc()
1335 snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc4543_alloc()
1336 "rfc4543(%s)", alg->cra_driver_name) >= in crypto_rfc4543_alloc()
1340 inst->alg.cra_flags = CRYPTO_ALG_TYPE_AEAD; in crypto_rfc4543_alloc()
1341 inst->alg.cra_flags |= alg->cra_flags & CRYPTO_ALG_ASYNC; in crypto_rfc4543_alloc()
1342 inst->alg.cra_priority = alg->cra_priority; in crypto_rfc4543_alloc()
1343 inst->alg.cra_blocksize = 1; in crypto_rfc4543_alloc()
1344 inst->alg.cra_alignmask = alg->cra_alignmask; in crypto_rfc4543_alloc()
1345 inst->alg.cra_type = &crypto_nivaead_type; in crypto_rfc4543_alloc()
1347 inst->alg.cra_aead.ivsize = 8; in crypto_rfc4543_alloc()
1348 inst->alg.cra_aead.maxauthsize = 16; in crypto_rfc4543_alloc()
1350 inst->alg.cra_ctxsize = sizeof(struct crypto_rfc4543_ctx); in crypto_rfc4543_alloc()
1352 inst->alg.cra_init = crypto_rfc4543_init_tfm; in crypto_rfc4543_alloc()
1353 inst->alg.cra_exit = crypto_rfc4543_exit_tfm; in crypto_rfc4543_alloc()
1355 inst->alg.cra_aead.setkey = crypto_rfc4543_setkey; in crypto_rfc4543_alloc()
1356 inst->alg.cra_aead.setauthsize = crypto_rfc4543_setauthsize; in crypto_rfc4543_alloc()
1357 inst->alg.cra_aead.encrypt = crypto_rfc4543_encrypt; in crypto_rfc4543_alloc()
1358 inst->alg.cra_aead.decrypt = crypto_rfc4543_decrypt; in crypto_rfc4543_alloc()
1360 inst->alg.cra_aead.geniv = "seqiv"; in crypto_rfc4543_alloc()