Reverse patch: seemingly stupid idea (or just straight stupid)

57 views
Skip to first unread message

len...@gmail.com

unread,
Jan 25, 2015, 6:27:13 PM1/25/15
to libr...@googlegroups.com
Hi,

Well I know it's not possible to fully recreate file A from file A_new and A's signature. But wouldn't it be possible to just try to recreate it partly and fill the remaining bytes with 0's?

Use case: Cross-seeding torrents

Imagine that A has a torrent file and the full content for it. B has almost the same content except some metadata is changed in his/her file so his/her file does not match with the torrent file. Now he wants to join to seed the torrent with the least bandwidth usage possible. Fortunately A distributes his/her file's rdiff signature.

Now if B could compute a "reverse delta" against this signature he/she could patch it against his/her file and could start seeding. Some of the torrent's chunks might be missing so he/she could download these from the torrent.

It's really a specific use case and maybe it could be implemented in torrent clients as some "smart cross-seed" feature. I just ask if something like this is theoretically possible.

Best regards,
Lénárd Szolnoki

Martin Pool

unread,
Jan 27, 2015, 12:11:50 AM1/27/15
to len...@gmail.com, libr...@googlegroups.com
Hi, yes, that should be pretty possible. You can probably do it with a small program on librsync by calculating delta(A_sig, A_new) and looking for the copy instructions, then essentially playing them backwards. 

If you don't expect sub-block-sized insertions or deletions you might be able to able to do this directly on the hashes in the torrent file.


--
You received this message because you are subscribed to the Google Groups "librsync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to librsync+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Martin
Reply all
Reply to author
Forward
0 new messages