• Home
  • Raw
  • Download

Lines Matching refs:inst

128 	struct skcipher_instance *inst;  in crypto_ctr_create()  local
132 inst = skcipher_alloc_instance_simple(tmpl, tb, &alg); in crypto_ctr_create()
133 if (IS_ERR(inst)) in crypto_ctr_create()
134 return PTR_ERR(inst); in crypto_ctr_create()
146 inst->alg.base.cra_blocksize = 1; in crypto_ctr_create()
152 inst->alg.chunksize = alg->cra_blocksize; in crypto_ctr_create()
154 inst->alg.encrypt = crypto_ctr_crypt; in crypto_ctr_create()
155 inst->alg.decrypt = crypto_ctr_crypt; in crypto_ctr_create()
157 err = skcipher_register_instance(tmpl, inst); in crypto_ctr_create()
163 inst->free(inst); in crypto_ctr_create()
225 struct skcipher_instance *inst = skcipher_alg_instance(tfm); in crypto_rfc3686_init_tfm() local
226 struct crypto_skcipher_spawn *spawn = skcipher_instance_ctx(inst); in crypto_rfc3686_init_tfm()
254 static void crypto_rfc3686_free(struct skcipher_instance *inst) in crypto_rfc3686_free() argument
256 struct crypto_skcipher_spawn *spawn = skcipher_instance_ctx(inst); in crypto_rfc3686_free()
259 kfree(inst); in crypto_rfc3686_free()
266 struct skcipher_instance *inst; in crypto_rfc3686_create() local
285 inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL); in crypto_rfc3686_create()
286 if (!inst) in crypto_rfc3686_create()
293 spawn = skcipher_instance_ctx(inst); in crypto_rfc3686_create()
295 crypto_set_skcipher_spawn(spawn, skcipher_crypto_instance(inst)); in crypto_rfc3686_create()
312 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc3686_create()
315 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc3686_create()
320 inst->alg.base.cra_priority = alg->base.cra_priority; in crypto_rfc3686_create()
321 inst->alg.base.cra_blocksize = 1; in crypto_rfc3686_create()
322 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; in crypto_rfc3686_create()
324 inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC; in crypto_rfc3686_create()
326 inst->alg.ivsize = CTR_RFC3686_IV_SIZE; in crypto_rfc3686_create()
327 inst->alg.chunksize = crypto_skcipher_alg_chunksize(alg); in crypto_rfc3686_create()
328 inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg) + in crypto_rfc3686_create()
330 inst->alg.max_keysize = crypto_skcipher_alg_max_keysize(alg) + in crypto_rfc3686_create()
333 inst->alg.setkey = crypto_rfc3686_setkey; in crypto_rfc3686_create()
334 inst->alg.encrypt = crypto_rfc3686_crypt; in crypto_rfc3686_create()
335 inst->alg.decrypt = crypto_rfc3686_crypt; in crypto_rfc3686_create()
337 inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc3686_ctx); in crypto_rfc3686_create()
339 inst->alg.init = crypto_rfc3686_init_tfm; in crypto_rfc3686_create()
340 inst->alg.exit = crypto_rfc3686_exit_tfm; in crypto_rfc3686_create()
342 inst->free = crypto_rfc3686_free; in crypto_rfc3686_create()
344 err = skcipher_register_instance(tmpl, inst); in crypto_rfc3686_create()
354 kfree(inst); in crypto_rfc3686_create()