13

Since a smart contract can only access (public) information on the blockchain itself, how can I make a smart contract that relies on hidden / secret information? Are there any workarounds in this situation?

10

In simple terms, you can't.

In more complex terms, depending on your specific application, there are various forms of cryptography that you can use to achieve something similar to your desired objective, although most of the tooling around this crypto is still being developed.

| improve this answer | |
3

Workarounds: Use whisper for hidden communication channels instead. Then at least you can send encrypted communication to some other person. (But, it's not seen a lot of development love.)

I'm not sure if things can be sent to/from a contract, I'd default to thinking no.

| improve this answer | |
2

There are some research attempts here (Enigma) and here (Hawk) at maintaining data confidentiality in smart contracts:

  • In Enigma no single party ever has access to data in its entirety.
  • In Hawk the blockchain is used to enforce the process in a contract while limiting visibility of the state.

Neither of these are mature enough for public release (so won't really address your needs in the short short-term), and its also appears that both of the above result in some loss of generality.

| improve this answer | |

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.