Contracts With Secrets

Can contracts have secrets? In other words, could I create a contract that holds some information only to release it when some conditions are met? As I understand it, this isn't possible because the entire state of the contract is always available to the network. Since even an encrypted piece of information must have its encryption key somewhere on-chain, there doesn't seem to be a way to achieve this. Is there something that I'm missing?

Comments

  • HaposhiHaposhi Member Posts: 14
    I can't think of a way to time lock information on the blockchain.
    You can use a commitment scheme to store encrypted information that can be verified, but you need to send the plaintext later so that they can check that it matches.
    You can use secret sharing to store information that can only be retrieved if several keys are used together, but this still requires information to be kept off the blockchain.
Sign In or Register to comment.