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?

3 Answers 3


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.


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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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