Comment on page
Time-based primitives and delay-encryption
Cryptosat is building several time-based cryptographic primitives facilitating blockchain operations that require guarantees regarding the passage of time.
Cryptosat supports a Delay-Encryption feature, a cryptographic primitive that enables users to encrypt data to only be decryptable after a certain amount of time.
If you 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.
Sealed-bid auctions using Delay Encryption
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.
Another application of delay encryption is for sealed-bid auctions. The auctioneer starts an auction by asking Cryptosat to generate a key pair and publish the public key. The participants submit their bids encrypted under the public key. The private key is revealed at the end of the time allotted to the auction. The bids can then be decrypted by the auctioneer (as well as by all participants) to reveal the winner. This is not specific to blockchain as such auctions can be performed on-chain (Web3) or using a legacy Web2 API.
Time-locked smart contracts and wallets
Time-locks are closely related to Delay Encryption. It refers to any operation (within a blockchain or cryptographic context) that is locked until a certain point in time, after which it is enabled.
Here’s a write-up by Radek Ostrowski with some good examples of use cases for time-locked wallets. Automated vesting of ERC20 tokens is a prominent use case for the time-based release of tokens. Crypto-wills are another important one.