Were you unable to attend Transform 2022? Check out all of the summit sessions in our on-demand library now! Watch here.
Every now and then we hear that a cross-chain bridge has been hacked. In 2022 alone, six bridges have been hacked, and more than $1.2 Billion worth of crypto assets have been stolen.
What are cross-chain bridges? What purpose do they serve? And why are they such prominent honeypots? Can Confidential Computing be used to improve the security of cross-chain bridges?
Cross-chain bridges help in moving crypto assets from one blockchain to another. Interesting circumstances are popularizing them. For one: Older blockchains that have survived over the years end up having more valuable assets. But older blockchains are often slow, have low throughputs and offer higher transaction fees. On the flip side, newer blockchains or sidechains can be fast, have high throughput and the transaction fees may be extremely low. Cross-chain bridges make it easy to move popular assets from older blockchains onto newer blockchains and sidechains where they may be transacted more efficiently.
Let us understand how a cross-chain bridge works. A crypto asset is locked in a vault smart contract on the source blockchain, and a representation of that asset is minted in the peg smart contract on the destination blockchain. A set of entities that are commonly called “guardians” are responsible for monitoring the vault smart contract on the source chain for new deposits and for creating their representations in the peg smart contract on the destination blockchain.
MetaBeat will bring together thought leaders to give guidance on how metaverse technology will transform the way all industries communicate and do business on October 4 in San Francisco, CA.
Conversely, when the representations are destroyed in the peg smart contract, these guardians are responsible for releasing an equivalent amount of tokens held in the vault smart contract on the source chain.
It is easy to see that an attacker can either attack the vault smart contract, the peg smart contract or the guardians. Often, vulnerabilities are found in smart contracts. For example, the latest hack on bridge provider Nomad resulted in the loss of nearly $200 million, exploiting vulnerabilities in the smart contract logic on the source blockchain. These were introduced during a smart contracts upgrade process. The attack on Axie Infinity’s Ronin bridge led to a loss of $625 million; the attack on Horizon Bridge operated by California-based firm Harmony led to the loss of $100 million. Both of those attacks involved compromising the keys held by guardians.
Harmony did not use data in-use encryption. It is quite possible that the private keys were lost following a memory dump attack. It is irrelevant if the keys were doubly encrypted when at rest. When these keys are being used, they are brought to the main memory. If the memory of the process using the key is dumped, the private key can be extracted.
Enterprise-grade Confidential Computing
Confidential Computing is a technology that supports data in-use encryption. Simple memory dump attacks do not work when using Confidential Computing technologies such as Intel SGX. It is also possible to raise the bar and create an enterprise-grade Confidential Computing platform. This involves supporting cluster mode operations, high availability, disaster recovery, obtaining a variety of security certifications, and encasing nodes with tamper-resistant hardware to prevent side-channel attacks. Enterprise-grade Confidential Computing platforms also support quorum approvals for using stored keys. Multiple approvers could be required for signing transactions with each key.
Given that cross-chain bridges store remarkably high sums of cryptocurrencies, enterprise-grade Confidential Computing platforms should be used by guardians for generating, storing and using keys.
But it is also hard for a bridge guardian to completely trust an enterprise-grade Confidential Computing platform. What if the platform operator denies service for some reason? Generating keys that do not depend on a user-provided seed can be dangerous. A DOS attack could lead to the funds being permanently locked.
One solution is to own the platform and to deploy it yourself in datacenters of your choice. The other solution is to make the platform generate a key and then make it generate components of the key using a threshold secret sharing scheme. The shares can be encrypted with public keys provided by the bridge guardians. This way, if a threshold number of guardians can combine their shares, the key can be re-generated even if there is a DOS attack by the provider of the enterprise-grade Confidential Computing platform.
Bridge guardians need to reconsider how they are managing their keys. We have seen too many attacks that could have been averted with better key management practices. Keeping keys online and maintaining them securely is a tough task.
Thankfully, enterprise-grade Confidential Computing can go a long way in improving the security of bridge guardian keys.
Pralhad Deshpande, Ph.D. is senior solutions architect at Fortanix.
Welcome to the VentureBeat community!
DataDecisionMakers is where experts, including the technical people doing data work, can share data-related insights and innovation.
If you want to read about cutting-edge ideas and up-to-date information, best practices, and the future of data and data tech, join us at DataDecisionMakers.
You might even consider contributing an article of your own!