Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4756

General • Size of HASH_VALUE item in RP2530

$
0
0
Hi,

Reading through the RP2530 Datasheet, build-date: 2024-10-16, build-version: 5e790a3-clean

In Chapter 5.9.2.3. HASH_VALUE item it states.
Optional item containing a hash value that can be used by the bootrom to hash check an image.
The table then lists 16 fields of 4 bytes. And there is also a tip on page:
"Whilst A SHA-256 hash is 16 words, you can include less (down to 1 word) to save space if you like"

For me, this is very confusing. As far as I know, the digest (hash) generated by SHA-256 is 256 bits. That is 8 32-bit words.
See for example NIST SP 180-2 that specifies the SHA-1 and SHA-2 functions. Including SHA-256.

The SHA-2 input block size is 512 bits (16 32-bit words). Is that what the HASH_VALUE item is? How can that be truncated?

Also, what is the purpose of the truncation down to even a single word? What is the use case where a 32 byte (256 bit digest) is too big?
Doesn't this open up for people shooting themselves in the foot. How is the size checked?

Statistics: Posted by JoachimS — Thu Dec 05, 2024 12:56 pm — Replies 1 — Views 15



Viewing all articles
Browse latest Browse all 4756

Trending Articles