Dude, you clearly stated in your question decryption, not encryption. You can use a signature function for this. Here's how:
- Post a signature to a blockchain. Nobody knows who signed this signature or what the data contains.
- Whenever you want to
decrypt
this signature, provide the address that signed it, as well as the data it contains. As long as the address you signed it with is new (i.e. randomly-generated), the data remains hidden until this time. - Do the validation of the signature on-chain so your smart contracts can respond to a correctly decrypted value.
Because Web3 is constantly changing, look into the Open-Zeppelin SignatureBouncer.sol contracts, as well as their tests in Web3 for working Solidity/Javascript code.