4 ms·
> If I want to discover the content hash can't I just advertise that I have the discovery hash then wait for someone to ask me for it? Yes, for this to work it
by nybble41 5y ago
> If I want to discover the content hash can't I just advertise that I have the discovery hash then wait for someone to ask me for it?
Yes, for this to work it is essential to avoid sending the content ID to a peer who may not already have it.
> I think one approach here would be to encrypted the data with the content hash. Then you ask for the data by discovery hash, but if you don't actually know the content hash it is useless to you.
That is how Hypercore/Dat works, except it uses a public key rather than a content hash. The request only includes the discovery hash, and the peer has to look up the corresponding content ID to encrypt the response.