Lines Matching refs:alg
130 struct crypto_alg *alg; in crypto_ctr_create() local
137 alg = skcipher_ialg_simple(inst); in crypto_ctr_create()
141 if (alg->cra_blocksize < 4) in crypto_ctr_create()
145 if (alg->cra_blocksize % 4) in crypto_ctr_create()
149 inst->alg.base.cra_blocksize = 1; in crypto_ctr_create()
155 inst->alg.chunksize = alg->cra_blocksize; in crypto_ctr_create()
157 inst->alg.encrypt = crypto_ctr_crypt; in crypto_ctr_create()
158 inst->alg.decrypt = crypto_ctr_crypt; in crypto_ctr_create()
261 struct skcipher_alg *alg; in crypto_rfc3686_create() local
281 alg = crypto_spawn_skcipher_alg(spawn); in crypto_rfc3686_create()
285 if (crypto_skcipher_alg_ivsize(alg) != CTR_RFC3686_BLOCK_SIZE) in crypto_rfc3686_create()
289 if (alg->base.cra_blocksize != 1) in crypto_rfc3686_create()
293 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc3686_create()
294 "rfc3686(%s)", alg->base.cra_name) >= CRYPTO_MAX_ALG_NAME) in crypto_rfc3686_create()
296 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in crypto_rfc3686_create()
297 "rfc3686(%s)", alg->base.cra_driver_name) >= in crypto_rfc3686_create()
301 inst->alg.base.cra_priority = alg->base.cra_priority; in crypto_rfc3686_create()
302 inst->alg.base.cra_blocksize = 1; in crypto_rfc3686_create()
303 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; in crypto_rfc3686_create()
305 inst->alg.ivsize = CTR_RFC3686_IV_SIZE; in crypto_rfc3686_create()
306 inst->alg.chunksize = crypto_skcipher_alg_chunksize(alg); in crypto_rfc3686_create()
307 inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg) + in crypto_rfc3686_create()
309 inst->alg.max_keysize = crypto_skcipher_alg_max_keysize(alg) + in crypto_rfc3686_create()
312 inst->alg.setkey = crypto_rfc3686_setkey; in crypto_rfc3686_create()
313 inst->alg.encrypt = crypto_rfc3686_crypt; in crypto_rfc3686_create()
314 inst->alg.decrypt = crypto_rfc3686_crypt; in crypto_rfc3686_create()
316 inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc3686_ctx); in crypto_rfc3686_create()
318 inst->alg.init = crypto_rfc3686_init_tfm; in crypto_rfc3686_create()
319 inst->alg.exit = crypto_rfc3686_exit_tfm; in crypto_rfc3686_create()