/u-boot/lib/ |
H A D | hash-checksum.c | 22 struct hash_algo *algo; local 30 ret = hash_progressive_lookup_algo(name, &algo); 34 ret = algo->hash_init(algo, &ctx); 39 ret = algo->hash_update(algo, ctx, region[i].data, 45 ret = algo->hash_update(algo, ctx, region[i].data, region[i].size, 1); 48 ret = algo->hash_finish(algo, ct [all...] |
/u-boot/common/ |
H A D | hash.c | 39 static int __maybe_unused hash_init_sha1(struct hash_algo *algo, void **ctxp) argument 47 static int __maybe_unused hash_update_sha1(struct hash_algo *algo, void *ctx, argument 55 static int __maybe_unused hash_finish_sha1(struct hash_algo *algo, void *ctx, argument 58 if (size < algo->digest_size) 66 static int __maybe_unused hash_init_sha256(struct hash_algo *algo, void **ctxp) argument 74 static int __maybe_unused hash_update_sha256(struct hash_algo *algo, void *ctx, argument 82 static int __maybe_unused hash_finish_sha256(struct hash_algo *algo, void *ctx, argument 85 if (size < algo->digest_size) 93 static int __maybe_unused hash_init_sha384(struct hash_algo *algo, void **ctxp) argument 101 static int __maybe_unused hash_update_sha384(struct hash_algo *algo, voi argument 109 hash_finish_sha384(struct hash_algo *algo, void *ctx, void *dest_buf, int size) argument 120 hash_init_sha512(struct hash_algo *algo, void **ctxp) argument 128 hash_update_sha512(struct hash_algo *algo, void *ctx, const void *buf, uint size, int is_last) argument 136 hash_finish_sha512(struct hash_algo *algo, void *ctx, void *dest_buf, int size) argument 147 hash_init_crc16_ccitt(struct hash_algo *algo, void **ctxp) argument 155 hash_update_crc16_ccitt(struct hash_algo *algo, void *ctx, const void *buf, unsigned int size, int is_last) argument 163 hash_finish_crc16_ccitt(struct hash_algo *algo, void *ctx, void *dest_buf, int size) argument 174 hash_init_crc32(struct hash_algo *algo, void **ctxp) argument 182 hash_update_crc32(struct hash_algo *algo, void *ctx, const void *buf, unsigned int size, int is_last) argument 190 hash_finish_crc32(struct hash_algo *algo, void *ctx, void *dest_buf, int size) argument 367 struct hash_algo *algo; local 388 struct hash_algo *algo; local 421 store_result(struct hash_algo *algo, const uint8_t *sum, const char *dest, int allow_env_vars) argument 477 parse_verify_sum(struct hash_algo *algo, char *verify_str, uint8_t *vsum, int allow_env_vars) argument 522 hash_show(struct hash_algo *algo, ulong addr, ulong len, uint8_t *output) argument 543 struct hash_algo *algo; local [all...] |
/u-boot/include/u-boot/ |
H A D | hash.h | 22 /* general APIs for hash algo information */ 24 ssize_t hash_algo_digest_size(enum HASH_ALGO algo); 25 const char *hash_algo_name(enum HASH_ALGO algo); 28 int hash_digest(struct udevice *dev, enum HASH_ALGO algo, 31 int hash_digest_wd(struct udevice *dev, enum HASH_ALGO algo, 34 int hash_init(struct udevice *dev, enum HASH_ALGO algo, void **ctxp); 46 int (*hash_init)(struct udevice *dev, enum HASH_ALGO algo, void **ctxp); 51 int (*hash_digest)(struct udevice *dev, enum HASH_ALGO algo, 56 int (*hash_digest_wd)(struct udevice *dev, enum HASH_ALGO algo,
|
/u-boot/tools/binman/btool/ |
H A D | fdt_add_pubkey.py | 22 def run(self, input_fname, keydir, keyname, required, algo): 33 algo (str): Cryptographic algorithm. Optional parameter, 37 if algo: 38 args += ['-a', algo]
|
/u-boot/drivers/crypto/hash/ |
H A D | hash-uclass.c | 48 ssize_t hash_algo_digest_size(enum HASH_ALGO algo) argument 50 if (algo >= HASH_ALGO_NUM) 53 return hash_info[algo].digest_size; 56 const char *hash_algo_name(enum HASH_ALGO algo) argument 58 if (algo >= HASH_ALGO_NUM) 61 return hash_info[algo].name; 64 int hash_digest(struct udevice *dev, enum HASH_ALGO algo, argument 73 return ops->hash_digest(dev, algo, ibuf, ilen, obuf); 76 int hash_digest_wd(struct udevice *dev, enum HASH_ALGO algo, argument 85 return ops->hash_digest_wd(dev, algo, ibu 88 hash_init(struct udevice *dev, enum HASH_ALGO algo, void **ctxp) argument [all...] |
H A D | hash_sw.c | 132 enum HASH_ALGO algo; member in struct:sw_hash_ctx 194 static int sw_hash_init(struct udevice *dev, enum HASH_ALGO algo, void **ctxp) argument 197 struct sw_hash_impl *hash_impl = &sw_hash_impl[algo]; 199 hash_ctx = malloc(sizeof(hash_ctx->algo) + hash_impl->ctx_alloc_sz); 203 hash_ctx->algo = algo; 215 struct sw_hash_impl *hash_impl = &sw_hash_impl[hash_ctx->algo]; 225 struct sw_hash_impl *hash_impl = &sw_hash_impl[hash_ctx->algo]; 234 static int sw_hash_digest_wd(struct udevice *dev, enum HASH_ALGO algo, argument 243 rc = sw_hash_init(dev, algo, 276 sw_hash_digest(struct udevice *dev, enum HASH_ALGO algo, const void *ibuf, const uint32_t ilen, void *obuf) argument [all...] |
/u-boot/arch/arm/mach-stm32mp/ |
H A D | ecdsa_romapi.c | 54 int algo; local 60 algo = ecdsa_key_algo(pubkey->curve_name); 61 if (algo < 0) 62 return algo; 73 rom_ret = rom.ecdsa_verify_signature(hash, raw_key, signature, algo);
|
/u-boot/include/ |
H A D | hash.h | 50 * @algo: Pointer to the hash_algo struct 54 int (*hash_init)(struct hash_algo *algo, void **ctxp); 60 * @algo: Pointer to the hash_algo struct 67 int (*hash_update)(struct hash_algo *algo, void *ctx, const void *buf, 74 * @algo: Pointer to the hash_algo struct 81 int (*hash_finish)(struct hash_algo *algo, void *ctx, void *dest_buf,
|
H A D | hw_sha.h | 66 * @algo: Pointer to the hash_algo struct 70 int hw_sha_init(struct hash_algo *algo, void **ctxp); 77 * @algo: Pointer to the hash_algo struct 84 int hw_sha_update(struct hash_algo *algo, void *ctx, const void *buf, 92 * @algo: Pointer to the hash_algo struct 98 int hw_sha_finish(struct hash_algo *algo, void *ctx, void *dest_buf,
|
/u-boot/test/dm/ |
H A D | ecdsa.c | 24 struct checksum_algo algo = { local 29 .checksum = &algo,
|
/u-boot/drivers/watchdog/ |
H A D | gpio_wdt.c | 55 const char *algo = dev_read_string(dev, "hw_algo"); local 57 if (!algo) 59 if (!strcmp(algo, "toggle")) 61 else if (!strcmp(algo, "level"))
|
/u-boot/lib/ecdsa/ |
H A D | ecdsa-verify.c | 65 const struct checksum_algo *algo = info->checksum; local 77 return ops->verify(dev, &key, hash, algo->checksum_len, 91 ret = ops->verify(dev, &key, hash, algo->checksum_len, 106 const struct checksum_algo *algo = info->checksum; local 107 uint8_t hash[algo->checksum_len]; 117 ret = algo->calculate(algo->name, region, region_count, hash);
|
H A D | ecdsa-libcrypto.c | 195 const struct checksum_algo *algo = info->checksum; local 198 algo->calculate(algo->name, region, region_count, ctx->hash); 199 sig = ECDSA_do_sign(ctx->hash, algo->checksum_len, ctx->ecdsa_key); 228 const struct checksum_algo *algo = info->checksum; local 236 algo->calculate(algo->name, region, region_count, ctx->hash);
|
/u-boot/drivers/crypto/fsl/ |
H A D | fsl_hash.c | 48 static enum caam_hash_algos get_hash_type(struct hash_algo *algo) argument 50 if (!strcmp(algo->name, driver_hash[SHA1].name)) 183 unsigned char *pout, enum caam_hash_algos algo) 199 driver_hash[algo].alg_type, 200 driver_hash[algo].digestsize, 205 size = ALIGN(driver_hash[algo].digestsize, ARCH_DMA_MINALIGN); 210 size = ALIGN(driver_hash[algo].digestsize, ARCH_DMA_MINALIGN); 232 int hw_sha_init(struct hash_algo *algo, void **ctxp) argument 234 return caam_hash_init(ctxp, get_hash_type(algo)); 237 int hw_sha_update(struct hash_algo *algo, voi argument 182 caam_hash(const unsigned char *pbuf, unsigned int buf_len, unsigned char *pout, enum caam_hash_algos algo) argument 243 hw_sha_finish(struct hash_algo *algo, void *ctx, void *dest_buf, int size) argument [all...] |
/u-boot/board/freescale/common/ |
H A D | fsl_validate.c | 492 struct hash_algo *algo; local 499 ret = hash_progressive_lookup_algo(algo_name, &algo); 503 ret = algo->hash_init(algo, &ctx); 509 ret = algo->hash_update(algo, ctx, 516 ret = algo->hash_update(algo, ctx, 521 ret = algo->hash_finish(algo, ct 539 struct hash_algo *algo; local [all...] |
/u-boot/test/py/tests/ |
H A D | test_fit_auto_signed.py | 68 Each image must have an hash with algo=crc32 and hash value must match 72 algo = self.__fdt_get_string(f'{node}/hash', 'algo') 73 assert algo == "crc32\n", "Missing expected crc32 image hash!" 84 argument; algo matching sign_algo argument; value matching the one 90 algo = self.__fdt_get_string(f'{node}/signature', 'algo') 91 assert algo == sign_algo + "\n", "Missing expected signature algo!" 100 Each image must have an hash with algo [all...] |
H A D | test_fit_hashes.py | 66 algo = self.__fdt_get(f'{image}/{node}', 'algo') 67 algos.add(algo) 69 good_hash = kernel_hashes[algo] 71 raise ValueError(f'{image} Borked hash: {algo}');
|
/u-boot/arch/arm/mach-zynqmp/ |
H A D | mkimage_fit_atf.sh | 73 algo = "md5"; 90 algo = "md5"; 108 algo = "md5"; 126 algo = "md5"; 182 algo = "md5";
|
/u-boot/lib/crypto/ |
H A D | public_key.c | 101 char algo[256]; local 113 memset(algo, 0, sizeof(algo)); 119 ret = snprintf(algo, sizeof(algo), "%s,%s%d", sig->hash_algo, 122 if (ret >= sizeof(algo)) 125 info.checksum = image_get_checksum_algo((const char *)algo); 126 info.name = (const char *)algo; 130 algo); 224 ptr = pkey_pack_u32(ptr, pkey->algo); [all...] |
/u-boot/drivers/crypto/aspeed/ |
H A D | aspeed_hace.c | 44 enum HASH_ALGO algo; member in struct:aspeed_hace_ctx 114 static int aspeed_hace_init(struct udevice *dev, enum HASH_ALGO algo, void **ctxp) argument 124 hace_ctx->algo = algo; 127 switch (algo) { 153 debug("Unsupported hash algorithm '%s'\n", hash_algo_name(algo)); 229 switch (hace_ctx->algo) { 270 memcpy(obuf, hace_ctx->digest, hash_algo_digest_size(hace_ctx->algo)); 278 static int aspeed_hace_digest_wd(struct udevice *dev, enum HASH_ALGO algo, argument 287 rc = aspeed_hace_init(dev, algo, 320 aspeed_hace_digest(struct udevice *dev, enum HASH_ALGO algo, const void *ibuf, const uint32_t ilen, void *obuf) argument [all...] |
/u-boot/tools/binman/ |
H A D | state.py | 395 algo = hash_node.props.get('algo') 396 if not algo: 397 return "Missing 'algo' property for hash node" 398 if algo.value == 'sha256': 401 return "Unknown hash algorithm '%s'" % algo.value 408 algo = hash_node.props.get('algo').value 409 if algo == 'sha256':
|
/u-boot/lib/rsa/ |
H A D | rsa-verify.c | 36 * @algo: Checksum algo structure having information on DER encoding etc. 40 struct checksum_algo *algo) 50 ff_len = pad_len - algo->der_len - 3; 57 ret |= memcmp(msg, algo->der_prefix, algo->der_len); 444 const char *algo; local 451 algo = fdt_getprop(blob, node, "algo", NULL); 452 if (strcmp(info->name, algo)) { 39 rsa_verify_padding(const uint8_t *msg, const int pad_len, struct checksum_algo *algo) argument [all...] |
/u-boot/include/crypto/ |
H A D | public_key.h | 29 enum OID algo; member in struct:public_key
|
/u-boot/lib/efi_loader/ |
H A D | efi_helper.c | 104 const char algo[32]; member in struct:guid_to_hash_map 144 return guid_to_hash[i].algo; 152 * @algo: string indicating hashing algorithm to check 156 int algo_to_len(const char *algo) argument 161 if (!strcmp(algo, guid_to_hash[i].algo))
|
/u-boot/boot/ |
H A D | image-fit.c | 195 const char *algo; local 202 printf("%s %s algo: ", p, type); 203 if (fit_image_hash_get_algo(fit, noffset, &algo)) { 207 printf("%s", algo); 1091 * @algo: double pointer to char, will hold pointer to the algorithm name 1100 int fit_image_hash_get_algo(const void *fit, int noffset, const char **algo) argument 1104 *algo = (const char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len); 1105 if (*algo == NULL) { 1176 * @algo: double pointer to char, will hold pointer to the algorithm name 1186 int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo) argument 1302 const char *algo; local [all...] |