Home
last modified time | relevance | path

Searched refs:algo (Results 1 – 25 of 54) sorted by relevance

123

/rk3399_rockchip-uboot/common/
H A Dhash.c34 static int hash_init_sha1(struct hash_algo *algo, void **ctxp) in hash_init_sha1() argument
42 static int hash_update_sha1(struct hash_algo *algo, void *ctx, const void *buf, in hash_update_sha1() argument
49 static int hash_finish_sha1(struct hash_algo *algo, void *ctx, void *dest_buf, in hash_finish_sha1() argument
52 if (size < algo->digest_size) in hash_finish_sha1()
62 static int hash_init_sha256(struct hash_algo *algo, void **ctxp) in hash_init_sha256() argument
70 static int hash_update_sha256(struct hash_algo *algo, void *ctx, in hash_update_sha256() argument
77 static int hash_finish_sha256(struct hash_algo *algo, void *ctx, void in hash_finish_sha256() argument
80 if (size < algo->digest_size) in hash_finish_sha256()
89 static int hash_init_crc32(struct hash_algo *algo, void **ctxp) in hash_init_crc32() argument
97 static int hash_update_crc32(struct hash_algo *algo, void *ctx, in hash_update_crc32() argument
[all …]
H A Dimage-fit.c277 char *algo; in fit_image_print_data() local
284 if (fit_image_hash_get_algo(fit, noffset, &algo)) { in fit_image_print_data()
288 printf("%s", algo); in fit_image_print_data()
1068 int fit_image_hash_get_algo(const void *fit, int noffset, char **algo) in fit_image_hash_get_algo() argument
1072 *algo = (char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len); in fit_image_hash_get_algo()
1073 if (*algo == NULL) { in fit_image_hash_get_algo()
1154 int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo) in fit_image_cipher_get_algo() argument
1158 *algo = (char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len); in fit_image_cipher_get_algo()
1159 if (!*algo) { in fit_image_cipher_get_algo()
1231 const char *algo, uint8_t *value, in fit_calculate_hash() argument
[all …]
/rk3399_rockchip-uboot/lib/rsa/
H A Drsa-checksum.c24 struct hash_algo *algo; in rsa_hash_calculate() local
30 ret = hash_progressive_lookup_algo(name, &algo); in rsa_hash_calculate()
34 ret = algo->hash_init(algo, &ctx); in rsa_hash_calculate()
39 ret = algo->hash_update(algo, ctx, region[i].data, in rsa_hash_calculate()
45 ret = algo->hash_update(algo, ctx, region[i].data, region[i].size, 1); in rsa_hash_calculate()
48 ret = algo->hash_finish(algo, ctx, checksum, algo->digest_size); in rsa_hash_calculate()
69 ctx.algo = CRYPTO_SHA1; in hw_rsa_hash_calculate()
71 ctx.algo = CRYPTO_SHA256; in hw_rsa_hash_calculate()
75 dev = crypto_get_device(ctx.algo); in hw_rsa_hash_calculate()
/rk3399_rockchip-uboot/drivers/crypto/fsl/
H A Dfsl_hash.c45 static enum caam_hash_algos get_hash_type(struct hash_algo *algo) in get_hash_type() argument
47 if (!strcmp(algo->name, driver_hash[SHA1].name)) in get_hash_type()
162 unsigned char *pout, enum caam_hash_algos algo) in caam_hash() argument
174 driver_hash[algo].alg_type, in caam_hash()
175 driver_hash[algo].digestsize, in caam_hash()
198 int hw_sha_init(struct hash_algo *algo, void **ctxp) in hw_sha_init() argument
200 return caam_hash_init(ctxp, get_hash_type(algo)); in hw_sha_init()
203 int hw_sha_update(struct hash_algo *algo, void *ctx, const void *buf, in hw_sha_update() argument
206 return caam_hash_update(ctx, buf, size, is_last, get_hash_type(algo)); in hw_sha_update()
209 int hw_sha_finish(struct hash_algo *algo, void *ctx, void *dest_buf, in hw_sha_finish() argument
[all …]
/rk3399_rockchip-uboot/cmd/
H A Dcrypto_sum.c56 csha_ctx.algo = CRYPTO_MD5; in do_crypto_csum()
60 dump_hash("md5", hash, crypto_algo_nbits(csha_ctx.algo), in do_crypto_csum()
63 csha_ctx.algo = CRYPTO_SHA1; in do_crypto_csum()
67 dump_hash("sha1", hash, crypto_algo_nbits(csha_ctx.algo), in do_crypto_csum()
70 csha_ctx.algo = CRYPTO_SHA256; in do_crypto_csum()
74 dump_hash("sha256", hash, crypto_algo_nbits(csha_ctx.algo), in do_crypto_csum()
77 csha_ctx.algo = CRYPTO_SHA512; in do_crypto_csum()
81 dump_hash("sha512", hash, crypto_algo_nbits(csha_ctx.algo), in do_crypto_csum()
H A Dcrypto.c24 u32 algo; member
36 u32 algo; member
56 u32 algo; member
73 u32 algo; member
92 .algo = CRYPTO_##algo_type, \
102 .algo = CRYPTO_HMAC_##algo_type, \
114 .algo = CRYPTO_##algo_type,\
127 #define CIPHER_TEST(algo, mode, key, iv, plain, cipher) \ argument
128 CIPHER_XTS_TEST(algo, mode, key, NULL, iv, plain, cipher)
134 .algo = CRYPTO_##algo_type,\
[all …]
/rk3399_rockchip-uboot/doc/uImage.FIT/
H A Dmulti.its22 algo = "md5";
25 algo = "sha1";
39 algo = "sha1";
53 algo = "md5";
67 algo = "sha1";
81 algo = "crc32";
92 algo = "crc32";
104 algo = "sha1";
H A Dkernel_fdt.its22 algo = "crc32";
25 algo = "sha1";
35 algo = "crc32";
38 algo = "sha1";
H A Dupdate3.its19 algo = "sha1";
29 algo = "sha1";
40 algo = "sha1";
H A Dsign-configs.its18 algo = "sha1";
29 algo = "sha1";
39 algo = "sha1,rsa2048";
H A Dmulti-with-loadables.its23 algo = "md5";
35 algo = "md5";
47 algo = "md5";
61 algo = "md5";
H A Dkernel.its22 algo = "crc32";
25 algo = "sha1";
60 algo = "sha1";
74 algo = "sha1";
H A Dmulti-with-fpga.its21 algo = "md5";
33 algo = "md5";
47 algo = "md5";
H A Dhowto.txt98 Hash algo: crc32
100 Hash algo: sha1
143 Hash algo: crc32
145 Hash algo: sha1
165 Hash algo: crc32
167 Hash algo: sha1
208 Hash algo: crc32
210 Hash algo: sha1
218 Hash algo: crc32
220 Hash algo: sha1
[all …]
/rk3399_rockchip-uboot/board/freescale/common/
H A Dfsl_validate.c488 struct hash_algo *algo; in calc_img_key_hash() local
495 ret = hash_progressive_lookup_algo(algo_name, &algo); in calc_img_key_hash()
499 ret = algo->hash_init(algo, &ctx); in calc_img_key_hash()
506 ret = algo->hash_update(algo, ctx, in calc_img_key_hash()
513 ret = algo->hash_update(algo, ctx, in calc_img_key_hash()
519 ret = algo->hash_finish(algo, ctx, hash_val, algo->digest_size); in calc_img_key_hash()
536 struct hash_algo *algo; in calc_esbchdr_esbc_hash() local
543 ret = hash_progressive_lookup_algo(algo_name, &algo); in calc_esbchdr_esbc_hash()
547 ret = algo->hash_init(algo, &ctx); in calc_esbchdr_esbc_hash()
553 ret = algo->hash_update(algo, ctx, in calc_esbchdr_esbc_hash()
[all …]
/rk3399_rockchip-uboot/arch/arm/mach-rockchip/
H A Dmake_fit_boot.sh52 algo = "sha256";
65 algo = "sha256";
77 algo = "sha256";
87 algo = "sha256";
102 algo = "sha256,rsa2048";
/rk3399_rockchip-uboot/include/
H A Dhw_sha.h45 int hw_sha_init(struct hash_algo *algo, void **ctxp);
59 int hw_sha_update(struct hash_algo *algo, void *ctx, const void *buf,
73 int hw_sha_finish(struct hash_algo *algo, void *ctx, void *dest_buf,
H A Dhash.h44 int (*hash_init)(struct hash_algo *algo, void **ctxp);
57 int (*hash_update)(struct hash_algo *algo, void *ctx, const void *buf,
71 int (*hash_finish)(struct hash_algo *algo, void *ctx, void *dest_buf,
H A Dcrypto.h62 u32 algo; /* Algorithm: CRYPTO_MD5/CRYPTO_SHA1/CRYPTO_RSA2048... */ member
68 u32 algo; /* Algorithm: CRYPTO_MD5/CRYPTO_SHA1/CRYPTO_RSA2048... */ member
75 u32 algo; /* Algorithm: CRYPTO_SM2/CRYPTO_ECC_192R1/CRYPTO_ECC_224R1... */ member
82 u32 algo; member
92 u32 algo; member
151 u32 crypto_algo_nbits(u32 algo);
/rk3399_rockchip-uboot/test/py/tests/vboot/
H A Dsign-configs-sha256.its18 algo = "sha256";
29 algo = "sha256";
39 algo = "sha256,rsa2048";
H A Dsign-configs-sha1.its18 algo = "sha1";
29 algo = "sha1";
39 algo = "sha1,rsa2048";
/rk3399_rockchip-uboot/drivers/cpu/
H A Damp.its26 algo = "sha256";
42 algo = "sha256";
58 algo = "sha256";
72 algo = "sha256";
85 algo = "sha256,rsa2048";
/rk3399_rockchip-uboot/drivers/crypto/rockchip/
H A Dcrypto_v1.c102 if (ctx->algo == CRYPTO_SHA256) { in rockchip_crypto_sha_init()
110 } else if (ctx->algo == CRYPTO_SHA1) { in rockchip_crypto_sha_init()
118 } else if (ctx->algo == CRYPTO_MD5) { in rockchip_crypto_sha_init()
135 if (ctx->algo == CRYPTO_SHA256) { in rockchip_crypto_sha_init()
200 nbits = crypto_algo_nbits(ctx->algo); in rockchip_crypto_sha_final()
222 if (ctx->algo == CRYPTO_RSA512) in rockchip_crypto_rsa_verify()
224 else if (ctx->algo == CRYPTO_RSA1024) in rockchip_crypto_rsa_verify()
226 else if (ctx->algo == CRYPTO_RSA2048) in rockchip_crypto_rsa_verify()
249 nbits = crypto_algo_nbits(ctx->algo); in rockchip_crypto_rsa_verify()
H A Dcrypto_v2.c51 u32 algo; /* hash algo */ member
372 static int rk_hash_init(void *hw_ctx, u32 algo) in rk_hash_init() argument
390 tmp_ctx->algo = algo; in rk_hash_init()
391 switch (algo) { in rk_hash_init()
619 ret = rk_hash_init(hash_ctx, ctx->algo); in rockchip_crypto_sha_init()
663 nbits = crypto_algo_nbits(ctx->algo); in rockchip_crypto_sha_final()
682 int rk_hmac_init(void *hw_ctx, u32 algo, u8 *key, u32 key_len) in rk_hmac_init() argument
694 ret = rk_hash_init(hw_ctx, algo); in rk_hmac_init()
726 ret = rk_hmac_init(priv->hw_ctx, ctx->algo, key, key_len); in rockchip_crypto_hmac_init()
902 u32 algo, u32 mode, bool enc) in hw_cipher_init() argument
[all …]
H A Drkce_core.c96 uint32_t algo, uint32_t mode, uint32_t key_len) in rk_is_cipher_support() argument
102 switch (algo) { in rk_is_cipher_support()
144 static bool rk_is_hash_support(struct RKCE_REG *rkce_reg, uint32_t algo, uint32_t type) in rk_is_hash_support() argument
151 mask = hmac_algo2bit_mask[algo]; in rk_is_hash_support()
154 mask = hash_algo2bit_mask[algo]; in rk_is_hash_support()
162 static bool rk_is_asym_support(struct RKCE_REG *rkce_reg, uint32_t algo) in rk_is_asym_support() argument
164 switch (algo) { in rk_is_asym_support()
177 bool rkce_hw_algo_valid(void *rkce_hw, uint32_t type, uint32_t algo, uint32_t mode) in rkce_hw_algo_valid() argument
187 return rk_is_cipher_support(rkce_reg, algo, mode, 0); in rkce_hw_algo_valid()
190 return rk_is_hash_support(rkce_reg, algo, type); in rkce_hw_algo_valid()
[all …]

123