I want to design a proof of concept of a fully decentralized secure asset sharing DApp. Seller uploads the asset they want to share with a price and buyer pays it with ether or a token. Frontend and asset file is hosted on Swarm, and hash address of the Swarm is stored in smart contract. Is it possible to make this buying process synchronous using a symmetric or asymmetric key cryptography?
The problem is:
- Ethereum transactions and smart contract data/logic are all open.
- I put the asset file to Swarm encrypted, but since its hash address of Swarm is visible
it should be encrypted for buyer
buyer should receive decryption key
- In order to synchronously encrypt the file for a buyer, the unencrypted file should be hosted somewhere.
Is there a scenario i could achieve this? Possible solutions i found are:
- use secret stores of Parity
- decentralized Oracles?
- use Enigma or zk-snarks for ethereum.
- asynchronous secret sharing with Whisper
- include a centralized party (webserver? this is the last resort)- asynchronous secret sharing with Whisper