/kernel/linux/linux-5.10/crypto/ |
H A D | api.c | 33 static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg); 35 struct crypto_alg *crypto_mod_get(struct crypto_alg *alg) in crypto_mod_get() argument 37 return try_module_get(alg->cra_module) ? crypto_alg_get(alg) : NULL; in crypto_mod_get() 41 void crypto_mod_put(struct crypto_alg *alg) in crypto_mod_put() argument 43 struct module *module = alg->cra_module; in crypto_mod_put() 45 crypto_alg_put(alg); in crypto_mod_put() 52 return larval->alg.cra_driver_name[0]; in crypto_is_test_larval() 58 struct crypto_alg *q, *alg = NULL; in __crypto_alg_lookup() local 84 if (alg) in __crypto_alg_lookup() 95 crypto_larval_destroy(struct crypto_alg *alg) crypto_larval_destroy() argument 128 struct crypto_alg *alg; crypto_larval_add() local 154 crypto_larval_kill(struct crypto_alg *alg) crypto_larval_kill() argument 166 crypto_larval_wait(struct crypto_alg *alg) crypto_larval_wait() argument 196 struct crypto_alg *alg; crypto_alg_lookup() local 220 struct crypto_alg *alg; crypto_larval_lookup() local 263 struct crypto_alg *alg; crypto_alg_mod_lookup() local 311 crypto_ctxsize(struct crypto_alg *alg, u32 type, u32 mask) crypto_ctxsize() argument 336 crypto_shoot_alg(struct crypto_alg *alg) crypto_shoot_alg() argument 344 __crypto_alloc_tfm(struct crypto_alg *alg, u32 type, u32 mask) __crypto_alloc_tfm() argument 408 struct crypto_alg *alg; crypto_alloc_base() local 436 crypto_create_tfm_node(struct crypto_alg *alg, const struct crypto_type *frontend, int node) crypto_create_tfm_node() argument 525 struct crypto_alg *alg; crypto_alloc_tfm_node() local 563 struct crypto_alg *alg; crypto_destroy_tfm() local 581 struct crypto_alg *alg = crypto_alg_mod_lookup(name, type, mask); crypto_has_alg() local [all...] |
H A D | algapi.c | 32 static int crypto_check_alg(struct crypto_alg *alg) in crypto_check_alg() argument 34 crypto_check_module_sig(alg->cra_module); in crypto_check_alg() 36 if (!alg->cra_name[0] || !alg->cra_driver_name[0]) in crypto_check_alg() 39 if (alg->cra_alignmask & (alg->cra_alignmask + 1)) in crypto_check_alg() 43 if (alg->cra_alignmask > MAX_ALGAPI_ALIGNMASK) in crypto_check_alg() 46 if (alg->cra_blocksize > MAX_ALGAPI_BLOCKSIZE) in crypto_check_alg() 49 /* Lower maximums for specific alg types. */ in crypto_check_alg() 50 if (!alg in crypto_check_alg() 82 crypto_destroy_instance(struct crypto_alg *alg) crypto_destroy_instance() argument 101 crypto_more_spawns(struct crypto_alg *alg, struct list_head *stack, struct list_head *top, struct list_head *secondary_spawns) crypto_more_spawns() argument 151 crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list, struct crypto_alg *nalg) crypto_remove_spawns() argument 231 __crypto_register_alg(struct crypto_alg *alg) __crypto_register_alg() argument 299 struct crypto_alg *alg; crypto_alg_tested() local 395 struct crypto_alg *alg; crypto_remove_final() local 425 crypto_register_alg(struct crypto_alg *alg) crypto_register_alg() argument 447 crypto_remove_alg(struct crypto_alg *alg, struct list_head *list) crypto_remove_alg() argument 460 crypto_unregister_alg(struct crypto_alg *alg) crypto_unregister_alg() argument 687 struct crypto_alg *alg; crypto_grab_spawn() local 736 struct crypto_alg *alg = ERR_PTR(-EAGAIN); crypto_spawn_alg() local 762 struct crypto_alg *alg; crypto_spawn_tfm() local 787 struct crypto_alg *alg; crypto_spawn_tfm2() local 904 crypto_inst_setname(struct crypto_instance *inst, const char *name, struct crypto_alg *alg) crypto_inst_setname() argument 1062 crypto_alg_extsize(struct crypto_alg *alg) crypto_alg_extsize() argument 1073 struct crypto_alg *alg = crypto_find_alg(name, frontend, type, mask); crypto_type_has_alg() local 1085 crypto_stats_init(struct crypto_alg *alg) crypto_stats_init() argument 1091 crypto_stats_get(struct crypto_alg *alg) crypto_stats_get() argument 1097 crypto_stats_aead_encrypt(unsigned int cryptlen, struct crypto_alg *alg, int ret) crypto_stats_aead_encrypt() argument 1110 crypto_stats_aead_decrypt(unsigned int cryptlen, struct crypto_alg *alg, int ret) crypto_stats_aead_decrypt() argument 1123 crypto_stats_akcipher_encrypt(unsigned int src_len, int ret, struct crypto_alg *alg) crypto_stats_akcipher_encrypt() argument 1136 crypto_stats_akcipher_decrypt(unsigned int src_len, int ret, struct crypto_alg *alg) crypto_stats_akcipher_decrypt() argument 1149 crypto_stats_akcipher_sign(int ret, struct crypto_alg *alg) crypto_stats_akcipher_sign() argument 1159 crypto_stats_akcipher_verify(int ret, struct crypto_alg *alg) crypto_stats_akcipher_verify() argument 1169 crypto_stats_compress(unsigned int slen, int ret, struct crypto_alg *alg) crypto_stats_compress() argument 1181 crypto_stats_decompress(unsigned int slen, int ret, struct crypto_alg *alg) crypto_stats_decompress() argument 1193 crypto_stats_ahash_update(unsigned int nbytes, int ret, struct crypto_alg *alg) crypto_stats_ahash_update() argument 1204 crypto_stats_ahash_final(unsigned int nbytes, int ret, struct crypto_alg *alg) crypto_stats_ahash_final() argument 1217 crypto_stats_kpp_set_secret(struct crypto_alg *alg, int ret) crypto_stats_kpp_set_secret() argument 1227 crypto_stats_kpp_generate_public_key(struct crypto_alg *alg, int ret) crypto_stats_kpp_generate_public_key() argument 1237 crypto_stats_kpp_compute_shared_secret(struct crypto_alg *alg, int ret) crypto_stats_kpp_compute_shared_secret() argument 1247 crypto_stats_rng_seed(struct crypto_alg *alg, int ret) crypto_stats_rng_seed() argument 1257 crypto_stats_rng_generate(struct crypto_alg *alg, unsigned int dlen, int ret) crypto_stats_rng_generate() argument 1270 crypto_stats_skcipher_encrypt(unsigned int cryptlen, int ret, struct crypto_alg *alg) crypto_stats_skcipher_encrypt() argument 1283 crypto_stats_skcipher_decrypt(unsigned int cryptlen, int ret, struct crypto_alg *alg) crypto_stats_skcipher_decrypt() argument [all...] |
H A D | crypto_user_stat.c | 31 static int crypto_report_aead(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_aead() argument 39 raead.stat_encrypt_cnt = atomic64_read(&alg->stats.aead.encrypt_cnt); in crypto_report_aead() 40 raead.stat_encrypt_tlen = atomic64_read(&alg->stats.aead.encrypt_tlen); in crypto_report_aead() 41 raead.stat_decrypt_cnt = atomic64_read(&alg->stats.aead.decrypt_cnt); in crypto_report_aead() 42 raead.stat_decrypt_tlen = atomic64_read(&alg->stats.aead.decrypt_tlen); in crypto_report_aead() 43 raead.stat_err_cnt = atomic64_read(&alg->stats.aead.err_cnt); in crypto_report_aead() 48 static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_cipher() argument 56 rcipher.stat_encrypt_cnt = atomic64_read(&alg->stats.cipher.encrypt_cnt); in crypto_report_cipher() 57 rcipher.stat_encrypt_tlen = atomic64_read(&alg->stats.cipher.encrypt_tlen); in crypto_report_cipher() 58 rcipher.stat_decrypt_cnt = atomic64_read(&alg in crypto_report_cipher() 65 crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) crypto_report_comp() argument 81 crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) crypto_report_acomp() argument 97 crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) crypto_report_akcipher() argument 116 crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) crypto_report_kpp() argument 132 crypto_report_ahash(struct sk_buff *skb, struct crypto_alg *alg) crypto_report_ahash() argument 147 crypto_report_shash(struct sk_buff *skb, struct crypto_alg *alg) crypto_report_shash() argument 162 crypto_report_rng(struct sk_buff *skb, struct crypto_alg *alg) crypto_report_rng() argument 178 crypto_reportstat_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) crypto_reportstat_one() argument 265 crypto_reportstat_alg(struct crypto_alg *alg, struct crypto_dump_info *info) crypto_reportstat_alg() argument 300 struct crypto_alg *alg; crypto_reportstat() local [all...] |
H A D | internal.h | 26 struct crypto_alg alg; member 46 static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg) in crypto_cipher_ctxsize() argument 48 return alg->cra_ctxsize; in crypto_cipher_ctxsize() 51 static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg) in crypto_compress_ctxsize() argument 53 return alg->cra_ctxsize; in crypto_compress_ctxsize() 56 struct crypto_alg *crypto_mod_get(struct crypto_alg *alg); 60 void crypto_larval_kill(struct crypto_alg *alg); 63 void crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list, 66 void crypto_shoot_alg(struct crypto_alg *alg); 67 struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u3 72 crypto_create_tfm(struct crypto_alg *alg, const struct crypto_type *frontend) crypto_create_tfm() argument 99 crypto_alg_get(struct crypto_alg *alg) crypto_alg_get() argument 105 crypto_alg_put(struct crypto_alg *alg) crypto_alg_put() argument 121 crypto_is_larval(struct crypto_alg *alg) crypto_is_larval() argument 126 crypto_is_dead(struct crypto_alg *alg) crypto_is_dead() argument 131 crypto_is_moribund(struct crypto_alg *alg) crypto_is_moribund() argument [all...] |
H A D | akcipher.c | 24 static int crypto_akcipher_report(struct sk_buff *skb, struct crypto_alg *alg) in crypto_akcipher_report() argument 36 static int crypto_akcipher_report(struct sk_buff *skb, struct crypto_alg *alg) in crypto_akcipher_report() argument 42 static void crypto_akcipher_show(struct seq_file *m, struct crypto_alg *alg) 45 static void crypto_akcipher_show(struct seq_file *m, struct crypto_alg *alg) in crypto_akcipher_show() argument 53 struct akcipher_alg *alg = crypto_akcipher_alg(akcipher); in crypto_akcipher_exit_tfm() local 55 alg->exit(akcipher); in crypto_akcipher_exit_tfm() 61 struct akcipher_alg *alg = crypto_akcipher_alg(akcipher); in crypto_akcipher_init_tfm() local 63 if (alg->exit) in crypto_akcipher_init_tfm() 66 if (alg->init) in crypto_akcipher_init_tfm() 67 return alg in crypto_akcipher_init_tfm() 109 akcipher_prepare_alg(struct akcipher_alg *alg) akcipher_prepare_alg() argument 129 crypto_register_akcipher(struct akcipher_alg *alg) crypto_register_akcipher() argument 149 crypto_unregister_akcipher(struct akcipher_alg *alg) crypto_unregister_akcipher() argument [all...] |
H A D | crypto_user_base.c | 38 struct crypto_alg *q, *alg = NULL; in crypto_alg_match() local 63 alg = q; in crypto_alg_match() 69 return alg; in crypto_alg_match() 72 static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_cipher() argument 80 rcipher.blocksize = alg->cra_blocksize; in crypto_report_cipher() 81 rcipher.min_keysize = alg->cra_cipher.cia_min_keysize; in crypto_report_cipher() 82 rcipher.max_keysize = alg->cra_cipher.cia_max_keysize; in crypto_report_cipher() 88 static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_comp() argument 99 static int crypto_report_one(struct crypto_alg *alg, in crypto_report_one() argument 104 strscpy(ualg->cru_name, alg in crypto_report_one() 154 crypto_report_alg(struct crypto_alg *alg, struct crypto_dump_info *info) crypto_report_alg() argument 189 struct crypto_alg *alg; crypto_report() local 229 struct crypto_alg *alg; crypto_dump_report() local 263 struct crypto_alg *alg; crypto_update_alg() local 299 struct crypto_alg *alg; crypto_del_alg() local 339 struct crypto_alg *alg; crypto_add_alg() local 439 struct crypto_alg *alg; crypto_user_rcv_msg() local [all...] |
H A D | simd.c | 43 struct skcipher_alg alg; member 116 struct skcipher_alg *alg; in simd_skcipher_init() local 119 alg = crypto_skcipher_alg(tfm); in simd_skcipher_init() 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() 166 if (snprintf(alg->base.cra_name, CRYPTO_MAX_ALG_NAME, "%s", algname) >= in simd_skcipher_create_compat() 170 if (snprintf(alg in simd_skcipher_create_compat() 283 struct aead_alg alg; global() member 364 struct aead_alg *alg; simd_aead_init() local 393 struct aead_alg *alg; simd_aead_create_compat() local [all...] |
H A D | proc.c | 38 struct crypto_alg *alg = list_entry(p, struct crypto_alg, cra_list); in c_show() local 40 seq_printf(m, "name : %s\n", alg->cra_name); in c_show() 41 seq_printf(m, "driver : %s\n", alg->cra_driver_name); in c_show() 42 seq_printf(m, "module : %s\n", module_name(alg->cra_module)); in c_show() 43 seq_printf(m, "priority : %d\n", alg->cra_priority); in c_show() 44 seq_printf(m, "refcnt : %u\n", refcount_read(&alg->cra_refcnt)); 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 in c_show() [all...] |
/third_party/libwebsockets/lib/cose/ |
H A D | cose_sign_alg.c | 32 lws_cose_sig_alg_t *alg = lws_zalloc(sizeof(*alg), __func__); in lws_cose_sign_alg_create() local 38 if (!alg) in lws_cose_sign_alg_create() 41 alg->cose_alg = cose_alg; in lws_cose_sign_alg_create() 42 alg->cose_key = ck; in lws_cose_sign_alg_create() 51 alg->keybits = 256; in lws_cose_sign_alg_create() 56 alg->keybits = 384; in lws_cose_sign_alg_create() 61 alg->keybits = 521; in lws_cose_sign_alg_create() 70 if (lws_genhash_init(&alg->hash_ctx, gh)) in lws_cose_sign_alg_create() 73 if (lws_genecdsa_create(&alg in lws_cose_sign_alg_create() 169 lws_cose_sign_alg_hash(lws_cose_sig_alg_t *alg, const uint8_t *in, size_t in_len) lws_cose_sign_alg_hash() argument 196 lws_cose_sign_alg_complete(lws_cose_sig_alg_t *alg) lws_cose_sign_alg_complete() argument [all...] |
H A D | cose_validate_alg.c | 32 lws_cose_sig_alg_t *alg = lws_zalloc(sizeof(*alg), __func__); in lws_cose_val_alg_create() local 38 if (!alg) in lws_cose_val_alg_create() 41 alg->cose_alg = cose_alg; in lws_cose_val_alg_create() 42 alg->cose_key = ck; in lws_cose_val_alg_create() 51 alg->keybits = 256; in lws_cose_val_alg_create() 56 alg->keybits = 384; in lws_cose_val_alg_create() 61 alg->keybits = 521; in lws_cose_val_alg_create() 70 if (lws_genhash_init(&alg->hash_ctx, gh)) in lws_cose_val_alg_create() 73 if (lws_genecdsa_create(&alg in lws_cose_val_alg_create() 170 lws_cose_val_alg_hash(lws_cose_sig_alg_t *alg, const uint8_t *in, size_t in_len) lws_cose_val_alg_hash() argument 193 lws_cose_sig_alg_t *alg = *_alg; lws_cose_val_alg_destroy() local [all...] |
/kernel/linux/linux-6.6/crypto/ |
H A D | api.c | 39 static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg); 41 struct crypto_alg *crypto_mod_get(struct crypto_alg *alg) in crypto_mod_get() argument 43 return try_module_get(alg->cra_module) ? crypto_alg_get(alg) : NULL; in crypto_mod_get() 47 void crypto_mod_put(struct crypto_alg *alg) in crypto_mod_put() argument 49 struct module *module = alg->cra_module; in crypto_mod_put() 51 crypto_alg_put(alg); in crypto_mod_put() 59 struct crypto_alg *q, *alg = NULL; in __crypto_alg_lookup() local 85 if (alg) in __crypto_alg_lookup() 86 crypto_mod_put(alg); in __crypto_alg_lookup() 96 crypto_larval_destroy(struct crypto_alg *alg) crypto_larval_destroy() argument 129 struct crypto_alg *alg; crypto_larval_add() local 155 crypto_larval_kill(struct crypto_alg *alg) crypto_larval_kill() argument 202 crypto_larval_wait(struct crypto_alg *alg) crypto_larval_wait() argument 238 struct crypto_alg *alg; crypto_alg_lookup() local 274 struct crypto_alg *alg; crypto_larval_lookup() local 317 struct crypto_alg *alg; crypto_alg_mod_lookup() local 356 crypto_ctxsize(struct crypto_alg *alg, u32 type, u32 mask) crypto_ctxsize() argument 381 crypto_shoot_alg(struct crypto_alg *alg) crypto_shoot_alg() argument 389 __crypto_alloc_tfmgfp(struct crypto_alg *alg, u32 type, u32 mask, gfp_t gfp) __crypto_alloc_tfmgfp() argument 421 __crypto_alloc_tfm(struct crypto_alg *alg, u32 type, u32 mask) __crypto_alloc_tfm() argument 456 struct crypto_alg *alg; crypto_alloc_base() local 484 crypto_alloc_tfmmem(struct crypto_alg *alg, const struct crypto_type *frontend, int node, gfp_t gfp) crypto_alloc_tfmmem() argument 508 crypto_create_tfm_node(struct crypto_alg *alg, const struct crypto_type *frontend, int node) crypto_create_tfm_node() argument 546 struct crypto_alg *alg = otfm->__crt_alg; crypto_clone_tfm() local 615 struct crypto_alg *alg; crypto_alloc_tfm_node() local 653 struct crypto_alg *alg; crypto_destroy_tfm() local 673 struct crypto_alg *alg = crypto_alg_mod_lookup(name, type, mask); crypto_has_alg() local [all...] |
H A D | algapi.c | 38 static int crypto_check_alg(struct crypto_alg *alg) in crypto_check_alg() argument 40 crypto_check_module_sig(alg->cra_module); in crypto_check_alg() 42 if (!alg->cra_name[0] || !alg->cra_driver_name[0]) in crypto_check_alg() 45 if (alg->cra_alignmask & (alg->cra_alignmask + 1)) in crypto_check_alg() 49 if (alg->cra_alignmask > MAX_ALGAPI_ALIGNMASK) in crypto_check_alg() 52 if (alg->cra_blocksize > MAX_ALGAPI_BLOCKSIZE) in crypto_check_alg() 55 /* Lower maximums for specific alg types. */ in crypto_check_alg() 56 if (!alg in crypto_check_alg() 88 crypto_destroy_instance(struct crypto_alg *alg) crypto_destroy_instance() argument 107 crypto_more_spawns(struct crypto_alg *alg, struct list_head *stack, struct list_head *top, struct list_head *secondary_spawns) crypto_more_spawns() argument 157 crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list, struct crypto_alg *nalg) crypto_remove_spawns() argument 237 crypto_alg_finish_registration(struct crypto_alg *alg, bool fulfill_requests, struct list_head *algs_to_put) crypto_alg_finish_registration() argument 288 crypto_alloc_test_larval(struct crypto_alg *alg) crypto_alloc_test_larval() argument 317 __crypto_register_alg(struct crypto_alg *alg, struct list_head *algs_to_put) __crypto_register_alg() argument 376 struct crypto_alg *alg; crypto_alg_tested() local 443 struct crypto_alg *alg; crypto_remove_final() local 453 crypto_register_alg(struct crypto_alg *alg) crypto_register_alg() argument 482 crypto_remove_alg(struct crypto_alg *alg, struct list_head *list) crypto_remove_alg() argument 495 crypto_unregister_alg(struct crypto_alg *alg) crypto_unregister_alg() argument 727 struct crypto_alg *alg; crypto_grab_spawn() local 777 struct crypto_alg *alg = ERR_PTR(-EAGAIN); crypto_spawn_alg() local 803 struct crypto_alg *alg; crypto_spawn_tfm() local 828 struct crypto_alg *alg; crypto_spawn_tfm2() local 927 crypto_inst_setname(struct crypto_instance *inst, const char *name, struct crypto_alg *alg) crypto_inst_setname() argument 1035 crypto_alg_extsize(struct crypto_alg *alg) crypto_alg_extsize() argument 1046 struct crypto_alg *alg = crypto_find_alg(name, frontend, type, mask); crypto_type_has_alg() local [all...] |
H A D | internal.h | 31 struct crypto_alg alg; member 67 int alg_test(const char *driver, const char *alg, u32 type, u32 mask); 99 static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg) in crypto_cipher_ctxsize() argument 101 return alg->cra_ctxsize; in crypto_cipher_ctxsize() 104 static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg) in crypto_compress_ctxsize() argument 106 return alg->cra_ctxsize; in crypto_compress_ctxsize() 109 struct crypto_alg *crypto_mod_get(struct crypto_alg *alg); 113 void crypto_larval_kill(struct crypto_alg *alg); 117 void crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list, 120 void crypto_shoot_alg(struct crypto_alg *alg); 134 crypto_create_tfm(struct crypto_alg *alg, const struct crypto_type *frontend) crypto_create_tfm() argument 161 crypto_alg_get(struct crypto_alg *alg) crypto_alg_get() argument 167 crypto_alg_put(struct crypto_alg *alg) crypto_alg_put() argument 183 crypto_is_larval(struct crypto_alg *alg) crypto_is_larval() argument 188 crypto_is_dead(struct crypto_alg *alg) crypto_is_dead() argument 193 crypto_is_moribund(struct crypto_alg *alg) crypto_is_moribund() argument [all...] |
H A D | crypto_user_base.c | 38 struct crypto_alg *q, *alg = NULL; in crypto_alg_match() local 63 alg = q; in crypto_alg_match() 69 return alg; in crypto_alg_match() 72 static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_cipher() argument 80 rcipher.blocksize = alg->cra_blocksize; in crypto_report_cipher() 81 rcipher.min_keysize = alg->cra_cipher.cia_min_keysize; in crypto_report_cipher() 82 rcipher.max_keysize = alg->cra_cipher.cia_max_keysize; in crypto_report_cipher() 88 static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_comp() argument 99 static int crypto_report_one(struct crypto_alg *alg, in crypto_report_one() argument 104 strscpy(ualg->cru_name, alg in crypto_report_one() 154 crypto_report_alg(struct crypto_alg *alg, struct crypto_dump_info *info) crypto_report_alg() argument 189 struct crypto_alg *alg; crypto_report() local 229 struct crypto_alg *alg; crypto_dump_report() local 263 struct crypto_alg *alg; crypto_update_alg() local 299 struct crypto_alg *alg; crypto_del_alg() local 339 struct crypto_alg *alg; crypto_add_alg() local 439 struct crypto_alg *alg; crypto_user_rcv_msg() local [all...] |
H A D | aead.c | 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() 107 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_encrypt() local 111 istat = aead_get_stat(alg); in crypto_aead_encrypt() 121 ret = alg->encrypt(req); in crypto_aead_encrypt() 130 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_decrypt() local 134 istat = aead_get_stat(alg); in crypto_aead_decrypt() 146 ret = alg->decrypt(req); in crypto_aead_decrypt() 155 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_exit_tfm() local 157 alg in crypto_aead_exit_tfm() 163 struct aead_alg *alg = crypto_aead_alg(aead); crypto_aead_init_tfm() local 178 crypto_aead_report( struct sk_buff *skb, struct crypto_alg *alg) crypto_aead_report() argument 198 crypto_aead_show(struct seq_file *m, struct crypto_alg *alg) crypto_aead_show() argument 218 crypto_aead_report_stat( struct sk_buff *skb, struct crypto_alg *alg) crypto_aead_report_stat() argument 272 aead_prepare_alg(struct aead_alg *alg) aead_prepare_alg() argument 294 crypto_register_aead(struct aead_alg *alg) crypto_register_aead() argument 307 crypto_unregister_aead(struct aead_alg *alg) crypto_unregister_aead() argument [all...] |
H A D | simd.c | 43 struct skcipher_alg alg; member 116 struct skcipher_alg *alg; in simd_skcipher_init() local 119 alg = crypto_skcipher_alg(tfm); in simd_skcipher_init() 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() 166 if (snprintf(alg->base.cra_name, CRYPTO_MAX_ALG_NAME, "%s", algname) >= in simd_skcipher_create_compat() 170 if (snprintf(alg in simd_skcipher_create_compat() 283 struct aead_alg alg; global() member 364 struct aead_alg *alg; simd_aead_init() local 393 struct aead_alg *alg; simd_aead_create_compat() local [all...] |
H A D | acompress.c | 26 static inline struct acomp_alg *__crypto_acomp_alg(struct crypto_alg *alg) in __crypto_acomp_alg() argument 28 return container_of(alg, struct acomp_alg, calg.base); in __crypto_acomp_alg() 37 struct sk_buff *skb, struct crypto_alg *alg) in crypto_acomp_report() 48 static void crypto_acomp_show(struct seq_file *m, struct crypto_alg *alg) 51 static void crypto_acomp_show(struct seq_file *m, struct crypto_alg *alg) in crypto_acomp_show() argument 59 struct acomp_alg *alg = crypto_acomp_alg(acomp); in crypto_acomp_exit_tfm() local 61 alg->exit(acomp); in crypto_acomp_exit_tfm() 67 struct acomp_alg *alg = crypto_acomp_alg(acomp); in crypto_acomp_init_tfm() local 72 acomp->compress = alg->compress; in crypto_acomp_init_tfm() 73 acomp->decompress = alg in crypto_acomp_init_tfm() 36 crypto_acomp_report( struct sk_buff *skb, struct crypto_alg *alg) crypto_acomp_report() argument 86 crypto_acomp_extsize(struct crypto_alg *alg) crypto_acomp_extsize() argument 96 __crypto_acomp_report_stat(struct sk_buff *skb, struct crypto_alg *alg) __crypto_acomp_report_stat() argument 116 crypto_acomp_report_stat(struct sk_buff *skb, struct crypto_alg *alg) crypto_acomp_report_stat() argument 185 comp_prepare_alg(struct comp_alg_common *alg) comp_prepare_alg() argument 196 crypto_register_acomp(struct acomp_alg *alg) crypto_register_acomp() argument 209 crypto_unregister_acomp(struct acomp_alg *alg) crypto_unregister_acomp() argument [all...] |
H A D | crypto_user_stat.c | 27 static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_cipher() argument 38 static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_comp() argument 49 static int crypto_reportstat_one(struct crypto_alg *alg, in crypto_reportstat_one() argument 55 strscpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); in crypto_reportstat_one() 56 strscpy(ualg->cru_driver_name, alg->cra_driver_name, in crypto_reportstat_one() 58 strscpy(ualg->cru_module_name, module_name(alg->cra_module), in crypto_reportstat_one() 63 ualg->cru_flags = alg->cra_flags; in crypto_reportstat_one() 64 ualg->cru_refcnt = refcount_read(&alg->cra_refcnt); in crypto_reportstat_one() 66 if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority)) in crypto_reportstat_one() 68 if (alg in crypto_reportstat_one() 106 crypto_reportstat_alg(struct crypto_alg *alg, struct crypto_dump_info *info) crypto_reportstat_alg() argument 141 struct crypto_alg *alg; crypto_reportstat() local [all...] |
/third_party/mbedtls/include/psa/ |
H A D | crypto_sizes.h | 52 * \param alg A hash algorithm (\c PSA_ALG_XXX value such that 53 * #PSA_ALG_IS_HASH(\p alg) is true), or an HMAC algorithm 60 #define PSA_HASH_LENGTH(alg) \ 62 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_MD5 ? 16u : \ 63 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_RIPEMD160 ? 20u : \ 64 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_SHA_1 ? 20u : \ 65 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_SHA_224 ? 28u : \ 66 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_SHA_256 ? 32u : \ 67 PSA_ALG_HMAC_GET_HASH(alg) == PSA_ALG_SHA_384 ? 48u : \ 68 PSA_ALG_HMAC_GET_HASH(alg) [all...] |
H A D | crypto_values.h | 439 * This size can be calculated with #PSA_HASH_LENGTH(\c alg) where 440 * \c alg is the HMAC algorithm or the underlying hash algorithm. */ 797 #define PSA_ALG_IS_VENDOR_DEFINED(alg) \ 798 (((alg) & PSA_ALG_VENDOR_FLAG) != 0) 802 * \param alg An algorithm identifier (value of type #psa_algorithm_t). 804 * \return 1 if \p alg is a hash algorithm, 0 otherwise. 805 * This macro may return either 0 or 1 if \p alg is not a supported 808 #define PSA_ALG_IS_HASH(alg) \ 809 (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH) 813 * \param alg A [all...] |
/base/security/huks/frameworks/huks_standard/main/common/include/ |
H A D | hks_ability.h | 79 #define HKS_CRYPTO_ABILITY(type, alg) \
80 ((HKS_ABILITY_CRYPTO << HKS_ABILITY_SHIFT) | ((type) << HKS_CRYPTO_OPERATION_SHIFT) | (alg))
82 #define HKS_CRYPTO_ABILITY_GENERATE_KEY(alg) HKS_CRYPTO_ABILITY(HKS_OPERATION_GENERATE_KEY, alg)
83 #define HKS_CRYPTO_ABILITY_GET_PUBLIC_KEY(alg) HKS_CRYPTO_ABILITY(HKS_OPERATION_GET_PUBLIC_KEY, alg)
84 #define HKS_CRYPTO_ABILITY_DERIVE_KEY(alg) HKS_CRYPTO_ABILITY(HKS_OPERATION_DERIVE_KEY, alg)
85 #define HKS_CRYPTO_ABILITY_AGREE_KEY(alg) HKS_CRYPTO_ABILITY(HKS_OPERATION_AGREE_KEY, alg)
[all...] |
/kernel/linux/linux-6.6/fs/verity/ |
H A D | hash_algs.c | 42 * Return: pointer to the hash alg on success, else an ERR_PTR() 47 struct fsverity_hash_alg *alg; in fsverity_get_hash_alg() local 56 alg = &fsverity_hash_algs[num]; in fsverity_get_hash_alg() 59 if (likely(smp_load_acquire(&alg->tfm) != NULL)) in fsverity_get_hash_alg() 60 return alg; in fsverity_get_hash_alg() 64 if (alg->tfm != NULL) in fsverity_get_hash_alg() 67 tfm = crypto_alloc_shash(alg->name, 0, 0); in fsverity_get_hash_alg() 72 alg->name); in fsverity_get_hash_alg() 73 alg = ERR_PTR(-ENOPKG); in fsverity_get_hash_alg() 78 alg in fsverity_get_hash_alg() 113 fsverity_prepare_hash_state(const struct fsverity_hash_alg *alg, const u8 *salt, size_t salt_size) fsverity_prepare_hash_state() argument 211 fsverity_hash_buffer(const struct fsverity_hash_alg *alg, const void *data, size_t size, u8 *out) fsverity_hash_buffer() argument 226 const struct fsverity_hash_alg *alg = &fsverity_hash_algs[i]; fsverity_check_hash_algs() local [all...] |
/kernel/linux/linux-5.10/fs/verity/ |
H A D | hash_algs.c | 41 * Return: pointer to the hash alg on success, else an ERR_PTR() 46 struct fsverity_hash_alg *alg; in fsverity_get_hash_alg() local 55 alg = &fsverity_hash_algs[num]; in fsverity_get_hash_alg() 58 if (likely(smp_load_acquire(&alg->tfm) != NULL)) in fsverity_get_hash_alg() 59 return alg; in fsverity_get_hash_alg() 63 if (alg->tfm != NULL) in fsverity_get_hash_alg() 70 tfm = crypto_alloc_ahash(alg->name, 0, 0); in fsverity_get_hash_alg() 75 alg->name); in fsverity_get_hash_alg() 76 alg = ERR_PTR(-ENOPKG); in fsverity_get_hash_alg() 81 alg in fsverity_get_hash_alg() 125 fsverity_alloc_hash_request(struct fsverity_hash_alg *alg, gfp_t gfp_flags) fsverity_alloc_hash_request() argument 140 fsverity_free_hash_request(struct fsverity_hash_alg *alg, struct ahash_request *req) fsverity_free_hash_request() argument 158 fsverity_prepare_hash_state(struct fsverity_hash_alg *alg, const u8 *salt, size_t salt_size) fsverity_prepare_hash_state() argument 283 fsverity_hash_buffer(struct fsverity_hash_alg *alg, const void *data, size_t size, u8 *out) fsverity_hash_buffer() argument 315 const struct fsverity_hash_alg *alg = &fsverity_hash_algs[i]; fsverity_check_hash_algs() local [all...] |
/third_party/mbedtls/library/ |
H A D | psa_crypto_cipher.c | 30 psa_algorithm_t alg, in mbedtls_cipher_validate_values() 51 MBEDTLS_ASSUME(alg != PSA_ALG_AEAD_WITH_SHORTENED_TAG(PSA_ALG_CCM, 0)); in mbedtls_cipher_validate_values() 54 MBEDTLS_ASSUME(alg != PSA_ALG_AEAD_WITH_SHORTENED_TAG(PSA_ALG_GCM, 0)); in mbedtls_cipher_validate_values() 57 MBEDTLS_ASSUME(alg != PSA_ALG_STREAM_CIPHER); in mbedtls_cipher_validate_values() 60 MBEDTLS_ASSUME(alg != PSA_ALG_AEAD_WITH_SHORTENED_TAG(PSA_ALG_CHACHA20_POLY1305, 0)); in mbedtls_cipher_validate_values() 63 MBEDTLS_ASSUME(alg != PSA_ALG_CCM_STAR_NO_TAG); in mbedtls_cipher_validate_values() 66 MBEDTLS_ASSUME(alg != PSA_ALG_CTR); in mbedtls_cipher_validate_values() 69 MBEDTLS_ASSUME(alg != PSA_ALG_CFB); in mbedtls_cipher_validate_values() 72 MBEDTLS_ASSUME(alg != PSA_ALG_OFB); in mbedtls_cipher_validate_values() 75 MBEDTLS_ASSUME(alg ! in mbedtls_cipher_validate_values() 29 mbedtls_cipher_validate_values( psa_algorithm_t alg, psa_key_type_t key_type) mbedtls_cipher_validate_values() argument 126 mbedtls_cipher_values_from_psa( psa_algorithm_t alg, psa_key_type_t key_type, size_t *key_bits, mbedtls_cipher_mode_t *mode, mbedtls_cipher_id_t *cipher_id) mbedtls_cipher_values_from_psa() argument 258 mbedtls_cipher_info_from_psa( psa_algorithm_t alg, psa_key_type_t key_type, size_t key_bits, mbedtls_cipher_id_t *cipher_id) mbedtls_cipher_info_from_psa() argument 282 psa_cipher_setup( mbedtls_psa_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, mbedtls_operation_t cipher_operation) psa_cipher_setup() argument 360 mbedtls_psa_cipher_encrypt_setup( mbedtls_psa_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) mbedtls_psa_cipher_encrypt_setup() argument 371 mbedtls_psa_cipher_decrypt_setup( mbedtls_psa_cipher_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) mbedtls_psa_cipher_decrypt_setup() argument 604 mbedtls_psa_cipher_encrypt( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *iv, size_t iv_length, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length) mbedtls_psa_cipher_encrypt() argument 662 mbedtls_psa_cipher_decrypt( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length) mbedtls_psa_cipher_decrypt() argument [all...] |
/third_party/openssl/crypto/property/ |
H A D | property.c | 108 ALGORITHM *alg); 226 static void impl_cache_flush_alg(ossl_uintmax_t idx, ALGORITHM *alg) in impl_cache_flush_alg() argument 228 lh_QUERY_doall(alg->cache, &impl_cache_free); in impl_cache_flush_alg() 229 lh_QUERY_flush(alg->cache); in impl_cache_flush_alg() 294 static int ossl_method_store_insert(OSSL_METHOD_STORE *store, ALGORITHM *alg) in ossl_method_store_insert() argument 296 return ossl_sa_ALGORITHM_set(store->algs, alg->nid, alg); in ossl_method_store_insert() 304 ALGORITHM *alg = NULL; in ossl_method_store_add() local 347 alg = ossl_method_store_retrieve(store, nid); in ossl_method_store_add() 348 if (alg in ossl_method_store_add() 384 ALGORITHM *alg = NULL; ossl_method_store_remove() local 424 alg_cleanup_by_provider(ossl_uintmax_t idx, ALGORITHM *alg, void *arg) alg_cleanup_by_provider() argument 467 alg_do_one(ALGORITHM *alg, IMPLEMENTATION *impl, void (*fn)(int id, void *method, void *fnarg), void *fnarg) alg_do_one() argument 474 alg_copy(ossl_uintmax_t idx, ALGORITHM *alg, void *arg) alg_copy() argument 488 ALGORITHM *alg; ossl_method_store_do_all() local 520 ALGORITHM *alg; ossl_method_store_fetch() local 598 ossl_method_cache_flush_alg(OSSL_METHOD_STORE *store, ALGORITHM *alg) ossl_method_cache_flush_alg() argument 607 ALGORITHM *alg = ossl_method_store_retrieve(store, nid); ossl_method_cache_flush() local 664 impl_cache_flush_one_alg(ossl_uintmax_t idx, ALGORITHM *alg, void *v) impl_cache_flush_one_alg() argument 697 ALGORITHM *alg; ossl_method_store_cache_get() local 730 ALGORITHM *alg; ossl_method_store_cache_set() local [all...] |