Home
last modified time | relevance | path

Searched refs:alg (Results 1 – 25 of 291) sorted by relevance

12345678910>>...12

/linux/crypto/
A Dalgapi.c35 if (!alg->cra_name[0] || !alg->cra_driver_name[0]) in crypto_check_alg()
38 if (alg->cra_alignmask & (alg->cra_alignmask + 1)) in crypto_check_alg()
49 if (!alg->cra_type && (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) == in crypto_check_alg()
177 BUG_ON(&inst->alg == alg); in crypto_remove_spawns()
238 memcpy(larval->alg.cra_driver_name, alg->cra_driver_name, in crypto_alloc_test_larval()
240 larval->alg.cra_priority = alg->cra_priority; in crypto_alloc_test_larval()
463 alg->cra_destroy(alg); in crypto_unregister_alg()
693 spawn->alg = alg; in crypto_grab_spawn()
731 alg = spawn->alg; in crypto_spawn_alg()
745 return alg; in crypto_spawn_alg()
[all …]
A Dapi.c83 if (alg) in __crypto_alg_lookup()
85 alg = q; in __crypto_alg_lookup()
91 return alg; in __crypto_alg_lookup()
138 if (!alg) { in crypto_larval_add()
139 alg = &larval->alg; in crypto_larval_add()
144 if (alg != &larval->alg) { in crypto_larval_add()
147 alg = crypto_larval_wait(alg); in crypto_larval_add()
150 return alg; in crypto_larval_add()
246 if (alg && !crypto_is_larval(alg)) { in crypto_alg_lookup()
279 if (!IS_ERR_OR_NULL(alg) && crypto_is_larval(alg)) in crypto_larval_lookup()
[all …]
A Dcrypto_user_stat.c192 ualg->cru_flags = alg->cra_flags; in crypto_reportstat_one()
209 if (crypto_report_aead(skb, alg)) in crypto_reportstat_one()
221 if (crypto_report_comp(skb, alg)) in crypto_reportstat_one()
225 if (crypto_report_acomp(skb, alg)) in crypto_reportstat_one()
229 if (crypto_report_acomp(skb, alg)) in crypto_reportstat_one()
237 if (crypto_report_kpp(skb, alg)) in crypto_reportstat_one()
249 if (crypto_report_rng(skb, alg)) in crypto_reportstat_one()
300 struct crypto_alg *alg; in crypto_reportstat() local
308 alg = crypto_alg_match(p, 0); in crypto_reportstat()
309 if (!alg) in crypto_reportstat()
[all …]
A Dinternal.h27 struct crypto_alg alg; member
64 return alg->cra_ctxsize; in crypto_cipher_ctxsize()
69 return alg->cra_ctxsize; in crypto_compress_ctxsize()
83 void crypto_shoot_alg(struct crypto_alg *alg);
118 refcount_inc(&alg->cra_refcnt); in crypto_alg_get()
119 return alg; in crypto_alg_get()
124 if (refcount_dec_and_test(&alg->cra_refcnt) && alg->cra_destroy) in crypto_alg_put()
125 alg->cra_destroy(alg); in crypto_alg_put()
140 return alg->cra_flags & CRYPTO_ALG_LARVAL; in crypto_is_larval()
145 return alg->cra_flags & CRYPTO_ALG_DEAD; in crypto_is_dead()
[all …]
A Dcrypto_user_base.c63 alg = q; in crypto_alg_match()
69 return alg; in crypto_alg_match()
127 if (alg->cra_type && alg->cra_type->report) { in crypto_report_one()
128 if (alg->cra_type->report(skb, alg)) in crypto_report_one()
198 if (!alg) in crypto_report()
214 crypto_mod_put(alg); in crypto_report()
278 if (!alg) in crypto_update_alg()
290 crypto_mod_put(alg); in crypto_update_alg()
310 if (!alg) in crypto_del_alg()
356 if (alg) { in crypto_add_alg()
[all …]
A Dakcipher.c55 alg->exit(akcipher); in crypto_akcipher_exit_tfm()
63 if (alg->exit) in crypto_akcipher_init_tfm()
66 if (alg->init) in crypto_akcipher_init_tfm()
67 return alg->init(akcipher); in crypto_akcipher_init_tfm()
127 if (!alg->sign) in crypto_register_akcipher()
128 alg->sign = akcipher_default_op; in crypto_register_akcipher()
129 if (!alg->verify) in crypto_register_akcipher()
131 if (!alg->encrypt) in crypto_register_akcipher()
133 if (!alg->decrypt) in crypto_register_akcipher()
136 akcipher_prepare_alg(alg); in crypto_register_akcipher()
[all …]
A Dsimd.c43 struct skcipher_alg alg; member
116 struct skcipher_alg *alg; in simd_skcipher_init() local
120 salg = container_of(alg, struct simd_skcipher_alg, alg); in simd_skcipher_init()
146 struct skcipher_alg *alg; in simd_skcipher_create_compat() local
163 alg = &salg->alg; in simd_skcipher_create_compat()
182 alg->ivsize = ialg->ivsize; in simd_skcipher_create_compat()
283 struct aead_alg alg; member
364 struct aead_alg *alg; in simd_aead_init() local
368 salg = container_of(alg, struct simd_aead_alg, alg); in simd_aead_init()
393 struct aead_alg *alg; in simd_aead_create_compat() local
[all …]
A Daead.c90 crypto_stats_get(alg); in crypto_aead_encrypt()
107 crypto_stats_get(alg); in crypto_aead_decrypt()
124 alg->exit(aead); in crypto_aead_exit_tfm()
134 aead->authsize = alg->maxauthsize; in crypto_aead_init_tfm()
136 if (alg->exit) in crypto_aead_init_tfm()
139 if (alg->init) in crypto_aead_init_tfm()
140 return alg->init(aead); in crypto_aead_init_tfm()
224 if (max3(alg->maxauthsize, alg->ivsize, alg->chunksize) > in aead_prepare_alg()
228 if (!alg->chunksize) in aead_prepare_alg()
243 err = aead_prepare_alg(alg); in crypto_register_aead()
[all …]
A Dproc.c40 seq_printf(m, "name : %s\n", alg->cra_name); in c_show()
43 seq_printf(m, "priority : %d\n", alg->cra_priority); in c_show()
46 (alg->cra_flags & CRYPTO_ALG_TESTED) ? in c_show()
49 (alg->cra_flags & CRYPTO_ALG_INTERNAL) ? in c_show()
52 if (alg->cra_flags & CRYPTO_ALG_LARVAL) { in c_show()
54 seq_printf(m, "flags : 0x%x\n", alg->cra_flags); in c_show()
58 if (alg->cra_type && alg->cra_type->show) { in c_show()
59 alg->cra_type->show(m, alg); in c_show()
63 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { in c_show()
68 alg->cra_cipher.cia_min_keysize); in c_show()
[all …]
A Dahash.c347 crypto_stats_get(alg); in crypto_ahash_final()
361 crypto_stats_get(alg); in crypto_ahash_finup()
375 crypto_stats_get(alg); in crypto_ahash_digest()
452 alg->exit_tfm(hash); in crypto_ahash_exit_tfm()
465 hash->init = alg->init; in crypto_ahash_init_tfm()
466 hash->update = alg->update; in crypto_ahash_init_tfm()
467 hash->final = alg->final; in crypto_ahash_init_tfm()
469 hash->digest = alg->digest; in crypto_ahash_init_tfm()
473 if (alg->setkey) { in crypto_ahash_init_tfm()
478 if (alg->exit_tfm) in crypto_ahash_init_tfm()
[all …]
A Dctr.c130 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()
155 inst->alg.chunksize = alg->cra_blocksize; in crypto_ctr_create()
261 struct skcipher_alg *alg; in crypto_rfc3686_create() local
301 inst->alg.base.cra_priority = alg->base.cra_priority; in crypto_rfc3686_create()
303 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; 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()
[all …]
A Dkpp.c52 struct kpp_alg *alg = crypto_kpp_alg(kpp); in crypto_kpp_exit_tfm() local
54 alg->exit(kpp); in crypto_kpp_exit_tfm()
60 struct kpp_alg *alg = crypto_kpp_alg(kpp); in crypto_kpp_init_tfm() local
62 if (alg->exit) in crypto_kpp_init_tfm()
65 if (alg->init) in crypto_kpp_init_tfm()
66 return alg->init(kpp); in crypto_kpp_init_tfm()
92 struct crypto_alg *base = &alg->base; in kpp_prepare_alg()
99 int crypto_register_kpp(struct kpp_alg *alg) in crypto_register_kpp() argument
101 struct crypto_alg *base = &alg->base; in crypto_register_kpp()
103 kpp_prepare_alg(alg); in crypto_register_kpp()
[all …]
A Dshash.c421 alg->exit_tfm(hash); in crypto_shash_exit_tfm()
434 if (alg->exit_tfm) in crypto_shash_init_tfm()
437 if (!alg->init_tfm) in crypto_shash_init_tfm()
446 if (alg->exit_tfm) in crypto_shash_init_tfm()
447 alg->exit_tfm(hash); in crypto_shash_init_tfm()
533 if ((alg->export && !alg->import) || (alg->import && !alg->export)) in shash_prepare_alg()
540 if (!alg->finup) in shash_prepare_alg()
542 if (!alg->digest) in shash_prepare_alg()
544 if (!alg->export) { in shash_prepare_alg()
547 alg->statesize = alg->descsize; in shash_prepare_alg()
[all …]
A Dacompress.c57 alg->exit(acomp); in crypto_acomp_exit_tfm()
68 acomp->compress = alg->compress; in crypto_acomp_init_tfm()
69 acomp->decompress = alg->decompress; in crypto_acomp_init_tfm()
70 acomp->dst_free = alg->dst_free; in crypto_acomp_init_tfm()
71 acomp->reqsize = alg->reqsize; in crypto_acomp_init_tfm()
73 if (alg->exit) in crypto_acomp_init_tfm()
76 if (alg->init) in crypto_acomp_init_tfm()
77 return alg->init(acomp); in crypto_acomp_init_tfm()
84 int extsize = crypto_alg_extsize(alg); in crypto_acomp_extsize()
152 struct crypto_alg *base = &alg->base; in crypto_register_acomp()
[all …]
A Dgeniv.c46 struct aead_alg *alg; in aead_geniv_alloc() local
67 alg = crypto_spawn_aead_alg(spawn); in aead_geniv_alloc()
69 ivsize = crypto_aead_alg_ivsize(alg); in aead_geniv_alloc()
70 maxauthsize = crypto_aead_alg_maxauthsize(alg); in aead_geniv_alloc()
86 inst->alg.base.cra_priority = alg->base.cra_priority; in aead_geniv_alloc()
87 inst->alg.base.cra_blocksize = alg->base.cra_blocksize; in aead_geniv_alloc()
88 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; in aead_geniv_alloc()
91 inst->alg.setkey = aead_geniv_setkey; in aead_geniv_alloc()
92 inst->alg.setauthsize = aead_geniv_setauthsize; in aead_geniv_alloc()
94 inst->alg.ivsize = ivsize; in aead_geniv_alloc()
[all …]
A Dhmac.c169 struct crypto_alg *alg; in hmac_create() local
190 alg = &salg->base; in hmac_create()
200 ss < alg->cra_blocksize) in hmac_create()
207 inst->alg.base.cra_priority = alg->cra_priority; in hmac_create()
208 inst->alg.base.cra_blocksize = alg->cra_blocksize; in hmac_create()
209 inst->alg.base.cra_alignmask = alg->cra_alignmask; in hmac_create()
212 inst->alg.digestsize = ds; in hmac_create()
213 inst->alg.statesize = ss; in hmac_create()
218 inst->alg.init = hmac_init; in hmac_create()
220 inst->alg.final = hmac_final; in hmac_create()
[all …]
A Dcryptd.c218 memcpy(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); in cryptd_init_instance()
220 inst->alg.cra_priority = alg->cra_priority + 50; in cryptd_init_instance()
221 inst->alg.cra_blocksize = alg->cra_blocksize; in cryptd_init_instance()
222 inst->alg.cra_alignmask = alg->cra_alignmask; in cryptd_init_instance()
401 inst->alg.ivsize = crypto_skcipher_alg_ivsize(alg); in cryptd_create_skcipher()
402 inst->alg.chunksize = crypto_skcipher_alg_chunksize(alg); in cryptd_create_skcipher()
403 inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg); in cryptd_create_skcipher()
668 inst->alg.halg.digestsize = alg->digestsize; in cryptd_create_hash()
669 inst->alg.halg.statesize = alg->statesize; in cryptd_create_hash()
856 inst->alg.ivsize = crypto_aead_alg_ivsize(alg); in cryptd_create_aead()
[all …]
A Dpcrypt.c217 struct crypto_alg *alg) in pcrypt_init_instance() argument
223 memcpy(inst->alg.cra_name, alg->cra_name, CRYPTO_MAX_ALG_NAME); in pcrypt_init_instance()
225 inst->alg.cra_priority = alg->cra_priority + 100; in pcrypt_init_instance()
226 inst->alg.cra_blocksize = alg->cra_blocksize; in pcrypt_init_instance()
227 inst->alg.cra_alignmask = alg->cra_alignmask; in pcrypt_init_instance()
237 struct aead_alg *alg; in pcrypt_create_aead() local
268 inst->alg.ivsize = crypto_aead_alg_ivsize(alg); in pcrypt_create_aead()
269 inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg); in pcrypt_create_aead()
273 inst->alg.init = pcrypt_aead_init_tfm; in pcrypt_create_aead()
274 inst->alg.exit = pcrypt_aead_exit_tfm; in pcrypt_create_aead()
[all …]
A Dtestmgr.c143 const char *alg; member
3789 alg); in do_test_kpp()
3858 alg); in do_test_kpp()
4659 .alg = "dh",
5146 .alg = "lz4",
5166 .alg = "lzo",
5186 .alg = "md4",
5192 .alg = "md5",
5331 .alg = "rsa",
5401 .alg = "sm2",
[all …]
A Dxcbc.c193 struct crypto_alg *alg; in xcbc_create() local
211 alg = crypto_spawn_cipher_alg(spawn); in xcbc_create()
214 if (alg->cra_blocksize != XCBC_BLOCKSIZE) in xcbc_create()
221 alignmask = alg->cra_alignmask | 3; in xcbc_create()
223 inst->alg.base.cra_priority = alg->cra_priority; in xcbc_create()
224 inst->alg.base.cra_blocksize = alg->cra_blocksize; in xcbc_create()
226 inst->alg.digestsize = alg->cra_blocksize; in xcbc_create()
231 alg->cra_blocksize * 2; in xcbc_create()
235 alg->cra_blocksize * 2; in xcbc_create()
236 inst->alg.base.cra_init = xcbc_init_tfm; in xcbc_create()
[all …]
A Dccm.c510 inst->alg.ivsize = 16; in crypto_ccm_create_common()
512 inst->alg.maxauthsize = 16; in crypto_ccm_create_common()
712 struct aead_alg *alg; in crypto_rfc4309_create() local
750 inst->alg.base.cra_priority = alg->base.cra_priority; in crypto_rfc4309_create()
752 inst->alg.base.cra_alignmask = alg->base.cra_alignmask; in crypto_rfc4309_create()
754 inst->alg.ivsize = 8; in crypto_rfc4309_create()
755 inst->alg.chunksize = crypto_aead_alg_chunksize(alg); in crypto_rfc4309_create()
867 struct crypto_alg *alg; in cbcmac_create() local
890 inst->alg.base.cra_priority = alg->cra_priority; in cbcmac_create()
893 inst->alg.digestsize = alg->cra_blocksize; in cbcmac_create()
[all …]
A Drng.c33 struct crypto_alg *alg = tfm->base.__crt_alg; in crypto_rng_reset() local
48 crypto_stats_get(alg); in crypto_rng_reset()
50 crypto_stats_rng_seed(alg, err); in crypto_rng_reset()
62 static unsigned int seedsize(struct crypto_alg *alg) in seedsize() argument
78 rrng.seedsize = seedsize(alg); in crypto_rng_report()
94 seq_printf(m, "seedsize : %u\n", seedsize(alg)); in crypto_rng_show()
177 int crypto_register_rng(struct rng_alg *alg) in crypto_register_rng() argument
179 struct crypto_alg *base = &alg->base; in crypto_register_rng()
181 if (alg->seedsize > PAGE_SIZE / 8) in crypto_register_rng()
192 void crypto_unregister_rng(struct rng_alg *alg) in crypto_unregister_rng() argument
[all …]
/linux/fs/verity/
A Dhash_algs.c44 struct fsverity_hash_alg *alg; in fsverity_get_hash_alg() local
53 alg = &fsverity_hash_algs[num]; in fsverity_get_hash_alg()
57 return alg; in fsverity_get_hash_alg()
61 if (alg->tfm != NULL) in fsverity_get_hash_alg()
73 alg->name); in fsverity_get_hash_alg()
74 alg = ERR_PTR(-ENOPKG); in fsverity_get_hash_alg()
79 alg->name, PTR_ERR(tfm)); in fsverity_get_hash_alg()
80 alg = ERR_CAST(tfm); in fsverity_get_hash_alg()
105 alg = ERR_PTR(err); in fsverity_get_hash_alg()
108 return alg; in fsverity_get_hash_alg()
[all …]
/linux/include/linux/
A Dcrypto.h493 void (*cra_destroy)(struct crypto_alg *alg);
512 void crypto_stats_init(struct crypto_alg *alg);
513 void crypto_stats_get(struct crypto_alg *alg);
520 void crypto_stats_akcipher_sign(int ret, struct crypto_alg *alg);
521 void crypto_stats_akcipher_verify(int ret, struct crypto_alg *alg);
524 void crypto_stats_kpp_set_secret(struct crypto_alg *alg, int ret);
527 void crypto_stats_rng_seed(struct crypto_alg *alg, int ret);
532 static inline void crypto_stats_init(struct crypto_alg *alg) in crypto_stats_init() argument
534 static inline void crypto_stats_get(struct crypto_alg *alg) in crypto_stats_get() argument
613 int crypto_register_alg(struct crypto_alg *alg);
[all …]
/linux/drivers/crypto/bcm/
A Dcipher.c325 cipher_parms.alg = ctx->cipher.alg; in handle_skcipher_req()
704 hash_parms.alg = ctx->auth.alg; in handle_ahash_req()
1301 cipher_parms.alg = ctx->cipher.alg; in handle_aead_req()
1309 hash_parms.alg = ctx->auth.alg; in handle_aead_req()
1869 cipher_parms.alg = ctx->cipher.alg; in skcipher_setkey()
2785 switch (ctx->alg->cipher_info.alg) { in aead_authenc_setkey()
3064 .alg.aead = {
3087 .alg.aead = {
3110 .alg.aead = {
3133 .alg.aead = {
[all …]

Completed in 68 milliseconds

12345678910>>...12