TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Will we ever be able to recover BitTorrent files from the piece hashes?

8 点作者 jonesnc大约 3 年前
sha1 hashes are not secure, and collisions can be practically produced by attackers.<p>I&#x27;m wondering if these attack strategies could one day be used to find collisions for the pieces in a bittorrent archive to effectively &quot;recover&quot; the data that was originally used to create the bittorrent archive.<p>Let&#x27;s say the piece size is 4 KiB, that means there are 2^(8x4x1024) possible combinations of bytes for each piece. That is a number with almost 10 thousand digits. Could these sha1 collision attack strategies be used to cut down on the number of combinations we&#x27;d have to comb through to find the matching 4 KiB of binary that original produced the hash?<p>Either way, I&#x27;m interested to learn more about how this works. Thanks.

5 条评论

jml7c5大约 3 年前
The problem is that a hash is not even close to a one-to-one mapping of input data &lt;-&gt; output hash. There are a truly enormous number of possible 4 KiB strings that can produce a given hash. Assuming SHA-1 is evenly distributed, there are 2^(8*4*1024) &#x2F; 2^160 possibilities (which is 2^32608). You could find <i>some</i> 4 KiB piece that works, but it would almost certainly not be the original. Even if your torrent had a single file with a single missing 4 KiB piece, and even if you had a machine that could spit out every configuration that would pass the hash check, you&#x27;d still have 2^32608 theoretically valid files to test.<p>(Note: I&#x27;m not taking the time to think the specifics through so my math may be incorrect, but the conclusion that the search space would remain huge is sound.)
TechBro8615大约 3 年前
If you put enough monkeys on type writers, they&#x27;ll create Ubuntu 18.04 LTS.
wmf大约 3 年前
What you&#x27;re talking about is a preimage not a collision which is a different kind of attack.
评论 #30784752 未加载
simplicialset大约 3 年前
It&#x27;s probably easier with quantum computers: <a href="https:&#x2F;&#x2F;eprint.iacr.org&#x2F;2020&#x2F;213.pdf" rel="nofollow">https:&#x2F;&#x2F;eprint.iacr.org&#x2F;2020&#x2F;213.pdf</a>.
评论 #30788361 未加载
rdtwo大约 3 年前
As in hashing being there ultimate compression… seems unlikely