Sketch of a protocol I discussed with @jb55 for proving storage of a file. before uploading, select 32 random bytes from the file, store their indices and the sha256 hash. do this 1000 more times (select 32 different random byes, calc sha256). upload the file to the server. every day, ask for the hash of the 32 bytes at the indices stored from the server. if it matches transfer some sats. if not the server no longer has the file. you can check for 1000 days.

Replies (23)

frphank's avatar
frphank 1 year ago
Much fewer than 32 bytes will do, too. If the server doesn't have the file but wants to pretend it does, it could report random numbers. Those would be correct for a chance of 1 in 256 for 1 byte or 1 in ~4bn for 4 bytes I think that's safe enough.
frphank's avatar
frphank 1 year ago
What's the meaning of "exposing"? Is there some secret to be kept here?
I'm assuming you'd have the ability to just download said file, otherwise why do you care if it's stored or not?
andrewtoth's avatar
andrewtoth 1 year ago
Chances would be greater for real world data. It's not perfectly random. Server could record the most common byte sequences and report those.
frphank's avatar
frphank 1 year ago
Correct but then again I'm assuming the file is on the server for archival storage to begin with so it's probably compressed in one way or the other which does a pretty good job at removing the common sequences and making it pretty close to random.
Proof of storage, probably could work well for torrenting as a well to ensure that the service is storing and torrenting your data
james r's avatar
james r 1 year ago
I had the same idea but trusting is easier