View Issue Details

IDProjectCategoryView StatusLast Update
0012240Talerdocumentationpublic2026-11-29 15:59
Reporterbot-oec [agent]  
PrioritynormalSeveritytext 
Status new 
Summary0012240: P2P payments: the payment URI does not bind the purse, so the exchange can present a purse of its own
Description`taler://pay-push/{exchange}/{contract.priv}` and `taler://pay-pull/…` carry only `contract.priv`. The wallet fetches `GET /contracts/{contract.pub}` and decrypts with `ECDH(contract.priv, purse.pub)`. That key can be computed from `contract.pub` by anyone with a purse key, so whoever answers the request (the exchange) can present a purse of its own, with a contract encrypted to `contract.pub`; `econtract_sig` is made by that purse's key and verifies.

For a push payment, the payee accepts and merges a purse the payer never offered; no value is lost (the payer's purse is refunded on expiry), but which contract the payee accepts rests on the exchange. For a payment request (pull), the payer pays into a purse the payee never created, and the payment goes to whoever owns that purse. This is the contract-substitution concern of design document 013, "Refinements", with the exchange alone.

The ProVerif model `models/proverif/purse.pv` finds both traces (PU8 in `spec/p2p.md`).

**Proposed change:** put a short commitment to the purse into the URI, for example a truncated `H(purse.pub)`, long enough that second preimages stay infeasible; with it the payee accepts only the offered purse (ProVerif `models/proverif/purse-bound.pv`). Or derive `contract` from a secret the URI carries together with the purse binding. Otherwise, document the trust in the exchange.

**Found by:** the formalization of the Taler protocols; the ProVerif model of purses (`purse.pv`), against PU8 in `spec/p2p.md`.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0012243 closed P2P payments: the format of the encrypted contract, and that a push URI is a bearer instrument, are not documented 

Activities

bot-oec [agent]

2026-11-21 23:38

reporter   ~0030739

Proposed patch, the interim part (taler-docs master b3970cce): document the trust in the exchange at GET /contracts. The protocol fix needs a decision: put a short commitment to the purse into the URI, for example a truncated H(purse_pub) long enough that second preimages stay infeasible, which the wallet compares with the purse_pub it gets (ProVerif models/proverif/purse-bound.pv in the formalization proves the binding); or derive the contract key from a secret the URI carries together with the purse binding. Either changes the URI format (wallets and the taler URI specification).

diff --git a/core/exchange/get-contracts-CONTRACT_PUB.rst b/core/exchange/get-contracts-CONTRACT_PUB.rst
index eeab6f3a..693cb1c1 100644
--- a/core/exchange/get-contracts-CONTRACT_PUB.rst
+++ b/core/exchange/get-contracts-CONTRACT_PUB.rst
@@ -2,6 +2,14 @@
 
   Obtain P2P contract associated with the given contract public key.
 
+ A ``taler://pay-push/`` or ``taler://pay-pull/`` URI carries only the
+ contract's private key. The client cannot check that the purse returned
+ here is the one the other party created: anyone with a purse key can
+ encrypt a contract to ``$CONTRACT_PUB`` and sign it, so the client trusts
+ the exchange to return the right purse. For a payment offer (push) a wrong
+ purse costs no value, but decides which contract the payee accepts; for a
+ payment request (pull) the payer pays into the purse the exchange returns.
+
   **Response:**
 
   :http:statuscode:`200 Ok`:

Issue History

Date ModifiedUsernameFieldChange
2026-11-21 10:27bot-oecNew Issue
2026-11-21 10:27bot-oecImplementer => mikolai
2026-11-21 10:27bot-oecReviewer => Stefan
2026-11-21 10:27bot-oecRelease signed by => Antoine A
2026-11-21 10:27bot-oecDeployed by => Stefan
2026-11-21 10:27bot-oecVerifier => mikolai
2026-11-21 10:27bot-oecCommunicator => CM_7
2026-11-21 15:56oecImplementermikolai =>
2026-11-21 15:56oecReviewerStefan => Florian Dold
2026-11-21 15:56oecRelease signed byAntoine A => Florian Dold
2026-11-21 15:56oecDeployed byStefan => Florian Dold
2026-11-21 15:56oecVerifiermikolai => Florian Dold
2026-11-21 22:44Christian GrothoffSeveritymajor => text
2026-11-21 23:38bot-oecNote Added: 0030739
2026-11-29 15:59Christian GrothoffView Statusprivate => public