• Home
  • Raw
  • Download

Lines Matching refs:inst

334 	struct aead_instance *inst = aead_alg_instance(tfm);  in crypto_authenc_esn_init_tfm()  local
335 struct authenc_esn_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_esn_init_tfm()
391 static void crypto_authenc_esn_free(struct aead_instance *inst) in crypto_authenc_esn_free() argument
393 struct authenc_esn_instance_ctx *ctx = aead_instance_ctx(inst); in crypto_authenc_esn_free()
397 kfree(inst); in crypto_authenc_esn_free()
404 struct aead_instance *inst; in crypto_authenc_esn_create() local
432 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); in crypto_authenc_esn_create()
434 if (!inst) in crypto_authenc_esn_create()
437 ctx = aead_instance_ctx(inst); in crypto_authenc_esn_create()
440 aead_crypto_instance(inst)); in crypto_authenc_esn_create()
444 crypto_set_skcipher_spawn(&ctx->enc, aead_crypto_instance(inst)); in crypto_authenc_esn_create()
454 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_esn_create()
459 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_esn_create()
464 inst->alg.base.cra_flags = (auth_base->cra_flags | in crypto_authenc_esn_create()
466 inst->alg.base.cra_priority = enc->base.cra_priority * 10 + in crypto_authenc_esn_create()
468 inst->alg.base.cra_blocksize = enc->base.cra_blocksize; in crypto_authenc_esn_create()
469 inst->alg.base.cra_alignmask = auth_base->cra_alignmask | in crypto_authenc_esn_create()
471 inst->alg.base.cra_ctxsize = sizeof(struct crypto_authenc_esn_ctx); in crypto_authenc_esn_create()
473 inst->alg.ivsize = crypto_skcipher_alg_ivsize(enc); in crypto_authenc_esn_create()
474 inst->alg.chunksize = crypto_skcipher_alg_chunksize(enc); in crypto_authenc_esn_create()
475 inst->alg.maxauthsize = auth->digestsize; in crypto_authenc_esn_create()
477 inst->alg.init = crypto_authenc_esn_init_tfm; in crypto_authenc_esn_create()
478 inst->alg.exit = crypto_authenc_esn_exit_tfm; in crypto_authenc_esn_create()
480 inst->alg.setkey = crypto_authenc_esn_setkey; in crypto_authenc_esn_create()
481 inst->alg.setauthsize = crypto_authenc_esn_setauthsize; in crypto_authenc_esn_create()
482 inst->alg.encrypt = crypto_authenc_esn_encrypt; in crypto_authenc_esn_create()
483 inst->alg.decrypt = crypto_authenc_esn_decrypt; in crypto_authenc_esn_create()
485 inst->free = crypto_authenc_esn_free, in crypto_authenc_esn_create()
487 err = aead_register_instance(tmpl, inst); in crypto_authenc_esn_create()
500 kfree(inst); in crypto_authenc_esn_create()