Lines Matching refs:inst
338 struct aead_instance *inst = aead_alg_instance(tfm); in crypto_authenc_esn_init_tfm() local
339 struct authenc_esn_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_esn_init_tfm()
395 static void crypto_authenc_esn_free(struct aead_instance *inst) in crypto_authenc_esn_free() argument
397 struct authenc_esn_instance_ctx *ctx = aead_instance_ctx(inst); in crypto_authenc_esn_free()
401 kfree(inst); in crypto_authenc_esn_free()
408 struct aead_instance *inst; in crypto_authenc_esn_create() local
436 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); in crypto_authenc_esn_create()
438 if (!inst) in crypto_authenc_esn_create()
441 ctx = aead_instance_ctx(inst); in crypto_authenc_esn_create()
444 aead_crypto_instance(inst)); in crypto_authenc_esn_create()
448 crypto_set_skcipher_spawn(&ctx->enc, aead_crypto_instance(inst)); in crypto_authenc_esn_create()
458 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_esn_create()
463 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_esn_create()
468 inst->alg.base.cra_flags = (auth_base->cra_flags | in crypto_authenc_esn_create()
470 inst->alg.base.cra_priority = enc->base.cra_priority * 10 + in crypto_authenc_esn_create()
472 inst->alg.base.cra_blocksize = enc->base.cra_blocksize; in crypto_authenc_esn_create()
473 inst->alg.base.cra_alignmask = auth_base->cra_alignmask | in crypto_authenc_esn_create()
475 inst->alg.base.cra_ctxsize = sizeof(struct crypto_authenc_esn_ctx); in crypto_authenc_esn_create()
477 inst->alg.ivsize = crypto_skcipher_alg_ivsize(enc); in crypto_authenc_esn_create()
478 inst->alg.chunksize = crypto_skcipher_alg_chunksize(enc); in crypto_authenc_esn_create()
479 inst->alg.maxauthsize = auth->digestsize; in crypto_authenc_esn_create()
481 inst->alg.init = crypto_authenc_esn_init_tfm; in crypto_authenc_esn_create()
482 inst->alg.exit = crypto_authenc_esn_exit_tfm; in crypto_authenc_esn_create()
484 inst->alg.setkey = crypto_authenc_esn_setkey; in crypto_authenc_esn_create()
485 inst->alg.setauthsize = crypto_authenc_esn_setauthsize; in crypto_authenc_esn_create()
486 inst->alg.encrypt = crypto_authenc_esn_encrypt; in crypto_authenc_esn_create()
487 inst->alg.decrypt = crypto_authenc_esn_decrypt; in crypto_authenc_esn_create()
489 inst->free = crypto_authenc_esn_free, in crypto_authenc_esn_create()
491 err = aead_register_instance(tmpl, inst); in crypto_authenc_esn_create()
504 kfree(inst); in crypto_authenc_esn_create()