🎉 Gate xStocks Trading is Now Live! Spot, Futures, and Alpha Zone – All Open!
📝 Share your trading experience or screenshots on Gate Square to unlock $1,000 rewards!
🎁 5 top Square creators * $100 Futures Voucher
🎉 Share your post on X – Top 10 posts by views * extra $50
How to Participate:
1️⃣ Follow Gate_Square
2️⃣ Make an original post (at least 20 words) with #Gate xStocks Trading Share#
3️⃣ If you share on Twitter, submit post link here: https://www.gate.com/questionnaire/6854
Note: You may submit the form multiple times. More posts, higher chances to win!
📅 July 3, 7:00 – July 9,
Adapter signatures facilitate Bitcoin Layer 2 cross-chain atomic swaps.
Adapter Signatures and Their Application in Cross-Chain Atomic Swaps
With the rapid development of Bitcoin Layer 2 scaling solutions, the frequency of asset transfers between Bitcoin and Layer 2 networks has significantly increased. This trend is driven by the higher scalability, lower transaction fees, and high throughput offered by Layer 2 technology. Therefore, the interoperability between Bitcoin and Layer 2 networks has become a key component of the cryptocurrency ecosystem, driving innovation and providing users with more diverse and powerful financial tools.
There are mainly three solutions for cross-chain transactions between Bitcoin and Layer 2: centralized cross-chain trading, BitVM cross-chain bridge, and cross-chain atomic swaps. These technologies have their own characteristics in terms of trust assumptions, security, convenience, and transaction limits, which can meet different application needs.
Centralized cross-chain trading is fast, and the matching process is relatively easy, but security completely relies on the reliability of centralized institutions. The BitVM cross-chain bridge introduces an optimistic challenge mechanism, which is relatively complex and has higher transaction fees, making it suitable only for very large transactions. Cross-chain atomic swaps are decentralized, censorship-resistant, and provide good privacy protection, enabling high-frequency cross-chain trading and are widely used in decentralized exchanges.
Cross-chain atomic swap technology mainly includes hash time locks and adapter signatures. Although atomic swaps based on hash time locks are a significant breakthrough in decentralized exchange technology, they have issues with user privacy leakage. Atomic swaps based on adapter signatures replace on-chain scripts, making swaps lighter, cheaper, and capable of achieving privacy protection.
This article introduces the principles of Schnorr/ECDSA adapter signatures and cross-chain atomic swaps, analyzes the random number security issues in adapter signatures and the system heterogeneity problems in cross-chain scenarios, and provides solutions. Finally, it extends the application of adapter signatures to achieve non-interactive digital asset custody.
Adapter Signature and Cross-Chain Atomic Swap
Schnorr adapter signatures and atomic swaps
The Schnorr adapter signature process is as follows:
Atomic swap process:
ECDSA adapter signature and atomic swap
The ECDSA adapter signing process is as follows:
The atomic swap process is similar to the Schnorr signature process.
Questions and Solutions
Random Number Problem and Solutions
There are issues of random number leakage and reuse in the adapter signature, which may lead to private key exposure. The solution is to use RFC 6979, generating random numbers in a deterministic manner:
k = SHA256(sk, msg, counter)
This ensures that k is unique for each message, while also having reproducibility, avoiding security risks related to random number generators.
cross-chain scenario issues and solutions
The heterogeneity issue between UTXO and account model systems: Bitcoin uses the UTXO model, while Ethereum employs the account model, which prevents pre-signed transactions on Ethereum. The solution is to implement atomic swap logic using smart contracts on the Ethereum side.
Security of adapter signatures with the same curve and different algorithms: When two chains use the same curve but different signature algorithms, the adapter signatures remain secure.
Different curve adapter signatures are not secure: when two chains use different elliptic curves, adapter signatures cannot be used for atomic swaps.
Digital Asset Custody Application
Non-interactive digital asset custody can be achieved based on adapter signatures.
Verifiable encryption can be achieved through the Purify or Juggling schemes.
Summary
This article details the principles of Schnorr/ECDSA adapter signatures and cross-chain atomic swaps, analyzes the security issues involved, and proposes solutions. When considering adapter signatures in cross-chain scenarios, differences in system models and algorithms need to be taken into account. This technology can also be extended to applications such as non-interactive digital asset custody.