How does Hashing work?

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Aidman
Posts: 2
Joined: 2003-04-05 17:49

How does Hashing work?

Post by Aidman » 2004-04-11 08:11

Hi,

I don't quite understand how TTH can create such a short hash string, which is supposed to describe the exact data in file. I assume that it doesn't identify 100% of the data because that would be impossible in such a string, right? If my assumption is correct than isn’t there a risk of comparisons, where non-identical files have hash strings that match? I have tried to understand the dc++ code and find any info on the net, but without success.

Any help is appreciated.
EDIT: I've moved the topic since it isn’t very related to compiling and such.
Aidman » over and out

IntraDream
Posts: 32
Joined: 2003-12-12 14:28
Location: FL,USA
Contact:

Post by IntraDream » 2004-04-11 13:56

im sure some of my numbers are wrong. im not sure on how tiger values work with thex in there example it seems the first charicters of the root hash are replaced with urn:tree:tiger:. but nontheless what you say is somewhat true just about any hash can be reproduced someway but the trick is reproducing it with the exact filesize.. another issue is that the amount of possible root hashs is like 36^48 i beleave wich is a giant number. another thing that makes tree hashing more secure is that the root(hash used for searching) is not calculated from the file data directly chunks of the file are taken and hashed.. and the the root is hashed by these 'node' hash values. i think the max number of nodes is 512.. not sure maybee 256 but at 512*48 = 24576(bytes) wich is highly unlikly(maybee imposible) to reproduce a similar hash with such a small amount of data..

Please correct me on some of my numbers 512 max nodes.. 36 valid hash charicters.. 48 char hash. and why the thex page the test hash values are 39 charicters + 'urn:tree:tiger:' does DC++ use this method?

Tim-

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-04-11 14:11

One can always also google for info, or look here: http://www.cs.technion.ac.il/~biham/Reports/Tiger/
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-04-11 15:44

Google for a bit. Other common hash algorithms are MD5 and SHA1. When two different inputs give the same hash, it's known as a collision. If a hash is prone to collisions, it's not very good. Tiger, MD5, and SHA1 don't have any problem with collisions, to speak of.

This topic is heavy into mathematics, so unless you've a mind for it, you should just read around and decide who to trust about uniqueness and collisions.
Last edited by GargoyleMT on 2004-04-12 12:49, edited 1 time in total.

Aidman
Posts: 2
Joined: 2003-04-05 17:49

Post by Aidman » 2004-04-12 07:36

OK, thanks
I'll try dig deeper with the keywords you guys mentioned
Aidman » over and out

Locked