Lines Matching refs:inst
122 struct aead_instance *inst = aead_alg_instance(authenc); in authenc_geniv_ahash_done() local
123 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in authenc_geniv_ahash_done()
141 struct aead_instance *inst = aead_alg_instance(authenc); in crypto_authenc_genicv() local
143 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_genicv()
201 struct aead_instance *inst = aead_alg_instance(authenc); in crypto_authenc_encrypt() local
203 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_encrypt()
239 struct aead_instance *inst = aead_alg_instance(authenc); in crypto_authenc_decrypt_tail() local
241 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_decrypt_tail()
288 struct aead_instance *inst = aead_alg_instance(authenc); in crypto_authenc_decrypt() local
290 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_decrypt()
315 struct aead_instance *inst = aead_alg_instance(tfm); in crypto_authenc_init_tfm() local
316 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_init_tfm()
369 static void crypto_authenc_free(struct aead_instance *inst) in crypto_authenc_free() argument
371 struct authenc_instance_ctx *ctx = aead_instance_ctx(inst); in crypto_authenc_free()
375 kfree(inst); in crypto_authenc_free()
382 struct aead_instance *inst; in crypto_authenc_create() local
410 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); in crypto_authenc_create()
412 if (!inst) in crypto_authenc_create()
415 ctx = aead_instance_ctx(inst); in crypto_authenc_create()
418 aead_crypto_instance(inst)); in crypto_authenc_create()
422 crypto_set_skcipher_spawn(&ctx->enc, aead_crypto_instance(inst)); in crypto_authenc_create()
435 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_create()
441 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_authenc_create()
446 inst->alg.base.cra_flags = (auth_base->cra_flags | in crypto_authenc_create()
448 inst->alg.base.cra_priority = enc->base.cra_priority * 10 + in crypto_authenc_create()
450 inst->alg.base.cra_blocksize = enc->base.cra_blocksize; in crypto_authenc_create()
451 inst->alg.base.cra_alignmask = auth_base->cra_alignmask | in crypto_authenc_create()
453 inst->alg.base.cra_ctxsize = sizeof(struct crypto_authenc_ctx); in crypto_authenc_create()
455 inst->alg.ivsize = crypto_skcipher_alg_ivsize(enc); in crypto_authenc_create()
456 inst->alg.chunksize = crypto_skcipher_alg_chunksize(enc); in crypto_authenc_create()
457 inst->alg.maxauthsize = auth->digestsize; in crypto_authenc_create()
459 inst->alg.init = crypto_authenc_init_tfm; in crypto_authenc_create()
460 inst->alg.exit = crypto_authenc_exit_tfm; in crypto_authenc_create()
462 inst->alg.setkey = crypto_authenc_setkey; in crypto_authenc_create()
463 inst->alg.encrypt = crypto_authenc_encrypt; in crypto_authenc_create()
464 inst->alg.decrypt = crypto_authenc_decrypt; in crypto_authenc_create()
466 inst->free = crypto_authenc_free; in crypto_authenc_create()
468 err = aead_register_instance(tmpl, inst); in crypto_authenc_create()
481 kfree(inst); in crypto_authenc_create()