/kernel/linux/linux-6.6/drivers/crypto/ccp/ |
H A D | ccp-crypto-rsa.c | 249 struct akcipher_alg *alg; in ccp_register_rsa_alg() local 258 alg = &ccp_alg->alg; in ccp_register_rsa_alg() 259 *alg = *def->alg_defaults; in ccp_register_rsa_alg() 260 snprintf(alg->base.cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name); in ccp_register_rsa_alg() 261 snprintf(alg->base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s", in ccp_register_rsa_alg() 263 ret = crypto_register_akcipher(alg); in ccp_register_rsa_alg() 266 alg->base.cra_name, ret); in ccp_register_rsa_alg()
|
/kernel/linux/linux-6.6/crypto/ |
H A D | scompress.c | 41 struct sk_buff *skb, struct crypto_alg *alg) in crypto_scomp_report() 53 static void crypto_scomp_show(struct seq_file *m, struct crypto_alg *alg) 56 static void crypto_scomp_show(struct seq_file *m, struct crypto_alg *alg) in crypto_scomp_show() argument 261 int crypto_register_scomp(struct scomp_alg *alg) in crypto_register_scomp() argument 263 struct crypto_alg *base = &alg->calg.base; in crypto_register_scomp() 265 comp_prepare_alg(&alg->calg); in crypto_register_scomp() 274 void crypto_unregister_scomp(struct scomp_alg *alg) in crypto_unregister_scomp() argument 276 crypto_unregister_alg(&alg->base); in crypto_unregister_scomp() 40 crypto_scomp_report( struct sk_buff *skb, struct crypto_alg *alg) crypto_scomp_report() argument
|
H A D | adiantum.c | 551 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in adiantum_create() 555 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in adiantum_create() 562 inst->alg.base.cra_blocksize = BLOCKCIPHER_BLOCK_SIZE; in adiantum_create() 563 inst->alg.base.cra_ctxsize = sizeof(struct adiantum_tfm_ctx); in adiantum_create() 564 inst->alg.base.cra_alignmask = streamcipher_alg->base.cra_alignmask | in adiantum_create() 572 inst->alg.base.cra_priority = (4 * streamcipher_alg->base.cra_priority + in adiantum_create() 576 inst->alg.setkey = adiantum_setkey; in adiantum_create() 577 inst->alg.encrypt = adiantum_encrypt; in adiantum_create() 578 inst->alg.decrypt = adiantum_decrypt; in adiantum_create() 579 inst->alg in adiantum_create() [all...] |
H A D | lzo-rle.c | 110 static struct crypto_alg alg = { variable 139 ret = crypto_register_alg(&alg); in lzorle_mod_init() 145 crypto_unregister_alg(&alg); in lzorle_mod_init() 154 crypto_unregister_alg(&alg); in lzorle_mod_fini()
|
H A D | lzo.c | 110 static struct crypto_alg alg = { variable 139 ret = crypto_register_alg(&alg); in lzo_mod_init() 145 crypto_unregister_alg(&alg); in lzo_mod_init() 154 crypto_unregister_alg(&alg); in lzo_mod_fini()
|
/kernel/linux/linux-5.10/tools/testing/selftests/net/ |
H A D | ipsec.c | 843 struct xfrm_algo alg; in xfrm_state_pack_algo() member 848 } alg = {}; in xfrm_state_pack_algo() local 864 strncpy(alg.u.alg.alg_name, desc->a_algo, ALGO_LEN - 1); in xfrm_state_pack_algo() 865 if (xfrm_fill_key(desc->a_algo, alg.u.alg.alg_key, in xfrm_state_pack_algo() 866 sizeof(alg.buf), &alg.u.alg.alg_key_len)) in xfrm_state_pack_algo() 875 strncpy(alg in xfrm_state_pack_algo() [all...] |
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_hash/ |
H A D | hash.cpp | 32 static HASH_ALGORITHM_TYPE GetHashAlgorithm(const string &alg) in GetHashAlgorithm() argument 34 return (algorithmMaps.find(alg) != algorithmMaps.end()) ? algorithmMaps.at(alg) : HASH_ALGORITHM_TYPE_UNSUPPORTED; in GetHashAlgorithm() 47 auto [resGetSecondArg, alg, ignore] = NVal(env, funcArg[NARG_POS::SECOND]).ToUTF8String(); in GetHashArgs() 54 HASH_ALGORITHM_TYPE algType = GetHashAlgorithm(alg.get()); in GetHashArgs()
|
/base/security/huks/frameworks/huks_standard/main/common/include/ |
H A D | hks_crypto_adapter.h | 50 int32_t HksSetKeyToMaterial(uint32_t alg, bool isPubKey, const struct HksBlob *key, struct HksBlob *keyMaterial);
52 int32_t HksGetKeyFromMaterial(uint32_t alg, bool isPubKey, const struct HksBlob *keyMaterial, struct HksBlob *key);
54 int32_t HksFormatKeyFromMaterial(uint32_t alg, const struct HksBlob *keyMaterial, struct HksParamSet *paramSetOut);
|
/kernel/linux/linux-5.10/arch/x86/crypto/ |
H A D | twofish_glue.c | 64 static struct crypto_alg alg = { variable 86 return crypto_register_alg(&alg); in init() 91 crypto_unregister_alg(&alg); in fini()
|
H A D | crc32c-intel_glue.c | 196 static struct shash_alg alg = { variable 229 alg.update = crc32c_pcl_intel_update; in crc32c_intel_mod_init() 230 alg.finup = crc32c_pcl_intel_finup; in crc32c_intel_mod_init() 231 alg.digest = crc32c_pcl_intel_digest; in crc32c_intel_mod_init() 234 return crypto_register_shash(&alg); in crc32c_intel_mod_init() 239 crypto_unregister_shash(&alg); in crc32c_intel_mod_fini()
|
/kernel/linux/linux-6.6/arch/arm/crypto/ |
H A D | sha1_glue.c | 51 static struct shash_alg alg = { variable 70 return crypto_register_shash(&alg); in sha1_mod_init() 76 crypto_unregister_shash(&alg); in sha1_mod_fini()
|
/kernel/linux/linux-6.6/fs/verity/ |
H A D | measure.c | 65 * @alg: (out) the digest's algorithm, as a FS_VERITY_HASH_ALG_* value 73 * @alg or @halg. (The caller can choose which one of @alg or @halg to use.) 85 u8 *alg, enum hash_algo *halg) in fsverity_get_digest() 96 if (alg) in fsverity_get_digest() 97 *alg = hash_alg - fsverity_hash_algs; in fsverity_get_digest() 83 fsverity_get_digest(struct inode *inode, u8 raw_digest[FS_VERITY_MAX_DIGEST_SIZE], u8 *alg, enum hash_algo *halg) fsverity_get_digest() argument
|
/kernel/linux/linux-6.6/arch/x86/crypto/ |
H A D | twofish_glue.c | 64 static struct crypto_alg alg = { variable 86 return crypto_register_alg(&alg); in twofish_glue_init() 91 crypto_unregister_alg(&alg); in twofish_glue_fini()
|
H A D | crc32c-intel_glue.c | 196 static struct shash_alg alg = { variable 229 alg.update = crc32c_pcl_intel_update; in crc32c_intel_mod_init() 230 alg.finup = crc32c_pcl_intel_finup; in crc32c_intel_mod_init() 231 alg.digest = crc32c_pcl_intel_digest; in crc32c_intel_mod_init() 234 return crypto_register_shash(&alg); in crc32c_intel_mod_init() 239 crypto_unregister_shash(&alg); in crc32c_intel_mod_fini()
|
/kernel/linux/linux-5.10/crypto/ |
H A D | adiantum.c | 551 if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, in adiantum_create() 555 if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, in adiantum_create() 562 inst->alg.base.cra_blocksize = BLOCKCIPHER_BLOCK_SIZE; in adiantum_create() 563 inst->alg.base.cra_ctxsize = sizeof(struct adiantum_tfm_ctx); in adiantum_create() 564 inst->alg.base.cra_alignmask = streamcipher_alg->base.cra_alignmask | in adiantum_create() 572 inst->alg.base.cra_priority = (4 * streamcipher_alg->base.cra_priority + in adiantum_create() 576 inst->alg.setkey = adiantum_setkey; in adiantum_create() 577 inst->alg.encrypt = adiantum_encrypt; in adiantum_create() 578 inst->alg.decrypt = adiantum_decrypt; in adiantum_create() 579 inst->alg in adiantum_create() [all...] |
H A D | lzo-rle.c | 110 static struct crypto_alg alg = { variable 139 ret = crypto_register_alg(&alg); in lzorle_mod_init() 145 crypto_unregister_alg(&alg); in lzorle_mod_init() 154 crypto_unregister_alg(&alg); in lzorle_mod_fini()
|
H A D | lzo.c | 110 static struct crypto_alg alg = { variable 139 ret = crypto_register_alg(&alg); in lzo_mod_init() 145 crypto_unregister_alg(&alg); in lzo_mod_init() 154 crypto_unregister_alg(&alg); in lzo_mod_fini()
|
H A D | 842.c | 95 static struct crypto_alg alg = { variable 126 ret = crypto_register_alg(&alg); in crypto842_mod_init() 132 crypto_unregister_alg(&alg); in crypto842_mod_init() 142 crypto_unregister_alg(&alg); in crypto842_mod_exit()
|
/kernel/linux/linux-5.10/drivers/crypto/rockchip/ |
H A D | rk3288_crypto.c | 107 &rk_cipher_algs[i]->alg.skcipher); in rk_crypto_register() 110 &rk_cipher_algs[i]->alg.hash); in rk_crypto_register() 119 crypto_unregister_skcipher(&rk_cipher_algs[k]->alg.skcipher); in rk_crypto_register() 121 crypto_unregister_ahash(&rk_cipher_algs[i]->alg.hash); in rk_crypto_register() 132 crypto_unregister_skcipher(&rk_cipher_algs[i]->alg.skcipher); in rk_crypto_unregister() 134 crypto_unregister_ahash(&rk_cipher_algs[i]->alg.hash); in rk_crypto_unregister() 236 dev_err(dev, "err in register alg"); in rk_crypto_probe()
|
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/ |
H A D | hks_mbedtls_hash.c | 47 static int32_t HksMbedtlsHashMd5Init(void **ctx, uint32_t alg)
in HksMbedtlsHashMd5Init() argument 76 outCtx->mAlg = alg;
in HksMbedtlsHashMd5Init() 131 static int32_t HksMbedtlsHashSha1Init(void **ctx, uint32_t alg)
in HksMbedtlsHashSha1Init() argument 159 outCtx->mAlg = alg;
in HksMbedtlsHashSha1Init() 221 static int32_t HksMbedtlsHashSha256Init(void **ctx, int is224, uint32_t alg)
in HksMbedtlsHashSha256Init() argument 257 outCtx->mAlg = alg;
in HksMbedtlsHashSha256Init() 319 static int32_t HksMbedtlsHashSha512Init(void **ctx, int is384, uint32_t alg)
in HksMbedtlsHashSha512Init() argument 355 outCtx->mAlg = alg;
in HksMbedtlsHashSha512Init() 603 int32_t HksMbedtlsHash(uint32_t alg, const struct HksBlob *msg, struct HksBlob *hash)
in HksMbedtlsHash() argument 606 switch (alg) {
in HksMbedtlsHash() [all...] |
/kernel/linux/linux-6.6/include/crypto/ |
H A D | hash.h | 366 struct crypto_alg *alg) in __crypto_hash_alg_common() 368 return container_of(alg, struct hash_alg_common, base); in __crypto_hash_alg_common() 570 struct hash_alg_common *alg) in hash_get_stat() 573 return &alg->stat; in hash_get_stat() 579 static inline int crypto_hash_errstat(struct hash_alg_common *alg, int err) in crypto_hash_errstat() argument 585 atomic64_inc(&hash_get_stat(alg)->err_cnt); in crypto_hash_errstat() 604 struct hash_alg_common *alg = crypto_hash_alg_common(tfm); in crypto_ahash_update() local 607 atomic64_add(req->nbytes, &hash_get_stat(alg)->hash_tlen); in crypto_ahash_update() 609 return crypto_hash_errstat(alg, tfm->update(req)); in crypto_ahash_update() 821 static inline struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg) in __crypto_shash_alg() argument 365 __crypto_hash_alg_common( struct crypto_alg *alg) __crypto_hash_alg_common() argument 569 hash_get_stat( struct hash_alg_common *alg) hash_get_stat() argument [all...] |
/kernel/linux/linux-5.10/drivers/crypto/hisilicon/sec/ |
H A D | sec_algs.c | 121 * alg providers 128 enum sec_cipher_alg alg) in sec_alg_skcipher_init_template() 130 const struct sec_c_alg_cfg *cfg = &sec_c_alg_cfgs[alg]; in sec_alg_skcipher_init_template() 145 enum sec_cipher_alg alg) in sec_alg_skcipher_init_context() 150 ctx->cipher_alg = alg; in sec_alg_skcipher_init_context() 229 enum sec_cipher_alg alg) in sec_alg_skcipher_setkey() 248 sec_alg_skcipher_init_context(tfm, key, keylen, alg); in sec_alg_skcipher_setkey() 256 enum sec_cipher_alg alg; in sec_alg_skcipher_setkey_aes_ecb() local 260 alg = SEC_C_AES_ECB_128; in sec_alg_skcipher_setkey_aes_ecb() 263 alg in sec_alg_skcipher_setkey_aes_ecb() 126 sec_alg_skcipher_init_template(struct sec_alg_tfm_ctx *ctx, struct sec_bd_info *req, enum sec_cipher_alg alg) sec_alg_skcipher_init_template() argument 142 sec_alg_skcipher_init_context(struct crypto_skcipher *atfm, const u8 *key, unsigned int keylen, enum sec_cipher_alg alg) sec_alg_skcipher_init_context() argument 227 sec_alg_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen, enum sec_cipher_alg alg) sec_alg_skcipher_setkey() argument 278 enum sec_cipher_alg alg; sec_alg_skcipher_setkey_aes_cbc() local 300 enum sec_cipher_alg alg; sec_alg_skcipher_setkey_aes_ctr() local 322 enum sec_cipher_alg alg; sec_alg_skcipher_setkey_aes_xts() local [all...] |
/kernel/linux/linux-6.6/drivers/crypto/hisilicon/sec/ |
H A D | sec_algs.c | 121 * alg providers 128 enum sec_cipher_alg alg) in sec_alg_skcipher_init_template() 130 const struct sec_c_alg_cfg *cfg = &sec_c_alg_cfgs[alg]; in sec_alg_skcipher_init_template() 145 enum sec_cipher_alg alg) in sec_alg_skcipher_init_context() 150 ctx->cipher_alg = alg; in sec_alg_skcipher_init_context() 229 enum sec_cipher_alg alg) in sec_alg_skcipher_setkey() 248 sec_alg_skcipher_init_context(tfm, key, keylen, alg); in sec_alg_skcipher_setkey() 256 enum sec_cipher_alg alg; in sec_alg_skcipher_setkey_aes_ecb() local 260 alg = SEC_C_AES_ECB_128; in sec_alg_skcipher_setkey_aes_ecb() 263 alg in sec_alg_skcipher_setkey_aes_ecb() 126 sec_alg_skcipher_init_template(struct sec_alg_tfm_ctx *ctx, struct sec_bd_info *req, enum sec_cipher_alg alg) sec_alg_skcipher_init_template() argument 142 sec_alg_skcipher_init_context(struct crypto_skcipher *atfm, const u8 *key, unsigned int keylen, enum sec_cipher_alg alg) sec_alg_skcipher_init_context() argument 227 sec_alg_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen, enum sec_cipher_alg alg) sec_alg_skcipher_setkey() argument 278 enum sec_cipher_alg alg; sec_alg_skcipher_setkey_aes_cbc() local 300 enum sec_cipher_alg alg; sec_alg_skcipher_setkey_aes_ctr() local 322 enum sec_cipher_alg alg; sec_alg_skcipher_setkey_aes_xts() local [all...] |
/kernel/linux/linux-5.10/fs/verity/ |
H A D | fsverity_private.h | 130 struct ahash_request *fsverity_alloc_hash_request(struct fsverity_hash_alg *alg, 132 void fsverity_free_hash_request(struct fsverity_hash_alg *alg, 134 const u8 *fsverity_prepare_hash_state(struct fsverity_hash_alg *alg, 139 int fsverity_hash_buffer(struct fsverity_hash_alg *alg,
|
/kernel/linux/linux-5.10/net/ceph/crush/ |
H A D | crush.c | 10 const char *crush_bucket_alg_name(int alg) in crush_bucket_alg_name() argument 12 switch (alg) { in crush_bucket_alg_name() 32 switch (b->alg) { in crush_get_bucket_item_weight() 85 switch (b->alg) { in crush_destroy_bucket()
|