View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012240 | Taler | specification | public | 2026-11-21 10:27 | 2026-11-29 18:44 |
| Reporter | bot-oec [agent] | ||||
| Implementer | Christian Grothoff | ||||
| Estimated effort (hours) | 8 | ||||
| Priority | normal | Severity | major | ||
| Status | implementing | ||||
| Target Version | 1.8 | ||||
| Summary | 0012240: 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`. | ||||
| Tags | No tags attached. | ||||
| Put to | Asked by | Status | Note |
|---|---|---|---|
| Florian Dold | Christian Grothoff | waiting for an answer | 30,957 |
A question is put to one person and moves the issue nowhere: it can be assigned, worked on and implemented with a question open, because whoever asked is the one who knows whether the answer still matters. Several may be open at once. The question itself is the note, so it is formatted, notified and in the record like everything else anybody said here.
| related to | 0012243 | closed | P2P payments: the format of the encrypted contract, and that a push URI is a bearer instrument, are not documented |
| 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`: | |
| This is actually a specification issue, not a documentation issue. We probably should replace contract_priv in the URL with the hash of the contract terms (which have a nonce). Then derive contract_priv from that hash, and after downloading the contract terms check that the hash matches the URL. Remains a single field, and fixes the contract. As P2P URLs can be floating around the Internet during the update, we need to be creative in how we signal the switch to the new semantics, maybe by making the hash of the contract terms a character longer than the private key when encoding it by prefixing some byte? | |
| Please review the high level design and approach. | |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-21 10:27 | bot-oec | New Issue | |
| 2026-11-21 10:27 | bot-oec | Implementer | => mikolai |
| 2026-11-21 10:27 | bot-oec | Reviewer | => Stefan |
| 2026-11-21 10:27 | bot-oec | Release signed by | => Antoine A |
| 2026-11-21 10:27 | bot-oec | Deployed by | => Stefan |
| 2026-11-21 10:27 | bot-oec | Verifier | => mikolai |
| 2026-11-21 10:27 | bot-oec | Communicator | => CM_7 |
| 2026-11-21 15:56 | oec | Implementer | mikolai => |
| 2026-11-21 15:56 | oec | Reviewer | Stefan => Florian Dold |
| 2026-11-21 15:56 | oec | Release signed by | Antoine A => Florian Dold |
| 2026-11-21 15:56 | oec | Deployed by | Stefan => Florian Dold |
| 2026-11-21 15:56 | oec | Verifier | mikolai => Florian Dold |
| 2026-11-21 22:44 | Christian Grothoff | Severity | major => text |
| 2026-11-21 23:38 | bot-oec | Note Added: 0030739 | |
| 2026-11-29 15:59 | Christian Grothoff | View Status | private => public |
| 2026-11-29 17:35 | Christian Grothoff | Implementer | => Christian Grothoff |
| 2026-11-29 17:35 | Christian Grothoff | Severity | text => major |
| 2026-11-29 17:35 | Christian Grothoff | Status | new => planning |
| 2026-11-29 17:35 | Christian Grothoff | Category | documentation => specification |
| 2026-11-29 17:35 | Christian Grothoff | Target Version | => 1.8 |
| 2026-11-29 17:35 | Christian Grothoff | Note Added: 0030956 | |
| 2026-11-29 17:35 | Christian Grothoff | Locked by | => Christian Grothoff |
| 2026-11-29 17:35 | Christian Grothoff | Status | planning => implementing |
| 2026-11-29 17:35 | Christian Grothoff | Note Added: 0030957 | |
| 2026-11-29 18:44 | Christian Grothoff | Estimated effort (hours) | => 8 |
| 2026-12-01 12:02 | Locked by | Christian Grothoff => |