329
Pain (lemmy.nz)

Fortunately I have enough of the rar parts to extract the data I want but damn.

you are viewing a single comment's thread
view the rest of the comments
[-] Fitzsimmons@lemmy.blahaj.zone 12 points 2 months ago

I wonder how viable it would be to bruteforce it. Not a serious proposal but still fun to think about

[-] 73QjabParc34Vebq@piefed.blahaj.zone 18 points 2 months ago

It absolutely could be brute forced, we litrally have the hash of the chunk. I've thought about it before too, if one seeder is constantly giving, or refusing to even give, the chuck because of the hash mismatch, odds are it's only a bit flipped somewhere.

Another option that I've done before is find the file elsewhere, and switch it out. Seed for a long time then, you weren't the only person at 99.9%.

[-] TwilightKiddy@scribe.disroot.org 8 points 2 months ago

SHA1 has a fairly even distribution, it produces 160 bit digests, so each possible variation of a chunk will have a roughly 2^-160^ probability to hit your hash. Now assuming you have some insane computing device that can do an exahash per hour (that's 10^18^ hashes, a lot more than any modern hardware can do), finding one would take around 1.7E+26 years. Now the funniest part. Assuming your chunk is 32KiB large (practically nobody uses such small chunks today, so it's the best-case scenario), there are 2^(32×2^10^×2^3^)/2^160^ possible variations of the chunk that would produce your exact hash. That's roughly 1.1E+78865 fitting chunks with only one being correct. And it takes you 1.7E+26 years to get to just one of them.

absolutely could be brute forced

Yea, I wouldn't say that.

[-] AntOnARant@programming.dev 4 points 2 months ago

This should be the next cryptocurrency proof of work algorithm

[-] TwilightKiddy@scribe.disroot.org 4 points 2 months ago

Bitcoin uses two rounds of SHA256 if I recall correctly.

[-] Wildmimic@anarchist.nexus 3 points 2 months ago

This is why recovery info for archives is a boon - sadly it's pretty out of fashion.

[-] BeefAndPoultry@lemmus.org 10 points 2 months ago

The problem is there will be multiple solutions that result in the same hash (collisions), but only one of them will be correct

And it would take an extremely long time to find them all, I don't even think a modern GPU could do it in a lifetime

[-] Fitzsimmons@lemmy.blahaj.zone 4 points 2 months ago

It looks like bittorent version 2 hashes with sha-256 at a 16kb resolution.

pieces root

For non-empty files this is the the root hash of a merkle tree with a branching factor of 2, constructed from 16KiB blocks of the file. The last block may be shorter than 16KiB. The remaining leaf hashes beyond the end of the file required to construct upper layers of the merkle tree are set to zero. As of meta version 2 SHA2-256 is used as digest function for the merkle tree. The hash is stored in its binary form, not as human-readable string.

Seems like that should be easily parallelizable and can fit into thread memory on a modern GPU.

It would just depend on how many 16kb blocks are remaining in that 0.1%

[-] BeefAndPoultry@lemmus.org 5 points 2 months ago* (last edited 2 months ago)

Well the hashes are always much smaller than the actual data, otherwise downloading the hashes would take just as long as downloading the data lol.

So 16KB blocks means 131072 bits per block, subtract the 256 bit hash size and that means 2^130816 hash collisions

That's a lot lol, you'll never find which one is the correct one. Even if you instantly had a list of all values that match the desired hash, you'd have to check them all and somehow determine which one was correct.

this post was submitted on 07 Sep 2026
329 points (99.4% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

71279 readers
458 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder

We heartily recommend visiting the free port of freemediaheckyeah (aka FMHY) while you sail the high seas, for all the freshest links the ocean has to offer.

📜 c/Piracy Wiki (Community Edition):

🏴‍☠️ Other communities

FUCK ADOBE!

Torrenting/P2P:

Gaming:


💰 Please help cover server costs.

Ko-Fi Liberapay
Ko-fi Liberapay

founded 3 years ago
MODERATORS