Lines Matching refs:alg
23 static inline struct crypto_istat_aead *aead_get_stat(struct aead_alg *alg) in aead_get_stat() argument
26 return &alg->stat; in aead_get_stat()
106 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_encrypt() local
110 istat = aead_get_stat(alg); in crypto_aead_encrypt()
120 ret = alg->encrypt(req); in crypto_aead_encrypt()
129 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_decrypt() local
133 istat = aead_get_stat(alg); in crypto_aead_decrypt()
145 ret = alg->decrypt(req); in crypto_aead_decrypt()
154 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_exit_tfm() local
156 alg->exit(aead); in crypto_aead_exit_tfm()
162 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_init_tfm() local
166 aead->authsize = alg->maxauthsize; in crypto_aead_init_tfm()
168 if (alg->exit) in crypto_aead_init_tfm()
171 if (alg->init) in crypto_aead_init_tfm()
172 return alg->init(aead); in crypto_aead_init_tfm()
178 struct sk_buff *skb, struct crypto_alg *alg) in crypto_aead_report() argument
181 struct aead_alg *aead = container_of(alg, struct aead_alg, base); in crypto_aead_report()
188 raead.blocksize = alg->cra_blocksize; in crypto_aead_report()
195 static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg)
197 static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg) in crypto_aead_show() argument
199 struct aead_alg *aead = container_of(alg, struct aead_alg, base); in crypto_aead_show()
202 seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ? in crypto_aead_show()
204 seq_printf(m, "blocksize : %u\n", alg->cra_blocksize); in crypto_aead_show()
218 struct sk_buff *skb, struct crypto_alg *alg) in crypto_aead_report_stat() argument
220 struct aead_alg *aead = container_of(alg, struct aead_alg, base); in crypto_aead_report_stat()
271 static int aead_prepare_alg(struct aead_alg *alg) in aead_prepare_alg() argument
273 struct crypto_istat_aead *istat = aead_get_stat(alg); in aead_prepare_alg()
274 struct crypto_alg *base = &alg->base; in aead_prepare_alg()
276 if (max3(alg->maxauthsize, alg->ivsize, alg->chunksize) > in aead_prepare_alg()
280 if (!alg->chunksize) in aead_prepare_alg()
281 alg->chunksize = base->cra_blocksize; in aead_prepare_alg()
293 int crypto_register_aead(struct aead_alg *alg) in crypto_register_aead() argument
295 struct crypto_alg *base = &alg->base; in crypto_register_aead()
298 err = aead_prepare_alg(alg); in crypto_register_aead()
306 void crypto_unregister_aead(struct aead_alg *alg) in crypto_unregister_aead() argument
308 crypto_unregister_alg(&alg->base); in crypto_unregister_aead()
349 err = aead_prepare_alg(&inst->alg); in aead_register_instance()