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

Hi!

I am wondering whether it would be worth to implement a SHA1 hash calculation over given memory address range. In this way one could assure for example that the binary image version is correct or that binary image is intact.

For those who are not familiar waith SHA1 (or
other hash algorithms), the SHA1 algorithm computes a 160 bit "fingerprint" of given byte stream. The algorithm is designed so that collisions between any given byte stream is "unlikely" as it is very unlikely that two persons have identical fingerprints or dna.

Wikipedia:
http://en.wikipedia.org/wiki/SHA-1

Source code:
http://www.
cr0.net:8040/code/crypto/sha1/

Any comments?

br,

Tom

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

I am wondering whether it would be worth to implement a SHA1 hash calculation over given memory address range. In this way one could assure for example that the binary image version is correct or that binary image is intact.

Is the existing CRC32 checksum not good enough for your purposes?

Quoted 1 line

Any comments?

Use the existing CRC command instead.

Best regards,

Wolfgang Denk

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anyone who knows history, particularly the history of Europe, will, I
think, recognize that the domination of education or of government by
any one particular religious faith is never a happy  arrangement  for
the people.                                       - Eleanor Roosevelt