We have a smart contract containing encrypted data that should remain encrypted till a specified timeLimit. Then, the decryption key would be made public, for everyone to read that data. We want to achieve this in a trustless manner, as anyone with knowledge of this data before the timeLimit can use it to exploit the system.

How can this be achieved?

PS: I tried exploring "proof of work" based "time lock puzzle" solutions. (related: Time Capsule cryptography?) But I find these unreliable, as its possible for a miner to find a solution before timeLimit and only reveal it later. Also, if you set the difficulty hard enough, then there may not be any solution found for a long time even after timeLimit, which is also bad.

  • $\begingroup$ This is what I had already linked in the question. I find this proof of work approach not reliable enough. $\endgroup$
    – explorer
    Aug 20, 2022 at 15:11
  • $\begingroup$ I don't see a difference between this question and Time Capsule Cryptography. And I stand by my old answer. $\endgroup$
    – fgrieu
    Aug 20, 2022 at 16:58
  • $\begingroup$ @explorer: The question you linked has 22 answers, part of them saying "yes", the others saying "no". Have you read all these 22 answers? Which of these 22 answers you mean? $\endgroup$
    – mentallurg
    Aug 20, 2022 at 22:52

2 Answers 2


You would need to store the decryption key somewhere else during the Time Limit, obviously. Then you would have to agree with all parties where the information will be published once the time limit runs out. Apart from Time Capsule Cryptography, there is no Zero-Proof Knowledge method that I am aware of that would guarantee that a malicious person or person's in the project wouldn't be able to recover the key if they had knowledge of its storage location. Ideally a mathematician or Cryptographer should chime in on this to confirm my claim.

Your best bet without Time Capsule Cryptography would be to get one person who knows the true location of the storage location to be heavily trusted (ideally the person who even implemented it) and say it after a certain amount of time. If your time limit is large, more people will be needed in case the person dips the project or dies.

Another strategy would be to layer on top of many encryption ciphers. Only this person knows the password to the outer layer, which the one person reveals the inner layer, which the one other person reveals the core, which reveals the final key in it's state. If you didn't get that, basically its wrapped like an onion, and each layer has a specific password that only one person knows. If the outer layer hasn't been unlocked, than the knowledge of the password for the inner layer is useless until the outer layer gets unlocked.

I am not a professional at mathematics, so there could be a better solution. This is the best I can think of at the moment.


There is no cryptographic solution for your requirements. @fgreu has explained well the reasons.

One of the relatively reliable approaches is to use hardware with an internal clock. Make such hardware resistant to tampering of any kinds like mechanical disassembly, exposure to mechanical forces, radiation, temperature, electromagnetic fields. The user of this hardware should provide power uninterruptedly (interruption of power leads obviously to revealing the secret at a later time). You can make even multiple copies of such hardware and offer them to all interested parties. All of them will obtain the secret at the same time.


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