Developers.Hash.TigerTree.UselessMiddle: Difference between revisions
(Importing page from Tikiwiki) |
m (1 revision) |
Latest revision as of 20:09, 20 June 2009
The middle of a TigerTree
the root hash can confirm that an entire file is good the bottom row of a tree can confirm that each chunk beneath it is good the bottom row of a tree can be matches to a root hash, confirming both are good
the middle of a tree has no purpose and, even if it did, you never need to transmit it, because a client can easily comput it itself
the only purpose you can think of for the middle of the tree is when a server that doesn't want to hash stuff on the fly keeps the whole tree, and then reports parts of it to clients that just need that part even in this case, you should never transmit the middle of the tree
for instance, let's say a client has a root, and the middle row it doesn't need between the middle row and the root, because it calculated that to confirm the middle row was good from the middle row, it knows that the problem is in the second quarter of the file, somewhere so, it asks a server for the bottom of the tree beneath the second quarter it doesn't need the whole tree for the second quarter, because it will calculate it to confirm it matches the root of the second quarter so the server just sends it the bottom row
it never makes any sense to send the middle of a tree
trees could be transmitted and requested like this
requested x, y, and length, x for the root, x and y are 0, and length is 1 for the whole second row, x is 0, y is 0, and length is 2 for just the later half of the third row: 2, 2, 2
another way to do it say how many levels deep you are going to go to get the root give a series of bits that are left, right, right, left to navigate down the tree then say how many levels further you want to get the row there the server returns the root, followed by all the hashes that number of levels deeper than
first, coordinates x and y, which tell where the row starts