• Home
  • Raw
  • Download

Lines Matching refs:inst

576 	err = crypto_init_spawn(&spawn->base, alg, spawn->base.inst, mask);  in crypto_grab_nivcipher()
600 struct crypto_instance *inst; in skcipher_geniv_alloc() local
616 inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL); in skcipher_geniv_alloc()
617 if (!inst) in skcipher_geniv_alloc()
620 spawn = crypto_instance_ctx(inst); in skcipher_geniv_alloc()
625 crypto_set_skcipher_spawn(spawn, inst); in skcipher_geniv_alloc()
671 memcpy(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); in skcipher_geniv_alloc()
672 memcpy(inst->alg.cra_driver_name, alg->cra_driver_name, in skcipher_geniv_alloc()
676 if (snprintf(inst->alg.cra_name, CRYPTO_MAX_ALG_NAME, in skcipher_geniv_alloc()
680 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, in skcipher_geniv_alloc()
686 inst->alg.cra_flags = CRYPTO_ALG_TYPE_GIVCIPHER | CRYPTO_ALG_GENIV; in skcipher_geniv_alloc()
687 inst->alg.cra_flags |= alg->cra_flags & CRYPTO_ALG_ASYNC; in skcipher_geniv_alloc()
688 inst->alg.cra_priority = alg->cra_priority; in skcipher_geniv_alloc()
689 inst->alg.cra_blocksize = alg->cra_blocksize; in skcipher_geniv_alloc()
690 inst->alg.cra_alignmask = alg->cra_alignmask; in skcipher_geniv_alloc()
691 inst->alg.cra_type = &crypto_givcipher_type; in skcipher_geniv_alloc()
693 inst->alg.cra_ablkcipher.ivsize = balg.ivsize; in skcipher_geniv_alloc()
694 inst->alg.cra_ablkcipher.min_keysize = balg.min_keysize; in skcipher_geniv_alloc()
695 inst->alg.cra_ablkcipher.max_keysize = balg.max_keysize; in skcipher_geniv_alloc()
696 inst->alg.cra_ablkcipher.geniv = balg.geniv; in skcipher_geniv_alloc()
698 inst->alg.cra_ablkcipher.setkey = balg.setkey; in skcipher_geniv_alloc()
699 inst->alg.cra_ablkcipher.encrypt = balg.encrypt; in skcipher_geniv_alloc()
700 inst->alg.cra_ablkcipher.decrypt = balg.decrypt; in skcipher_geniv_alloc()
703 return inst; in skcipher_geniv_alloc()
708 kfree(inst); in skcipher_geniv_alloc()
709 inst = ERR_PTR(err); in skcipher_geniv_alloc()
714 void skcipher_geniv_free(struct crypto_instance *inst) in skcipher_geniv_free() argument
716 crypto_drop_skcipher(crypto_instance_ctx(inst)); in skcipher_geniv_free()
717 kfree(inst); in skcipher_geniv_free()
723 struct crypto_instance *inst = (void *)tfm->__crt_alg; in skcipher_geniv_init() local
726 cipher = crypto_spawn_skcipher(crypto_instance_ctx(inst)); in skcipher_geniv_init()