Lines Matching refs:alg
225 struct crypto_alg *alg; in cmac_create() local
233 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, in cmac_create()
235 if (IS_ERR(alg)) in cmac_create()
236 return PTR_ERR(alg); in cmac_create()
238 switch (alg->cra_blocksize) { in cmac_create()
247 inst = shash_alloc_instance("cmac", alg); in cmac_create()
252 err = crypto_init_spawn(shash_instance_ctx(inst), alg, in cmac_create()
258 alignmask = alg->cra_alignmask; in cmac_create()
259 inst->alg.base.cra_alignmask = alignmask; in cmac_create()
260 inst->alg.base.cra_priority = alg->cra_priority; in cmac_create()
261 inst->alg.base.cra_blocksize = alg->cra_blocksize; in cmac_create()
263 inst->alg.digestsize = alg->cra_blocksize; in cmac_create()
264 inst->alg.descsize = in cmac_create()
267 + alg->cra_blocksize * 2; in cmac_create()
269 inst->alg.base.cra_ctxsize = in cmac_create()
273 + alg->cra_blocksize * 2; in cmac_create()
275 inst->alg.base.cra_init = cmac_init_tfm; in cmac_create()
276 inst->alg.base.cra_exit = cmac_exit_tfm; in cmac_create()
278 inst->alg.init = crypto_cmac_digest_init; in cmac_create()
279 inst->alg.update = crypto_cmac_digest_update; in cmac_create()
280 inst->alg.final = crypto_cmac_digest_final; in cmac_create()
281 inst->alg.setkey = crypto_cmac_digest_setkey; in cmac_create()
290 crypto_mod_put(alg); in cmac_create()