Lines Matching refs:alg
221 struct crypto_alg *alg; in crypto_pcbc_create() local
236 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER | in crypto_pcbc_create()
240 err = PTR_ERR(alg); in crypto_pcbc_create()
241 if (IS_ERR(alg)) in crypto_pcbc_create()
245 err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst), in crypto_pcbc_create()
247 crypto_mod_put(alg); in crypto_pcbc_create()
251 err = crypto_inst_setname(skcipher_crypto_instance(inst), "pcbc", alg); in crypto_pcbc_create()
255 inst->alg.base.cra_flags = alg->cra_flags & CRYPTO_ALG_INTERNAL; in crypto_pcbc_create()
256 inst->alg.base.cra_priority = alg->cra_priority; in crypto_pcbc_create()
257 inst->alg.base.cra_blocksize = alg->cra_blocksize; in crypto_pcbc_create()
258 inst->alg.base.cra_alignmask = alg->cra_alignmask; in crypto_pcbc_create()
260 inst->alg.ivsize = alg->cra_blocksize; in crypto_pcbc_create()
261 inst->alg.min_keysize = alg->cra_cipher.cia_min_keysize; in crypto_pcbc_create()
262 inst->alg.max_keysize = alg->cra_cipher.cia_max_keysize; in crypto_pcbc_create()
264 inst->alg.base.cra_ctxsize = sizeof(struct crypto_pcbc_ctx); in crypto_pcbc_create()
266 inst->alg.init = crypto_pcbc_init_tfm; in crypto_pcbc_create()
267 inst->alg.exit = crypto_pcbc_exit_tfm; in crypto_pcbc_create()
269 inst->alg.setkey = crypto_pcbc_setkey; in crypto_pcbc_create()
270 inst->alg.encrypt = crypto_pcbc_encrypt; in crypto_pcbc_create()
271 inst->alg.decrypt = crypto_pcbc_decrypt; in crypto_pcbc_create()