Monero / Privacy
What Are Atomic Swaps? Bitcoin, Monero and BasicSwap
Understand Bitcoin and Monero atomic swaps, compare BasicSwap with eigenwallet, and learn how fees, refunds and wallet backups affect a trade.
Cryptography / Monero / Atomic Swaps
Praxis estimates a 7.88 GiB witness-encryption ciphertext. See how the cryptography works and what a Bitcoin–Monero swap design would still need.

The Praxis witness encryption preprint estimates a general-purpose ciphertext of 7.88 GiB. For the same security target, the authors estimate that two earlier constructions each need more than ten billion times as much space. Praxis still needs nearly 8 GiB to protect one short key. The November 2026 preprint by David Tse, Nikhil Vanjani and Psi Vesely gives a new way to release a secret when someone can prove a condition. It contains no Bitcoin–Monero swap protocol, and we found no Monero integration in the projects we checked. Praxis, arXiv v1
Ordinary public-key encryption addresses a message to whoever holds a private key. Witness encryption addresses it to whoever can supply evidence for a statement. Suppose you publish the hash of a uniformly random secret and encrypt a message to the statement that some input hashes to that value. A matching input is a witness. Checking one takes a hash computation, even if finding one takes a long search. In NP, every yes answer has a certificate of bounded size that a program can check efficiently. A guessed password would make a poor condition because someone could try likely inputs and find a witness. Garg, Gentry, Sahai and Waters, 2013
Correctness means a valid witness recovers the message, up to the scheme's stated failure probability. The original soundness guarantee hides the message when the statement is false and no witness exists. For a true statement whose witness is hard to find, that guarantee alone says little. Extractability gives a stronger argument. If an attacker can distinguish encryptions of two chosen messages, a mathematical extractor can use its behavior to recover a witness, subject to the proof's assumptions and error bounds. In Praxis, the decryptor recovers a symmetric key that can protect the message. Original definition, Praxis, sections 3 and 5
Some earlier general-purpose proposals depended on multilinear maps, cryptographic tools that combine many hidden values. Cryptanalysis broke some of those candidates. Other schemes efficiently handle a specific condition, such as knowing a signature, while a general-purpose scheme can encode an arbitrary efficiently checkable relation. Isaac Hair and Amit Sahai gave constructions for NP in an idealized prime-order group model. Their algorithms run in polynomial time at their stated asymptotic security formulation. Bringing the constructions to a concrete 100-bit target still gives enormous costs in Praxis's comparison. Praxis, background and comparisons, Hair and Sahai, v3
Hair and Sahai turn the checks on a witness into tests on a matrix. A valid assignment yields a rank-one matrix, meaning its rows are multiples of one row. Passing the tests without a witness requires higher rank in their false-statement argument. Praxis keeps the gap fixed at one versus four in its search argument. A valid witness leaves one unknown integer to find. Higher rank leaves more independent unknowns. That saves on ciphertext size at the cost of a decryption search that grows exponentially with the security parameter, with expected search work proportional to 2^(λ/4) × N^(1/4), where N counts Boolean unknowns. Praxis, sections 1.2, 2 and 5
A quadratic arithmetic program expresses the checks as a polynomial identity. That lets Praxis represent its hidden table using factors of width two and use a pairing to combine them. Storing those factors takes less space than storing a basis for the whole matrix space. Weights and ties from an extension field constrain how an attacker can combine copies of the table. The extraction proof links a successful shortcut to finding a witness or solving Module-SIS, a lattice problem about finding a short nonzero relation in a structured system. Praxis, construction and extraction theorem
The paper encodes a Groth16 proof verifier on the BN254 pairing curve as quadratic equations in Boolean variables. The encryptor fixes the verification key and public inputs. The decryptor supplies an accepting proof and values from running the verifier. One setup for a universal circuit can support different programs within fixed size and execution bounds. Once a proof exists, the witness-encryption cost depends on the verifier's size. Producing that proof is separate work and depends on the program. The paper uses the SP1 6.1.0 verification key to size its verifier and reports checking its arithmetic bounds and testing the encoder against independent verifier implementations. Praxis, section 6.1, SP1 6.1.0, SP1 security model
At the authors' 100-bit target, the calculated compressed ciphertext is 7.88 GiB. Encryption costs about 2^34.2 base-field multiplications. Decryption costs about 2^33.0 base-field multiplications on average in the reported comparison, which uses a witness with roughly half its bits set. Field additions add work. The paper's streaming algorithms budget 12.35 GB for encryption precomputation tables and 5.28 GB plus a directory for the decryption search table. The authors derive these figures from the algorithms. The introduction describes laptop execution in seconds, but the paper provides no end-to-end timings, hardware specifications or measured memory use to substantiate that claim. Praxis, concrete cost analysis
For the same Groth16 statement, 100-bit key and 100-bit target, Table 1 gives lower bounds for Hair and Sahai's basic construction (theorem 5.1) of 1.1 × 10^11 GiB, 2.6 × 10^20 encryption multiplications and 1.2 × 10^16 expected decryption multiplications. Appendix C gives 7.0 × 10^11 GiB, 1.5 × 10^21 and 4.5 × 10^17 for their main construction from theorem 6.1. These imply over ten orders of improvement in size and encryption for both, and over six and seven orders respectively in decryption. The authors retune the baselines for concrete hiding security and credit them with faster arithmetic and search. The comparison omits point decompression on both sides. An extraction result covers an earlier basic construction, while the paper checks hiding at the retuned settings. An extraction proof for the main construction remains open. Praxis, table 1 and appendix C, Campanelli extraction note
The proof models group elements as randomly encoded labels accessed through group and pairing operations. It also treats the hash functions as ideal random oracles. Real encodings and hashes can have properties those models omit. The authors estimate a known attack on BN254's pairing target group at roughly 2^103 operations. They estimate the selected Module-SIS instance at 2^103.5, but their reduction takes about 2^108 work against a 2^100 attacker, before polynomial lifting costs. The 100-bit figure is a concrete target informed by known attacks, with a stated gap in what the reduction alone certifies. A 128-bit target would nominally add a factor of 2^28 in attack work. Increasing the search parameter alone cannot raise BN254 to that target. Quantum algorithms for discrete logarithms also rule out treating the pairing-based instantiation as post-quantum. Praxis, security and verification analysis, NIST security-strength guidance
Groth16 needs a setup for its circuit. Parties can reuse the resulting public parameters for that circuit, including across programs within a fixed universal circuit's bounds. A different circuit requires its own circuit-specific parameters. Someone who retains the setup trapdoor can forge accepting proofs and decrypt ciphertexts tied to that key. Praxis's own setup is deterministic and has no secret trapdoor. Using recursive proofs like SP1's in a deployment would add a knowledge-soundness assumption identified in the paper. Groth16 paper, Praxis, section 6.1
The published Lean 4 source defines correctness and extraction for the abstract quadratic systems at its chosen parameters, with 256-bit messages and seeds and a different key derivation from the paper's 100-bit cost example. It also proves a more general mathematical lemma used in extraction. The repository reports kernel checks with Lean's three standard classical axioms. The games build in the ideal group and hash models, and extraction keeps the Module-SIS solver's success probability explicit. The checked game bounds group-oracle calls below 2^100 and each random oracle at 2^100 queries. Groth16 verifier encoding, actual BN254 security and production software lie outside that proof. The authors disclose using Claude and GPT for research, text and proofs, including the Lean code. We found no public independent audit of Praxis. For comparison, Monero's FCMP++ research coverage describes separate proof and code review scopes for Generalized Bulletproofs. Praxis Lean source, Praxis, section 6.4 and acknowledgments
Bitcoin can require signatures and impose a delay measured from an earlier transaction. Monero has no general-purpose transaction scripting, so the protocol described by Philipp Hoenisch and Lucas Soriano del Pino puts the timed branches on Bitcoin. The traders lock XMR to a spend key assembled from two secret shares. Before funding, they check cross-curve discrete-log equality proofs, which establish that a public share on Bitcoin's curve and one on Monero's curve represent the same secret scalar. They also exchange the signatures needed for recovery. Swap paper, transaction paths and key setup
An adaptor signature is a verifiable incomplete signature. Completing it requires a secret. Once the completed Bitcoin signature appears, the other trader can compare it with the incomplete version to recover that secret and combine the two Monero spend shares. If the normal path stalls, a relative timelock makes a cancel transaction available. The Bitcoin refund signature reveals the other share so the Monero funder can reclaim XMR. A later penalty path handles an inactive Bitcoin funder, and missed deadlines can leave XMR locked. Software needs reliable chain access and must act within those windows. Swap paper, section 3.2
Monero announced working swap software in 2021. BasicSwap and eigenwallet already offer BTC–XMR swaps. Our atomic-swap guide covers their coordination, deadlines and wallet backups. We also follow BasicSwap's Monero updates. Monero's announcement

Praxis gives a way to express richer conditions for releasing an encrypted secret. One hypothetical swap could release an XMR key share or a presigned transaction when a proof establishes that the Bitcoin payment went to the agreed recipient and reached a specified confirmation depth. A trader could then obtain the secret without another message from the encryptor, provided the trader could build the proof and fetch the ciphertext. Trade matching, funding, correct secret delivery and recovery would still need coordination. A protocol must also show that the encryptor put the promised secret inside and that an observer who can generate the same proof cannot divert the funds.
A circuit can verify inclusion in a supplied chain history. The protocol needs a trusted starting point or a way to validate earlier blocks, plus a rule for judging cumulative work and confirmation depth. A reorganization can invalidate the payment after decryption, but it cannot make a released key secret again. Missing block data, censorship or slow proof generation can push settlement past the refund deadline. A complete design must show who can claim or refund on each chain when the other trader disappears and what happens when a refund races a late claim. Both chains would still validate ordinary spends under their own rules.
Praxis cites Leona Hioki's earlier proposal to use witness encryption for a Bitcoin bridge controlled by Ethereum state. That is a research proposal for proof-conditioned release in a different setting. For a decentralized exchange, proofs might let a trader establish a settlement condition without revealing all the underlying transaction data, but public inputs, proof access and timing could still link trades. Either design has to specify who can generate the witness, where to get the data and which details remain private. Praxis, introduction, Hioki's bridge proposal
A prototype needs public settlement and refund rules that independent cryptographers can review. Benchmarks on named hardware would have to include proof generation, encryption, transfer and decryption. It would need to exercise reorgs, offline traders and delayed broadcasts on test networks. Nearly 8 GiB per ciphertext makes distribution and recovery hard even when a wallet can stream it. Today's adaptor swaps tie secret release to signatures the wallets already exchange and transactions they already watch. Praxis expands the conditions a future swap could express. For Monero, the open question is which condition would improve a trade enough to justify the added setup, proof and data costs.