Quoting Jeroen Asselman <[EMAIL PROTECTED]> from ml.softs.gtk-gnutella.devel: :Raphael Manfredi schreef: :> Quoting Karlan Mitchell <[EMAIL PROTECTED]> from ml.softs.gtk-gnutella.devel: :> :Is there something I am missing about hashing mathematics, (because I :> :don't understand the prepending of 0x01 and 0x00 to the hashes....) :> :> What are you talking about here? Which prepending? :> :The specs say, to avoid hash collition within the hashtree, that before :the parent hash of a leaf hash is calculated the leaf hash is prepended :with 0x00 > HASH(0x00 + leafhash) , however to calculate the leaf hash :itself is calculated like HASH(0x01 + datablock)
Ah, yes, that's in the THEX specs. Well, if it's in there, it must be done. My guess is that they were fearing nasty problems when hashing hashes, like a convergence in some degenerated cases (you know, f(f(f(x))) sometimes converges). Anyway, it's not a big deal, but it must not be forgotten, naturally. Raphael ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Gtk-gnutella-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
