Lines Matching refs:alg
129 struct crypto_alg *alg; in crypto_ctr_create() local
136 alg = skcipher_ialg_simple(inst); in crypto_ctr_create()
140 if (alg->cra_blocksize < 4) in crypto_ctr_create()
144 if (alg->cra_blocksize % 4) in crypto_ctr_create()
148 inst->alg.base.cra_blocksize = 1; in crypto_ctr_create()
154 inst->alg.chunksize = alg->cra_blocksize; in crypto_ctr_create()
156 inst->alg.encrypt = crypto_ctr_crypt; in crypto_ctr_create()
157 inst->alg.decrypt = crypto_ctr_crypt; in crypto_ctr_create()
260 struct skcipher_alg *alg; in crypto_rfc3686_create() local
280 alg = crypto_spawn_skcipher_alg(spawn); in crypto_rfc3686_create()
284 if (crypto_skcipher_alg_ivsize(alg) != CTR_RFC3686_BLOCK_SIZE) in crypto_rfc3686_create()
288 if (alg->base.cra_blocksize != 1) in crypto_rfc3686_create()
292 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc3686_create()
293 "rfc3686(%s)", alg->base.cra_name) >= CRYPTO_MAX_ALG_NAME) in crypto_rfc3686_create()
295 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc3686_create()
296 "rfc3686(%s)", alg->base.cra_driver_name) >= in crypto_rfc3686_create()
300 inst->alg.base.cra_priority = alg->base.cra_priority; in crypto_rfc3686_create()
301 inst->alg.base.cra_blocksize = 1; in crypto_rfc3686_create()
302 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; in crypto_rfc3686_create()
304 inst->alg.ivsize = CTR_RFC3686_IV_SIZE; in crypto_rfc3686_create()
305 inst->alg.chunksize = crypto_skcipher_alg_chunksize(alg); in crypto_rfc3686_create()
306 inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg) + in crypto_rfc3686_create()
308 inst->alg.max_keysize = crypto_skcipher_alg_max_keysize(alg) + in crypto_rfc3686_create()
311 inst->alg.setkey = crypto_rfc3686_setkey; in crypto_rfc3686_create()
312 inst->alg.encrypt = crypto_rfc3686_crypt; in crypto_rfc3686_create()
313 inst->alg.decrypt = crypto_rfc3686_crypt; in crypto_rfc3686_create()
315 inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc3686_ctx); in crypto_rfc3686_create()
317 inst->alg.init = crypto_rfc3686_init_tfm; in crypto_rfc3686_create()
318 inst->alg.exit = crypto_rfc3686_exit_tfm; in crypto_rfc3686_create()