Offchain Contract Data for CSV Protocols
Alice and Bob want to put a token in an offchain contract that expresses:
- Alice can take the token if she reveals the sha3 preimage of a hash within a week
- Otherwise, Bob can take the token
The problem is that Alice does not want to use any onchain data to reveal the preimage. This is possible with the following setup upfront:
- Alice creates a random key
K
and encrypts her preimage with that key - In the contract she commits to the resulting ciphertext and also to
K
- She sends the contract and the ciphertext to Bob