Lines Matching refs:inst

330 	struct aead_instance *inst = aead_alg_instance(tfm);  in crypto_authenc_esn_init_tfm()  local
331 struct authenc_esn_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_esn_init_tfm()
387 static void crypto_authenc_esn_free(struct aead_instance *inst) in crypto_authenc_esn_free() argument
389 struct authenc_esn_instance_ctx *ctx = aead_instance_ctx(inst); in crypto_authenc_esn_free()
393 kfree(inst); in crypto_authenc_esn_free()
400 struct aead_instance *inst; in crypto_authenc_esn_create() local
427 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); in crypto_authenc_esn_create()
429 if (!inst) in crypto_authenc_esn_create()
432 ctx = aead_instance_ctx(inst); in crypto_authenc_esn_create()
435 aead_crypto_instance(inst)); in crypto_authenc_esn_create()
439 crypto_set_skcipher_spawn(&ctx->enc, aead_crypto_instance(inst)); in crypto_authenc_esn_create()
449 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_esn_create()
454 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_esn_create()
459 inst->alg.base.cra_flags = enc->cra_flags & CRYPTO_ALG_ASYNC; in crypto_authenc_esn_create()
460 inst->alg.base.cra_priority = enc->cra_priority * 10 + in crypto_authenc_esn_create()
462 inst->alg.base.cra_blocksize = enc->cra_blocksize; in crypto_authenc_esn_create()
463 inst->alg.base.cra_alignmask = auth_base->cra_alignmask | in crypto_authenc_esn_create()
465 inst->alg.base.cra_ctxsize = sizeof(struct crypto_authenc_esn_ctx); in crypto_authenc_esn_create()
467 inst->alg.ivsize = enc->cra_ablkcipher.ivsize; in crypto_authenc_esn_create()
468 inst->alg.maxauthsize = auth->digestsize; in crypto_authenc_esn_create()
470 inst->alg.init = crypto_authenc_esn_init_tfm; in crypto_authenc_esn_create()
471 inst->alg.exit = crypto_authenc_esn_exit_tfm; in crypto_authenc_esn_create()
473 inst->alg.setkey = crypto_authenc_esn_setkey; in crypto_authenc_esn_create()
474 inst->alg.setauthsize = crypto_authenc_esn_setauthsize; in crypto_authenc_esn_create()
475 inst->alg.encrypt = crypto_authenc_esn_encrypt; in crypto_authenc_esn_create()
476 inst->alg.decrypt = crypto_authenc_esn_decrypt; in crypto_authenc_esn_create()
478 inst->free = crypto_authenc_esn_free, in crypto_authenc_esn_create()
480 err = aead_register_instance(tmpl, inst); in crypto_authenc_esn_create()
493 kfree(inst); in crypto_authenc_esn_create()