U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] SHA1 Hash calculation
@ 2005-11-23  8:22 Tom Saarnio
  2005-11-23  9:11 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Saarnio @ 2005-11-23  8:22 UTC (permalink / raw)
  To: u-boot

>> 
>> 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?

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [U-Boot-Users] SHA1 Hash calculation
@ 2005-11-23  7:32 Tom Saarnio
  2005-11-23  7:56 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Saarnio @ 2005-11-23  7:32 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-23  9:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-23  8:22 [U-Boot-Users] SHA1 Hash calculation Tom Saarnio
2005-11-23  9:11 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2005-11-23  7:32 Tom Saarnio
2005-11-23  7:56 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox