News for hackers. Stuff that matters.
Re:The BitTorrent Protocol Specification v2 by computerphage on Monday August 07, 2017 @10:11PM (#14953148)
> Or it could skip requesting the tree and verify the whole file at once.

To clarify, this works by the client deterministically reconstructing the tree once they have the whole file, then checking the root's hash, correct?

Re:The BitTorrent Protocol Specification v2 by phire on Monday August 07, 2017 @11:19PM (#14953770)
Yeah, it's a deterministic tree of hashes.

Each leaf is the hash of a 16KB chunk. On the next layer up you have a series of nodes which are the hashes of the two leafs below it hashed together.

You add enough layers until you get a single root hash at the root of the tree.