I want to ask you about an idea i had today. This idea is to create a full distributed and private file box using ZenCash and IPFS.
Ipfs is a protocol to share files in a p2p method. A file added on the network is directly adressable by everyone using the hash of the file. I like to compare IPFS as huge hashMap, accessible from every node of the network, where the key is the hash of a file and the value is the file content.
The idea is to use the memo field of z_transaction to store a hash of the file you want to add in the ZenBox.
The idea needs 2 keys to operate:
- a shared key: you share this key to everyone you want to give access to the zenBox. You can simply keep it secret if you want a personal zenBox.
- an owner key: to let the owner of the zenBox update the content.
The shared key is in fact the private key of the z_address.
The first transaction of this z_address is the public key of the owner key. ie: the owner starts the system by publishing the owner public key through a transaction to the z_adress.
As the owner, you can send a new transaction to the z_address with a memo field containing the IPFS hash of the file you want to add.
(the file is encrypted with the shared key before going to IPFS)
Also the owner adds a type (NEW, UPDATE, DELETE for instance). Finally the owner signs the memo field with the private key of the owner key.
Everyone could send a transaction to the z_address but only the signed ones (where the public key is stored in the first transaction) would really matter. The owner can alter the state of a file on its box using the different type (new, update, delete) and send other transactions.
People knowing the shared key could access the wallet, visualize the signed transaction (verification will be done using the public key on the first transaction). Then, they can download a file through IPFS and decipher it using the shared key
What do you think about it ?