Skip to content

NUT-20: harden mint quote signature (breaking) + NUT-04 UUIDv7 quote ids#379

Closed
robwoodgate wants to merge 7 commits into
cashubtc:mainfrom
robwoodgate:feat/mint-quote-sig-versions
Closed

NUT-20: harden mint quote signature (breaking) + NUT-04 UUIDv7 quote ids#379
robwoodgate wants to merge 7 commits into
cashubtc:mainfrom
robwoodgate:feat/mint-quote-sig-versions

Conversation

@robwoodgate

@robwoodgate robwoodgate commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • NUT-20 — replaces the quote || B_0 || ... || B_(n-1) signature message with a domain-separated, length-framed, amount-committing msg_to_sign. Breaking change: mints no longer accept the legacy message. The message does not commit the keyset id (so a wallet can re-target a rotated keyset, mirroring SIG_ALL).
  • NUT-04quote ids MUST be a UUIDv7.
  • NUT-29 — each locked quote is signed independently per NUT-20 over the consolidated outputs; mixed-method batches are rejected.
  • tests/20-test.md — hardened-message test vector.

Motivation

The legacy message doesn't commit output amounts and has ambiguous field boundaries across keyset curves. We chose a clean breaking change over a versioned migration because locked mint quotes have ~no production use and NUT-29 batch minting isn't fully released yet; wallets handle the transition as needed.

Relationship to other work

Stacked on #375 (NUT-29 batch minting) — the diff includes its commits until it merges.

@github-project-automation github-project-automation Bot moved this to Backlog in nuts May 26, 2026
@robwoodgate robwoodgate marked this pull request as ready for review May 26, 2026 15:27
@robwoodgate robwoodgate marked this pull request as draft May 26, 2026 15:54
@robwoodgate robwoodgate force-pushed the feat/mint-quote-sig-versions branch from 8d9361b to 22e5bf2 Compare May 26, 2026 17:28
@robwoodgate robwoodgate changed the title Add mint quote version field — v0 (legacy) / v1 (hardened NUT-20 signature, UUIDv7) NUT-20: harden mint quote signature (breaking) + NUT-04 UUIDv7 quote ids May 26, 2026
…7 quote ids

Replace the legacy `quote || B_0 || ... || B_(n-1)` mint-quote signature message
with a domain-separated, length-framed, amount-committing `msg_to_sign`. This is a
breaking change: mints no longer accept the legacy message. The message does not
commit the keyset `id`, so a wallet can re-target a rotated keyset without a new
signature.

- NUT-04: quote ids MUST be a UUIDv7.
- NUT-20: define the hardened `msg_to_sign` (replaces the concatenation).
- NUT-29: each locked quote is signed independently per NUT-20 over the
  consolidated outputs; mixed-method batches are rejected.
- tests/20-test.md: hardened-message test vector.
@robwoodgate robwoodgate force-pushed the feat/mint-quote-sig-versions branch from 22e5bf2 to 37e4a02 Compare May 26, 2026 18:08
@robwoodgate

Copy link
Copy Markdown
Contributor Author

Re-targeted onto the NUT-29 branch (#375) so it can be merged directly into that PR: a1denvalu3#3. Closing this in favour of that.

@github-project-automation github-project-automation Bot moved this from Backlog to Done in nuts May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants