View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012267 | Taler | exchange | public | 2026-11-21 10:28 | 2026-11-21 22:40 |
| Reporter | bot-oec [agent] | ||||
| Implementer | oec | ||||
| Priority | high | Severity | minor | ||
| Status | implementing | ||||
| Target Version | 1.7 | ||||
| Summary | 0012267: A melt replay is refused once a fresh denomination expired or was revoked, instead of returning the stored cut-and-choose index | ||||
| Description | A replayed melt should be looked up by its commitment before the denomination checks, so that it returns the same cut-and-choose index `γ` even after a fresh denomination expired or was revoked. `taler-exchange-httpd_post-melt.c` computes the commitment `rc` only after `phase_check_keys`, so such a replay is answered with `DENOMINATION_EXPIRED` or `DENOMINATION_REVOKED`. The wallet can still read `γ` from the coin history. **Steps to reproduce:** 1. Melt a coin: 200. 2. Replay the melt: 200, the same `γ`. 3. Revoke the fresh denomination. 4. Replay the identical request again: expected 200 with the stored `γ`, gets `410 Gone`. The test uses a new testing command, `TALER_TESTING_cmd_melt_replay`, which sends an earlier melt's request again unchanged. For CS it passes the blinding values of the first melt to the library (`TALER_EXCHANGE_post_melt_set_blinding_values`, new): otherwise the library asks `/blinding-prepare` first, which refuses the revoked denomination before the melt is sent. The test `src/testing/test_exchange_api_melt_replay.c` does this; it fails on master at step 4 (expects 200 with the stored `γ`, gets 410). The test will be on branch `dev/oec/formalization-findings` on git.taler.net; a note here will name the commit. **Proposed fix:** compute the commitment in the replay lookup (`melt_is_idempotent`, for the errors that require it), in the current and the legacy form, through a helper shared with `phase_check_coin_signature`. With it the test passes for CS and RSA; `test_exchange_api_{cs,rsa}` and the CS revocation and age-restriction tests still pass. **Found by:** the formalization of the Taler protocols; the rule violated is (E1) in `spec/refresh.md`: the replay lookup by commitment comes before the denomination checks, so a replay returns the same index even after a fresh denomination expired or was revoked. | ||||
| Tags | No tags attached. | ||||
| Test: branch `dev/oec/formalization-findings` of exchange.git (git.taler.net), commit eaef42e47481 "testing: melt replay after expiry or revocation (0012267)", on master 7b658d8da. test_exchange_api_melt_replay_{cs,rsa} replays a melt after a fresh denomination was revoked: expected 200 with the stored cut-and-choose index, gets 410. The replay sends the blinding values of the first submission, as a wallet does: new TALER_EXCHANGE_post_melt_set_blinding_values() and the testing command TALER_TESTING_cmd_melt_replay. Fails on master at melt-replay-after-revocation. | |
| Wallet test: branch `dev/oec/formalization-findings` of taler-typescript-core (git.taler.net), commit 46b93b9945c2 "harness: melt replay after the fresh denominations were revoked (0012267)", on wallet-core master 908b0b1b5 with exchange master 7b658d8da; run it with `taler-harness run-integrationtests refresh-melt-replay-revoked`. test-refresh-melt-replay-revoked refreshes a coin of TESTKUDOS:10 through a fault-injecting proxy. The exchange executes the melt; the proxy then revokes the melt's fresh denominations and replaces the response with a transient error (503), so the wallet repeats the melt. The replay must get the stored cut-and-choose index (200), and after all recoups the wallet may have lost no more than fees. With exchange master 7b658d8da the replay gets 410; the wallet then melts the coin with other denominations and gets 409, the coin being melted already, and ends the refresh as done. Of TESTKUDOS:19.84 the wallet keeps TESTKUDOS:8 after the recoups. With the exchange answering the replay as a replay (the fix proposed in the issue) the test passes and the wallet keeps TESTKUDOS:19.68. Addition to the issue's description: as the test shows, a wallet whose melt response is lost while the fresh denominations are revoked loses the melted coin's value. | |
| Proposed fix on branch dev/oec/fix-12267 (exchange, on master ba48fdeac): - 8a00aecbe testing: melt replay after expiry or revocation - 50dcf4a55 exchange: answer melt replays also after expiry or revocation The commitment computation of phase_check_coin_signature moves into a helper, compute_commitment (current and pre-#11862 form). melt_is_idempotent uses it, so a replay is found also when the error came from a check before the commitment was computed (expired or revoked fresh denomination). test_exchange_api_melt_replay_{rsa,cs}, test_exchange_api_{rsa,cs}, test_exchange_api_revocation_{rsa,cs} and test_exchange_api_age_restriction_{rsa,cs} pass. | |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-21 10:28 | bot-oec | New Issue | |
| 2026-11-21 10:28 | bot-oec | Implementer | => oec |
| 2026-11-21 10:28 | bot-oec | Reviewer | => Christian Grothoff |
| 2026-11-21 10:28 | bot-oec | Release signed by | => Christian Grothoff |
| 2026-11-21 10:28 | bot-oec | Deployed by | => Christian Grothoff |
| 2026-11-21 10:28 | bot-oec | Verifier | => oec |
| 2026-11-21 10:28 | bot-oec | Communicator | => CM_7 |
| 2026-11-21 10:47 | bot-oec | Note Added: 0030668 | |
| 2026-11-21 11:41 | bot-oec | Note Added: 0030691 | |
| 2026-11-21 16:13 | oec | Implementer | oec => |
| 2026-11-21 22:32 | bot-oec | Note Added: 0030706 | |
| 2026-11-21 22:40 | Christian Grothoff | Implementer | => oec |
| 2026-11-21 22:40 | Christian Grothoff | Priority | normal => high |
| 2026-11-21 22:40 | Christian Grothoff | Status | new => implementing |
| 2026-11-21 22:40 | Christian Grothoff | Target Version | => 1.7 |
| 2026-11-21 22:40 | Christian Grothoff | View Status | private => public |