monero.loveA little love for the network.
← All news

Atomic Swaps / Cryptography / Development

Eigenwallet 5.1.0 Tightens Bitcoin Signature Validation for Monero Atomic Swaps

Eigenwallet 5.1.0 introduces stricter Bitcoin signature validation and witness signature normalization, addressing transaction compatibility requirements in Bitcoin–Monero atomic swaps.

Both ECDSA forms pass the mathematical check. Only low-S passes Bitcoin Core's standard low-S relay check.

Eigenwallet 5.1.0 checks the form of Bitcoin signatures when two peers set up a Bitcoin–Monero atomic swap. It also writes signatures in low-S form when it assembles the Bitcoin transactions that can settle or unwind the trade. A third decision matters to anyone resuming an older swap. The wallet still accepts either form when reading signatures from Apollo backup records and published redeem or refund transactions. Implementation PR #1311

The release appeared on December 2, 2026 at 19:42 UTC. GitHub displays 64 assets. Its API lists 62 uploaded files, and GitHub supplies two source archives. Version 5.0.6, published November 29 UTC, was the preceding release. The tag for 5.1.0 points to 93839a2. That commit belongs to release preparation PR #1312. The preceding commit, 7923708, implements both signature changes. 5.1.0 release · 5.0.6 release · Release preparation

Why two valid signatures get different relay treatment

A Bitcoin ECDSA signature contains two numbers, r and s. For a valid signature, replacing s with its complement relative to the curve's group order gives another representation that satisfies the same verification equation for the same message and public key. Low-S means choosing the smaller of those two possible s values. The choice does not let anyone change the signed amount or choose a new recipient. BIP 146 rationale

Bitcoin Core 0.11.1 added low-S to its standard transaction relay policy in 2015. A node applies policy when deciding what to accept into its mempool and forward to peers. A miner can include a transaction that fails standard policy if it satisfies the consensus rules for the block. Having a low-S signature says nothing by itself about whether the input is spendable, the timelock has matured or the fee will buy timely confirmation. Bitcoin Core 0.11.1 release notes · Bitcoin Core policy flags

BIP 146 proposed adding low-S and a separate failed-signature restriction to consensus. Its status is Closed. The relevant Bitcoin inputs here spend a version-zero SegWit script using ECDSA. Taproot's Schnorr signatures use different verification rules. The Eigenwallet change concerns neither Schnorr signatures nor Monero's consensus rules. BIP 146 · Bitcoin's Taproot specification

Signature checks before either side locks funds

In Eigenwallet's desktop workflow, the taker brings bitcoin and the maker supplies Monero. Both need usable signed transactions in hand before committing funds. For a refund, the taker relies on material received before locking bitcoin. If a node declines to relay the assembled transaction, the refund window can keep shrinking while the taker waits. The new checks move a decision the software can already make to the stage when the participants exchange signatures. Swap protocol

The maker, named Alice in the code, checks ordinary signatures from the taker on cancel, punish and early refund. Where the negotiated refund terms call for them, she also checks reclaim, withhold and mercy signatures. The taker, Bob, checks the maker's cancel signature and the reclaim signature in the branch that uses it. The function verify_sig_disallow_high_s verifies the expected key and transaction digest with low-S enforcement enabled. An otherwise valid high-S signature that passed the 5.0.6 verifier fails these setup checks in 5.1.0. Maker state machine · Taker state machine

Where Eigenwallet constructs the Bitcoin witness

The witness supplies the data that satisfies the spending script. In swap-core/src/bitcoin.rs, the new build_multisig_satisfier takes two public keys and two completed ECDSA signatures. It converts the compact signatures, normalizes s on each, and pairs each signature with its key and the SIGHASH_ALL flag. The serialized witness contains the DER-encoded signatures and their hash-type bytes. Compact and DER describe how the numbers are encoded. Low-S describes which value of s the encoding contains. Tagged Bitcoin implementation

Nine Bitcoin transaction builders now share this helper. Redeem handles ordinary settlement. Cancel, early refund, full refund, partial refund and punish cover alternative outcomes. Reclaim, withhold and mercy implement branches involving an anti-spam deposit. The helper acts during transaction completion, before the wallet submits the transaction. The initial Bitcoin funding transaction and ordinary wallet withdrawals use other builders. Implementation commit and files

After setup the parties lock bitcoin and Monero. Settlement and timed cancellation lead to different claims.

What happens to adaptor signatures and older swaps

An adaptor signature lets one party prepare an encrypted signature that the other can complete with a secret. When the maker spends the locked bitcoin, the taker can use the completed signature and the original encrypted signature to recover information needed to claim Monero. That connection between the two chains is what makes the witness relevant to the recipient on the other side of the exchange. Eigenwallet's protocol description

The new helper receives completed signatures. Encrypted refund signatures still go through verify_encsig. When reading a redeem, full-refund or partial-refund witness, Eigenwallet uses the verifier that permits either s form to identify the required signature. Its pinned adaptor library, ecdsa_fun 0.10.0, checks the recovered candidate against the encryption public key and accounts for either sign. The release also gives an empty witness signature an explicit parse error. A wallet restoring a swap therefore checks the saved encrypted material separately from any completed signature it reads from Bitcoin. Bitcoin code · Adaptor library

The Apollo backup reader makes the same allowance for ordinary cancel and reclaim signatures from older swaps. This is deliberate backward compatibility for those records. It does not establish that every interrupted swap can resume after an upgrade. The 5.0.6 builders could write a supplied high-S signature into a completed witness. That identifies a specific earlier behavior, without establishing how often a peer supplied one or how far back the behavior goes. We found no public incident in the release, implementation PR or project advisory listing that tied it to a failed trade, theft or CVE. Apollo verification · Project advisories

What we tested and what to do with an active swap

We ran the tagged swap-core Bitcoin unit tests on Linux with Rust 1.92.0 and the release lockfile. All 35 selected tests passed. They included acceptance of low-S, the different treatment of high-S by the two verifiers, rejection of an empty witness element, identical completed cancel witnesses and transaction IDs for the two input forms, and successful secret recovery from a high-S redeem witness. Three Apollo tests also passed, including decoding an older stored state and accepting a legacy setup signature. Tagged regression tests

We also ran four of the project's two-chain tests with Bitcoin Core 28.1, Monero 0.18.4.0 and disposable wallets. Bitcoin Core enforced its standard transaction policy. Both parties settled a swap, and a taker who restarted after the Monero lock finished from saved state. Another taker recovered after losing its test database using a confirmed Apollo backup. In the fourth test, both parties recovered their test funds through cancellation and refund. These were local 5.1.0 swaps. In a separate storage check, the 5.0.6 database code wrote 25 maker and taker states from the local swap history to SQLite. Version 5.1.0 reopened that file and read back all 25 with matching values. Public relay and finishing an active 5.0.6 trade after upgrading remain untested. Tagged two-chain tests

For an upgrade, verify the release package and keep the wallet and its local swap state. A seed can restore eligible swaps with a recoverable Apollo backup. Older swaps started without one depend on the saved state. Check the active swap's status before replacing a device or starting a fresh wallet. The automated swap backend shares the maker checks. Updating it gives the operator the new behavior. The 5.0.6-to-5.1.0 comparison contains no database migration, new mandatory configuration option or requirement that both peers upgrade simultaneously. Release comparison · Installation and signature verification

BasicSwap has its own Bitcoin implementation. In version 0.19.4 its verifier checks the trailing hash-type byte and verifies the DER signature against the calculated digest. Its pinned native adaptor library produces low-S when decrypting an encrypted signature. That normalization is at a different step from Eigenwallet's shared witness builder. For recovery, BasicSwap prepares a script-chain refund and refund spend, and stores bid and transaction state in its database. Offer makers can configure automatic bid acceptance. Its forward and reversed negotiations support BTC/XMR in both directions. BasicSwap protocol · BasicSwap bid handling The atomic swap guide covers those routes, and our Eigenwallet walkthrough follows the desktop buyer's path. BasicSwap Bitcoin interface · BasicSwap's native library

Support Monero Love

Help keep the public nodes and packages running. Send any amount of XMR.

Scan with a Monero wallet to donate to Monero Love.89hGTKxRVA3AUeKAbCRBt5TMSzq3MQZooNNsezCpNFjp2oeJPRx8AJeGKA8ziHZNqab78f4Vr1ntxhPDxX5298nnGZjHkhm