Content distribution on IPFS

An idea that has been brewing in my mind is transferring files from one user to another. From what I gather, in order to share content:

  1. You upload content
  2. Get the hash
  3. Share that hash

But this means that anyone who has the hash of the file can read the file. Is it possible that rehash the file on transferring? Or any other way to deal with this?

You can achieve what you want by encrypting the file using a public key. Whoever has the corresponding private key will be able to decrypt it. Other nodes will see the existence of the file, but will not be able to see its content.

This is a common use case, but requires a lot of infrastructure (identity, contact list, shared public keys, encryption) and so it can take time to implement. At Mainframe, we’re working on bringing all of these pieces together to make decentralized app development easier. (We also use Ethereum Swarm for the decentralized file storage layer, but have plans to integrate IPFS at some point).

1 Like

Thanks for sharing that. I had somewhat similar approach in mind. I can see why this would be complicated. But it would be really useful.

PS. I will be following updates from Mainframe.

1 Like