Lines Matching refs:inst
126 struct aead_instance *inst = aead_alg_instance(authenc); in authenc_geniv_ahash_done() local
127 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in authenc_geniv_ahash_done()
145 struct aead_instance *inst = aead_alg_instance(authenc); in crypto_authenc_genicv() local
147 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_genicv()
205 struct aead_instance *inst = aead_alg_instance(authenc); in crypto_authenc_encrypt() local
207 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_encrypt()
243 struct aead_instance *inst = aead_alg_instance(authenc); in crypto_authenc_decrypt_tail() local
245 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_decrypt_tail()
292 struct aead_instance *inst = aead_alg_instance(authenc); in crypto_authenc_decrypt() local
294 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_decrypt()
319 struct aead_instance *inst = aead_alg_instance(tfm); in crypto_authenc_init_tfm() local
320 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_init_tfm()
373 static void crypto_authenc_free(struct aead_instance *inst) in crypto_authenc_free() argument
375 struct authenc_instance_ctx *ctx = aead_instance_ctx(inst); in crypto_authenc_free()
379 kfree(inst); in crypto_authenc_free()
386 struct aead_instance *inst; in crypto_authenc_create() local
414 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); in crypto_authenc_create()
416 if (!inst) in crypto_authenc_create()
419 ctx = aead_instance_ctx(inst); in crypto_authenc_create()
422 aead_crypto_instance(inst)); in crypto_authenc_create()
426 crypto_set_skcipher_spawn(&ctx->enc, aead_crypto_instance(inst)); in crypto_authenc_create()
439 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_create()
445 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_create()
450 inst->alg.base.cra_flags = (auth_base->cra_flags | in crypto_authenc_create()
452 inst->alg.base.cra_priority = enc->base.cra_priority * 10 + in crypto_authenc_create()
454 inst->alg.base.cra_blocksize = enc->base.cra_blocksize; in crypto_authenc_create()
455 inst->alg.base.cra_alignmask = auth_base->cra_alignmask | in crypto_authenc_create()
457 inst->alg.base.cra_ctxsize = sizeof(struct crypto_authenc_ctx); in crypto_authenc_create()
459 inst->alg.ivsize = crypto_skcipher_alg_ivsize(enc); in crypto_authenc_create()
460 inst->alg.chunksize = crypto_skcipher_alg_chunksize(enc); in crypto_authenc_create()
461 inst->alg.maxauthsize = auth->digestsize; in crypto_authenc_create()
463 inst->alg.init = crypto_authenc_init_tfm; in crypto_authenc_create()
464 inst->alg.exit = crypto_authenc_exit_tfm; in crypto_authenc_create()
466 inst->alg.setkey = crypto_authenc_setkey; in crypto_authenc_create()
467 inst->alg.encrypt = crypto_authenc_encrypt; in crypto_authenc_create()
468 inst->alg.decrypt = crypto_authenc_decrypt; in crypto_authenc_create()
470 inst->free = crypto_authenc_free; in crypto_authenc_create()
472 err = aead_register_instance(tmpl, inst); in crypto_authenc_create()
485 kfree(inst); in crypto_authenc_create()