Skip to content

NUT-11: Add SigAllSigningPackage transport format for multi-party SIG_ALL signing - #345

Open
KvngMikey wants to merge 4 commits into
cashubtc:mainfrom
KvngMikey:sigall_package
Open

NUT-11: Add SigAllSigningPackage transport format for multi-party SIG_ALL signing#345
KvngMikey wants to merge 4 commits into
cashubtc:mainfrom
KvngMikey:sigall_package

Conversation

@KvngMikey

@KvngMikey KvngMikey commented Feb 23, 2026

Copy link
Copy Markdown
Member

Closes #319

Adds a SigAllSigningPackage section to NUT-11 defining the wallet-led
transport format for coordinating multi-party SIG_ALL signing.

Implementations:

Defines:

  • The SigAllSigningPackage shape, using existing NUT types (BlindedMessage)
  • Serialization format: fixed key-order JSON → base64url → sigallA prefix
  • A concrete worked example with full serialized sigallA string for
    implementation verification, added to tests/11-test.md

Signing logic, merge behaviour, and coordination flow are intentionally omitted as implementation detail.

Related: [SigAll Signing Package -> cashubtc/cashu-ts/pull/485]

@robwoodgate robwoodgate left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this approach to #318 - great work. Have left a couple of suggestions to tighten things up, otherwise great!

Comment thread tests/11-test.md Outdated
Comment thread 11.md Outdated
Comment thread 11.md Outdated
Comment thread 11.md Outdated
Comment thread 11.md
robwoodgate
robwoodgate previously approved these changes Feb 23, 2026

@robwoodgate robwoodgate left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @KvngMikey.

@robwoodgate robwoodgate left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old signing format (without amount binding) is insecure, so we should get rid of it, and with the proposed MTS change in #404, the digests naming falls apart. So better to calculate based on current MTS from the package than relying on a pre-computed digest

Comment thread tests/11-test.md Outdated
Comment thread 11.md Outdated
Comment thread tests/11-test.md Outdated
Comment thread 11.md Outdated
@robwoodgate
robwoodgate dismissed their stale review August 10, 2026 17:32

Changes requested

Copilot AI lite review requested due to automatic review settings August 11, 2026 13:45
@KvngMikey

Copy link
Copy Markdown
Member Author

@robwoodgate - I removed digests, I also added a normative sentence in its place requiring signers to derive the message themselves.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a wallet-to-wallet transport format (“SigAllSigningPackage”) to NUT-11 to support coordinating multi-party SIG_ALL signing, along with worked test vectors for implementer verification.

Changes:

  • Specify a SigAllSigningPackage JSON shape for swap/melt and describe a serialization scheme (sigallA prefix + base64url(JSON)).
  • Add a concrete worked example and serialized sigallA... test vector to tests/11-test.md.
  • Add a [tests] reference link from 11.md to the test vectors.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
11.md Defines the SigAllSigningPackage structure and its serialization format, plus a sample serialized string and link to vectors.
tests/11-test.md Adds worked example inputs/outputs and a full serialized sigallA... string as an implementation test vector.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread 11.md
Comment thread 11.md Outdated
The digests object is computable from the rest of the package, so
carrying it added nothing a signer could not derive itself. Worse, a
signer that trusts a supplied digest signs a message it has never
checked against the transaction it is approving.

The legacy entry hashed the pre-amount-binding format (secret||C||B_),
which NUT-11 no longer specifies. Without amount binding a signature
commits to which blinded outputs exist but not to their values, letting
amounts be reordered across outputs while the signature and the mint's
balance check both still pass. Carrying that digest gave a superseded
format renewed standing.

The current entry hashed today's aggregation format, a label that goes
stale the moment the message format changes (see cashubtc#404). Dropping both
leaves the package independent of any aggregation scheme.

Adds a normative requirement that signers derive the message to sign
from the package contents themselves, and regenerates the sigallA
vector without digests.

Also clarifies the witness encoding. NUT-11 defines Proof.witness as a
serialized JSON string, but the package schema showed witness as a JSON
object without saying which representation applied. An implementer
could serialize it before putting it in the package, or pass the
package's object straight into Proof.witness; both parse as valid JSON
and fail only later. The object form is correct and is what the vector
already encodes, so this documents the field rather than changing it.
The accompanying note also states that inputs[].secret keeps the
representation it has in Proof.secret, since documenting only witness
invites the opposite mistake.

Addresses review feedback from @robwoodgate and Copilot. Serialized
vector matches the one pinned in cashubtc/cashu-ts#947.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

SIG_ALL for multi-party transactions

3 participants