Fair exchange of information: notes on a 2020 construction
Published November 30, 2026. Last updated November 30, 2026.
Publication history
- The manuscript, Hook Payments and Network, was completed on November 15, 2020 and first published on November 30, 2026. The original PDF is unmodified.
- It was written independently, with no advisor and no peer review.
- These notes were written in November 2026. The flaw described under Limitations was found in a review with an AI model and checked against the manuscript by a second one. Neither review is a substitute for peer review.
The construction
- The problem is exchanging data for a signed receipt. Neither is money, so a conditional payment cannot lock one to the other directly.
- The two-party exchange passes both through money. A forwarder first promises the receiver $X for a signed receipt. It then sends the data encrypted, with a zero-knowledge proof that the key decrypts it to the expected hash, and the receiver buys the key for the same $X. That key purchase is a zero-knowledge contingent payment, an existing protocol, run inside a payment channel. After buying the key, the receiver decrypts the data and reveals the signed receipt to reclaim $X. When both payments complete, their net transfer is zero.
- Each sale is an atomic conditional payment in a payment channel, and the two net to zero.
- The promise to buy the receipt exists before the receiver pays for the key. The receipt is a signature over a hash of the data, so a receiver who does not already know the data cannot produce it early. Once the receiver has paid, it needs nobody's cooperation to be made whole.
- This is an incentive to complete, not strict atomicity. A receiver who takes the data and withholds the receipt is out $X.
- The network version chains the same exchange along a path from sender to receiver that nobody knows in advance, in four passes:
- Forward. Each node adds its own key layer and promises the next node $X for the receipt.
- Backward. Each node promises the previous one a smaller amount for the keys it lacks. Each decrement is that node's fee.
- Forward. Keys are revealed, each claiming the payment ahead of it. Forwarders now hold their fees, paid out of the receiver's $X.
- Backward. The receiver decrypts and signs. The receipt passes back, each reveal claiming $X, until the sender has paid and the receiver is made whole.
- The receiver fronts the cost and the sender reimburses it on receipt. At each step, the party out of pocket holds the secret that ends its exposure.
- Two intended properties, as the manuscript argues them. Limitations covers where they fail.
- Each forwarder adds a key layer the receiver is meant to need, so that none can be cut out of the fee chain.
- Fees come out of a fixed $X, so that a node posing as several is meant to earn no more. This has not been analyzed under strategic fee setting.
Related work
- Before 2020:
- Fair exchange has been studied since the early 1980s, starting with protocols for exchanging secrets (Blum, 1981, published 1983). Without a trusted third party it is impossible in general (Pagnia and Gärtner, 1999, Technical Report TUD-BS-1999-02, Darmstadt University of Technology). Optimistic protocols call on the third party only when something goes wrong (Asokan, Shoup and Waidner, 1998).
- Zero-knowledge contingent payments (2011, first run 2016) sell data for payment against a proof of correctness. The manuscript cites them and uses one as a building block, for the key purchase in the two-party exchange. Unlike a sale, that exchange is meant to net to zero: the receiver reclaims the payment by revealing a signed receipt.
- Fairness with penalties (2014) has a party that aborts compensate the others. The incentive in the two-party exchange is related to this model.
- FairSwap (2018) sells data using proofs of misbehavior in place of zero knowledge, with a contract as judge.
- Anonymous multi-hop locks (circulated 2018, published 2019) have every hop add a secret to a payment lock, so none can be skipped.
- Lot49 (2019) pays relays only on delivery, unlocked by the destination's signature on the message, along a route the sender chooses.
- HOPR (2020) pays relays with probabilistic micropayments, redeemable through key-half swaps between neighbors.
- Since 2020:
- FairRelay (2024, with a journal version in 2026) pays relays through locks over an accumulating list of secrets, with each relay encrypting the payload. The path is known in advance and deposits sit on-chain.
- A targeted search did not find two things in the work above: a receiver-funded key purchase paired with a sender-funded refund, and both payment chains built along a path discovered during forwarding. The search was not exhaustive, and this is not a novelty claim.
Limitations
- Known flaw in the network version. A sender and receiver who share the payload key in advance get data delivered without paying anyone.
- Forwarders wrap the key, not the payload. The payload ciphertext travels the whole path unchanged.
- The sender can derive the key from a Diffie–Hellman secret with the receiver's public key. Its proof still verifies.
- The receiver decrypts on arrival and never starts settlement. Forwarders cannot detect it.
- This breaks the requirement in section 4.2 of the manuscript that the network cannot be used for free. The attack does not apply to the two-party exchange when an honest forwarder chooses the key itself.
- Early receipts. The receipt signs a hash of the data. A receiver who already knows the data or that hash can sign before settlement and collect $X without buying the keys. In the network version the sender pays and forwarders earn nothing. This applies to the two-party exchange as well.
- A fresh nonce inside the encrypted payload helps only if the receiver cannot learn it beforehand and it is bound to the delivery session. It does not help against a colluding sender.
- Free lock-up. Every node locks $X toward the receiver and up to $X back, on an unauthenticated request, and carries the payload before any payment is locked.
- Fee setting. The node next to the receiver names its fee first and can take almost all of $X.
- Receiver liquidity. The receiver must be able to lock $X toward its last hop. It pays nothing net, but it needs capital.
- Proof cost. The sender's proof covers the whole payload, so its cost grows with payload size. No benchmarks exist for this construction.
- Lock expressiveness. The receipt lock checks a signature over a revealed hash preimage. Bitcoin Lightning in 2020 could not express that; contract-based channels can.
- In the two-party version, the lock must commit to the hash the receipt signs without revealing it, and the proof must tie that commitment to the data. The manuscript does not specify this binding. Without it, a forwarder could offer a refund the receiver cannot claim. A commitment and one more constraint in the proof appear to fix it.
- Confidentiality. During settlement every forwarder learns the payload key while holding the ciphertext. The payload should be encrypted to the receiver before it enters the protocol.
- Timelocks. The manuscript does not specify them. The key pass and the receipt pass need opposite orderings along the path.
- Withheld receipts. The receiver or any forwarder can withhold the receipt at a cost of $X, leaving the sender without proof of a delivery that happened. Section 8.1 notes this.
Possible extensions
- Necessary property: the receiver's ability to recover the payload must depend on information that the forwarding nodes control and that the sender and receiver cannot have beforehand. Wrapping a sender-chosen key does not achieve this. One approach is for each forwarding node to encrypt the payload itself, at a cost proportional to payload size.
- Candidate repairs, all unverified:
- Proof per hop. Each forwarder re-encrypts the payload and proves it in zero knowledge. The receiver still verifies before locking funds, but proving cost scales with the payload at every hop.
- Fraud proofs. Each forwarder XORs a committed keystream into the payload and signs Merkle roots of its input and output. A mismatch gives the receiver a short proof against one hop. This needs slashable deposits and a dispute contract, and it is the approach FairRelay takes.
- Algebraic layering. Commutative encryption of group-encoded chunks, with a discrete-log equality proof per hop. No general proof system and no judge, at one curve operation per 31-byte chunk per hop. This is a sketch only.
- Not established: that payload encryption by each hop rules out other coalitions, such as a forwarder colluding with the receiver.
- Open questions:
- Can a network version pay forwarders only on delivery, charge the sender only on delivery, cost the receiver nothing net, work without a known path, and resist every coalition, all at once?
- Can the sender get proof of delivery that does not depend on the receiver choosing to sign (section 8.1)?
- Can forwarding pools form among nodes that do not trust each other (section 8.2)?
- Can unpaid attempts be priced, so that failed or malicious requests cannot tie up capital and bandwidth for free?
- How should fees be set when the path is only discovered during forwarding?
Personal note
I finished this manuscript in November 2020, shortly after graduating from Stanford. To the extent that I had a focus within computer science, it was complexity theory, cryptography and cryptocurrencies.
This year, AI systems have produced new results in mathematics, complexity theory, and cryptography, including an announced refutation of the Exponential Time Hypothesis. The era of human-made proofs and constructions, as we have known it, is likely coming to an end.
Six years later, this seems as good a time as any to finally make it public.