• Home
  • Raw
  • Download

Lines Matching refs:alg

129 	struct crypto_alg *alg;  in crypto_ctr_create()  local
132 inst = skcipher_alloc_instance_simple(tmpl, tb, &alg); in crypto_ctr_create()
138 if (alg->cra_blocksize < 4) in crypto_ctr_create()
142 if (alg->cra_blocksize % 4) 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()
165 crypto_mod_put(alg); in crypto_ctr_create()
267 struct skcipher_alg *alg; in crypto_rfc3686_create() local
300 alg = crypto_spawn_skcipher_alg(spawn); in crypto_rfc3686_create()
304 if (crypto_skcipher_alg_ivsize(alg) != CTR_RFC3686_BLOCK_SIZE) in crypto_rfc3686_create()
308 if (alg->base.cra_blocksize != 1) in crypto_rfc3686_create()
312 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc3686_create()
313 "rfc3686(%s)", 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()
316 "rfc3686(%s)", alg->base.cra_driver_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()