0

I am trying to create a smart contract where people can send some data as string. This data must be not-visible/not-readable by anyone until a certain date(let's say one month from now) Have I to set up private this data and after a certain date make it public? Is a private variable readable in any way?

Or have I to encrypt this data?

Thank you very much.

0

All data stored by your contract can be seen by anyone. Private variables are misleadingly named, they are not 'private' in the usual sense at all.

You will have to encrypt the data before sending it to the smart contract. The encryption key will have to be stored off-chain.

  • Thank you very much Jesse. There is any "decentralized" way to store encryption key and not to store it in a "centralized" solution? I don't know maybe in other contract? – rod Dec 25 '17 at 10:24
  • @rod Well, to use Ethereum at all you already have to store your address's private key off-chain. That doesn't mean it's not decentralized. Another contract doesn't really help, you would have to pray that nobody finds out the two contracts are related. – Jesse Busman Dec 25 '17 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.