Hi Sean, Yes, your "kind" of correct.. My explanation was a little simplified. But for all practical purposes with a good hash you can just about say the number is unique. The hash lengths are commonly 128 bit (MD5) or 160 bit (SHA). With that number of bits I'm pretty sure you can assign a unique number to EACH and EVERY particle in the universe and still have some left over! I remember reading this about UUIDs (Universal Unique IDentifiers, used in software like COM and other object broker systems) which are 128 bit if I remember correctly. The "strength" of a Hash can be measured by the number of different messages that hash to the same key and also how many of the bits change for each bit of the message. How they determine this I don't know - I just use the algorithms :) It is possible to several messages to map to the same hash, but the hash function is specifically designed so that the only possible way to workout the "collisions" is by brute force. It is also far more improbable that two "useful" messages will map to the same hash. Cheers, Ash. --- Ashley Roll Digital Nemesis Pty Ltd www.digitalnemesis.com Mobile: +61 (0)417 705 718 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Sean H. Breheny > Sent: Thursday, 9 May 2002 2:00 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [OT]: Software Protection > > > At 01:32 PM 5/9/02 +1000, you wrote: > >If you aren't sure what a Hash (also called a message > digest) is, it is > >basically a way to take the contents of a message and > compute a unique > >(large) number. The idea is that no two messages will give > you the same > >number and you can not recover the message from the number. > They are often > >used to verify that the contents of a message have not been > altered. Almost > >like a CRC.. but MUCH bigger and better. Look for "SHA" > (sometimes called > >"SHS") and "MD5". These are the most common. I used SHA. SHA > generates a 160 > >bit number, MD5 a 128 bit number. > > Hi Ash, > > I don't think you really mean unique, do you? If the number > is shorter than > the message then there MUST be more than one message that > gives you the > same number. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.