Skip to content

FCPv2 ExpectedHashes

DC* edited this page Aug 29, 2020 · 2 revisions

ExpectedHashes indicates that the key was inserted after 1254, and has a set of final content hashes (the final data after decompression). These will be checked before returning data, and if they are not correct, the download will fail. This protects against data corruption but it may also enable cross-network stuff and some interesting coalescing possibilities. The hashes listed below are included on all files of at least 4MB inserted since build 1254. Files over 1MB get SHA256, SHA1 and MD5. Small files get just SHA256 (this is used internally so leaving it out wouldn't help in most cases). ED2K is an eDonkey/eMule hash, and TTH is a Tiger Tree Hash; these are used in some common p2p apps. Unfortunately bittorrent puts a list of chunk hashes in its metadata along with filename etc and then hashes the lot, so we can't do anything with that. Obviously the hashes are not included if an insert has CompatibilityMode set to something older than 1254.

Example

 ExpectedHashes
 Identifier=Insert-1
 Global=true
 Hashes.SHA512=c630f77ee5bd4bd782124efdca903ffcba6cb887db83e46074eb61095f8e67049a2cc8a8c53db50c760690161c5294dfe240d6ed984ff32e34c9cc636491b052
 Hashes.SHA256=159b33213ea604746a54c0c99eb7b00b3d878b6be9df7ee7c39144ab8e2842e9
 Hashes.MD5=8b5be256993722988aabb30ab484b55d
 Hashes.SHA1=9b5ce5926dd7f12c3a2092f0c2696a5742b0b330
 Hashes.TTH=a8af56d919dce6710fa1b67ee07ff247bcf497bcfeab2c10
 Hashes.ED2K=f7a5e828875a62fb0ffb363fde3c1827
 EndMessage
Clone this wiki locally