Comment on page
Using Delay Encryption for Atomic Swaps
Describes how to use Delay Encryption for atomic swaps of crypto assets.
We have recently implemented a Delay-Encryption feature, a cryptographic primitive that enables users to encrypt data such that it will only be decryptable after a certain amount of time has passed.
If you have heard about time-lock puzzles or time-lock encryption, delay-encryption provides similar features. It boils down to our Trusted Party in space generating an encryption key pair and publishing the public key. Then, after a specified amount of time has passed, it releases the corresponding private key, enabling anyone to decrypt whatever was encrypted, in the meantime, to the public key.
One example where time-locking is needed is atomic swaps. Atomic swaps enable two users to exchange assets (including assets on entirely different chains) such that either both parties receive the asset from the other or the swap is annulled, returning the original asset to its owner.
Cryptosat’s delay-encryption provides a notion of time that is not dependent on block time. When time-locked transactions are first published, there is an assumption regarding the time that has passed based on the number of new blocks. Across different chains, there can be a skew in the ratio between the block mining times between the time the transactions were posted and the conclusion of the swap.