Lines Matching refs:alg

27 	struct crypto_alg *alg)  in __crypto_lskcipher_alg()  argument
29 return container_of(alg, struct lskcipher_alg, co.base); in __crypto_lskcipher_alg()
143 struct lskcipher_alg *alg = crypto_lskcipher_alg(tfm); in crypto_lskcipher_encrypt() local
145 return crypto_lskcipher_crypt(tfm, src, dst, len, iv, alg->encrypt); in crypto_lskcipher_encrypt()
152 struct lskcipher_alg *alg = crypto_lskcipher_alg(tfm); in crypto_lskcipher_decrypt() local
154 return crypto_lskcipher_crypt(tfm, src, dst, len, iv, alg->decrypt); in crypto_lskcipher_decrypt()
205 struct lskcipher_alg *alg = crypto_lskcipher_alg(*ctx); in crypto_lskcipher_encrypt_sg() local
207 return crypto_lskcipher_crypt_sg(req, alg->encrypt); in crypto_lskcipher_encrypt_sg()
214 struct lskcipher_alg *alg = crypto_lskcipher_alg(*ctx); in crypto_lskcipher_decrypt_sg() local
216 return crypto_lskcipher_crypt_sg(req, alg->decrypt); in crypto_lskcipher_decrypt_sg()
222 struct lskcipher_alg *alg = crypto_lskcipher_alg(skcipher); in crypto_lskcipher_exit_tfm() local
224 alg->exit(skcipher); in crypto_lskcipher_exit_tfm()
230 struct lskcipher_alg *alg = crypto_lskcipher_alg(skcipher); in crypto_lskcipher_init_tfm() local
232 if (alg->exit) in crypto_lskcipher_init_tfm()
235 if (alg->init) in crypto_lskcipher_init_tfm()
236 return alg->init(skcipher); in crypto_lskcipher_init_tfm()
250 struct seq_file *m, struct crypto_alg *alg) in crypto_lskcipher_show() argument
252 struct lskcipher_alg *skcipher = __crypto_lskcipher_alg(alg); in crypto_lskcipher_show()
255 seq_printf(m, "blocksize : %u\n", alg->cra_blocksize); in crypto_lskcipher_show()
264 struct sk_buff *skb, struct crypto_alg *alg) in crypto_lskcipher_report() argument
266 struct lskcipher_alg *skcipher = __crypto_lskcipher_alg(alg); in crypto_lskcipher_report()
274 rblkcipher.blocksize = alg->cra_blocksize; in crypto_lskcipher_report()
344 static int lskcipher_prepare_alg(struct lskcipher_alg *alg) in lskcipher_prepare_alg() argument
346 struct crypto_alg *base = &alg->co.base; in lskcipher_prepare_alg()
349 err = skcipher_prepare_alg_common(&alg->co); in lskcipher_prepare_alg()
353 if (alg->co.chunksize & (alg->co.chunksize - 1)) in lskcipher_prepare_alg()
362 int crypto_register_lskcipher(struct lskcipher_alg *alg) in crypto_register_lskcipher() argument
364 struct crypto_alg *base = &alg->co.base; in crypto_register_lskcipher()
367 err = lskcipher_prepare_alg(alg); in crypto_register_lskcipher()
375 void crypto_unregister_lskcipher(struct lskcipher_alg *alg) in crypto_unregister_lskcipher() argument
377 crypto_unregister_alg(&alg->co.base); in crypto_unregister_lskcipher()
418 err = lskcipher_prepare_alg(&inst->alg); in lskcipher_register_instance()
548 if (snprintf(inst->alg.co.base.cra_name, CRYPTO_MAX_ALG_NAME, in lskcipher_alloc_instance_simple()
554 snprintf(inst->alg.co.base.cra_driver_name, in lskcipher_alloc_instance_simple()
573 inst->alg.co.base.cra_blocksize = cipher_alg->co.base.cra_blocksize; in lskcipher_alloc_instance_simple()
574 inst->alg.co.base.cra_alignmask = cipher_alg->co.base.cra_alignmask; in lskcipher_alloc_instance_simple()
575 inst->alg.co.base.cra_priority = cipher_alg->co.base.cra_priority; in lskcipher_alloc_instance_simple()
576 inst->alg.co.min_keysize = cipher_alg->co.min_keysize; in lskcipher_alloc_instance_simple()
577 inst->alg.co.max_keysize = cipher_alg->co.max_keysize; in lskcipher_alloc_instance_simple()
578 inst->alg.co.ivsize = cipher_alg->co.base.cra_blocksize; in lskcipher_alloc_instance_simple()
579 inst->alg.co.statesize = cipher_alg->co.statesize; in lskcipher_alloc_instance_simple()
582 inst->alg.co.base.cra_ctxsize = sizeof(struct crypto_lskcipher *); in lskcipher_alloc_instance_simple()
583 inst->alg.setkey = lskcipher_setkey_simple; in lskcipher_alloc_instance_simple()
584 inst->alg.init = lskcipher_init_tfm_simple; in lskcipher_alloc_instance_simple()
585 inst->alg.exit = lskcipher_exit_tfm_simple; in lskcipher_alloc_instance_simple()