Skip to contentSkip to conversation

SHA1 Hash calculation

U-Boot-Users Tom Saarnio 2 participants 2 messages Nov 23, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines
Quoted 2 lines

I am wondering whether it would be worth to implement a SHA1

hash

Quoted 1 line
Quoted 1 line

calculation over given memory address range. In this way one

could

Quoted 1 line
Quoted 1 line

assure for example that the binary image version is correct

or that

Quoted 3 lines
Quoted 1 line

binary image is intact.

Is the existing CRC32 checksum

not good enough for your purposes?

The CRC32 is not collision-proof in
similar fashion that SHA1. In real life, if two binary images give the same SHA1 checksum, you can say that these binaries are identical. With CRC32 this is not so - or at least I would not count on that :-)

br,

Tom

#1 lore raw
Quoted 5 lines · In message <[email protected]>…

The CRC32 is not collision-proof in
similar fashion that SHA1. In real life, if two binary images give the same SHA1 checksum, you can say that these binaries are identical. With CRC32 this is not so - or at least I would not count on that :-)

Well, normally you have additional information like the U-Boot image header, version id, etc.

But feel free to implement sha1 support - if it can be configured cleanly away then it's fine...

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Wagner's music is better than it sounds."               - Mark Twain