View Issue Details

IDProjectCategoryView StatusLast Update
0012269Talerexchangepublic2026-11-21 22:42
Reporterbot-oec [agent]  
Implementeroec  
PriorityhighSeveritymajor 
Status implementing 
Target Version1.6 
Summary0012269: The coin history has no entry with the blinded signatures of a reveal
DescriptionFor the owner of an old coin to recover the fresh coins of its melts, the first correct reveal has to append an entry with the blinded signatures of the revealed batch `γ` (for Clause-Schnorr also the R-values) to the old coin's history. The exchange follows protocol v46 as documented, which provides these signatures nowhere.

Commit `5d5e2ef86` ("coin history: no ev_sigs in MELT entries", 0011916) removed the field `ev_sigs` from the history handler and from `get_coin_transactions.c`, where it was returned only for revealed melts (`CASE WHEN revealed THEN denom_sigs`).

A revert of `5d5e2ef86` is not a fix. Its server-side part (history handler, `exchangedb/get_coin_transactions.c`, `free_coin_transaction_list.{c,h}`, `test_coin_history.c`) applies without conflicts and puts `ev_sigs` back into the `MELT` entry of revealed melts, while `test_exchange_api_{cs,rsa}` and `test_coin_history` still pass. But the reveal adds no `coin_history` row: the melt inserts that row (`refresh_insert_trigger`, `0002-refresh.sql`), while the reveal only sets `refresh.revealed`. The ETag is the largest `coin_history_serial_id`, and a request with `start` returns only entries after that offset. So a client that read the history between melt and reveal gets `304 Not Modified`, or no entries after its offset, and never learns the signatures.

**Steps to reproduce:**

1. Melt a coin.
2. Read the old coin's history.
3. Reveal.
4. Read the entries after the offset of step 2: expected a `REVEAL` entry with the melt's `rc` and one blinded signature per fresh coin, gets no entries (also with `5d5e2ef86` reverted).

The test `src/testing/test_exchange_api_history_reveal.c` does this; it fails on master at step 4 (expects a `REVEAL` entry, gets no entries after the offset). The test will be on branch `dev/oec/formalization-findings` on git.taler.net; a note here will name the commit.

**Proposed fix:** in the reveal transaction, when `refresh.revealed` turns true, insert a `coin_history` row for the reveal (a migration); serve it as a `REVEAL` entry with `rc` and the signatures (and, for CS, the stored `cs_r_values`); parse it in the client library. The ETag and `start` then advance with the reveal.

For Clause-Schnorr denominations, the signatures are enough only if the exchange also checks that each envelope's nonce is the one derived from the blinding seed (it does not today). The owner must also be able to obtain the R-values: from `/blinding-prepare` while the denomination is valid, or from `cs_r_values` in the history entry.

**Found by:** the formalization of the Taler protocols; the rule violated is (E2) in `spec/refresh.md` and (E1) in `spec/history.md`: the first correct reveal appends an entry with the blinded signatures of the revealed batch (for CS also the R-values) to the old coin's history.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0012264 reviewing Clause-Schnorr planchets are signed under the nonce the client chose; a repeated nonce exposes the denomination private key 

Activities

bot-oec [agent]

2026-11-21 10:47

reporter   ~0030669

Test: branch `dev/oec/formalization-findings` of exchange.git (git.taler.net), commit ed8f69fdf82b "testing: reveal entry in the coin history (0012269)", on master 7b658d8da.

test_exchange_api_history_reveal_{cs,rsa} melts a coin, reads its history, reveals, and reads the entries after the first read: expected a REVEAL entry with the melt's rc and one blinded signature per fresh coin, gets no entries.

The client half of the proposed entry comes with the test: the type TALER_EXCHANGE_CTT_REVEAL and its parser in libtalerexchange (a REVEAL entry carries rc and ev_sigs, no amount), and the testing commands TALER_TESTING_cmd_coin_history_mark and TALER_TESTING_cmd_coin_history_reveal_entry.

Fails on master at history-reveal-entry.

bot-oec [agent]

2026-11-21 12:27

reporter   ~0030693

Fix proposed for review: exchange branch dev/oec/fix-12236, commits d5d94bac8 (the test of the note above, with the client parser for the new entry) and ca11dae16 (the REVEAL entry: trigger on refresh_reveal in migration exchange-0021, transaction list, GET /coins/$COIN_PUB/history, auditor checks, database tests). test_exchange_api_history_reveal_{cs,rsa} passes; the protocol side is #12236.

Issue History

Date ModifiedUsernameFieldChange
2026-11-21 10:28bot-oecNew Issue
2026-11-21 10:28bot-oecRelationship addedrelated to 0012264
2026-11-21 10:28bot-oecImplementer => oec
2026-11-21 10:28bot-oecReviewer => Christian Grothoff
2026-11-21 10:28bot-oecRelease signed by => Christian Grothoff
2026-11-21 10:28bot-oecDeployed by => Christian Grothoff
2026-11-21 10:28bot-oecVerifier => oec
2026-11-21 10:28bot-oecCommunicator => CM_7
2026-11-21 10:47bot-oecNote Added: 0030669
2026-11-21 12:27bot-oecNote Added: 0030693
2026-11-21 16:14oecImplementeroec =>
2026-11-21 22:31Christian GrothoffLocked by => Christian Grothoff
2026-11-21 22:31Christian GrothoffStatusnew => planning
2026-11-21 22:31Christian GrothoffImplementer => oec
2026-11-21 22:31Christian GrothoffPrioritynormal => high
2026-11-21 22:31Christian GrothoffTarget Version => 1.6
2026-11-21 22:31Christian GrothoffLocked byChristian Grothoff =>
2026-11-21 22:31Christian GrothoffStatusplanning => implementing
2026-11-21 22:42Christian GrothoffView Statusprivate => public