Lines Matching defs:alg
627 struct crypto_alg *alg = tfm->base.__crt_alg;
631 crypto_stats_get(alg);
636 crypto_stats_skcipher_encrypt(cryptlen, ret, alg);
644 struct crypto_alg *alg = tfm->base.__crt_alg;
648 crypto_stats_get(alg);
653 crypto_stats_skcipher_decrypt(cryptlen, ret, alg);
661 struct skcipher_alg *alg = crypto_skcipher_alg(skcipher);
663 alg->exit(skcipher);
669 struct skcipher_alg *alg = crypto_skcipher_alg(skcipher);
673 if (alg->exit)
676 if (alg->init)
677 return alg->init(skcipher);
690 static void crypto_skcipher_show(struct seq_file *m, struct crypto_alg *alg)
692 static void crypto_skcipher_show(struct seq_file *m, struct crypto_alg *alg)
694 struct skcipher_alg *skcipher = container_of(alg, struct skcipher_alg,
699 alg->cra_flags & CRYPTO_ALG_ASYNC ? "yes" : "no");
700 seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
709 static int crypto_skcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
712 struct skcipher_alg *skcipher = container_of(alg, struct skcipher_alg,
720 rblkcipher.blocksize = alg->cra_blocksize;
729 static int crypto_skcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
795 static int skcipher_prepare_alg(struct skcipher_alg *alg)
797 struct crypto_alg *base = &alg->base;
799 if (alg->ivsize > PAGE_SIZE / 8 || alg->chunksize > PAGE_SIZE / 8 ||
800 alg->walksize > PAGE_SIZE / 8)
803 if (!alg->chunksize)
804 alg->chunksize = base->cra_blocksize;
805 if (!alg->walksize)
806 alg->walksize = alg->chunksize;
815 int crypto_register_skcipher(struct skcipher_alg *alg)
817 struct crypto_alg *base = &alg->base;
820 err = skcipher_prepare_alg(alg);
828 void crypto_unregister_skcipher(struct skcipher_alg *alg)
830 crypto_unregister_alg(&alg->base);
871 err = skcipher_prepare_alg(&inst->alg);
966 inst->alg.base.cra_blocksize = cipher_alg->cra_blocksize;
967 inst->alg.base.cra_alignmask = cipher_alg->cra_alignmask;
968 inst->alg.base.cra_priority = cipher_alg->cra_priority;
969 inst->alg.min_keysize = cipher_alg->cra_cipher.cia_min_keysize;
970 inst->alg.max_keysize = cipher_alg->cra_cipher.cia_max_keysize;
971 inst->alg.ivsize = cipher_alg->cra_blocksize;
974 inst->alg.base.cra_ctxsize = sizeof(struct skcipher_ctx_simple);
975 inst->alg.setkey = skcipher_setkey_simple;
976 inst->alg.init = skcipher_init_tfm_simple;
977 inst->alg.exit = skcipher_exit_tfm_simple;