Skip to content

NUT-10: Taproot secrets (v3 keysets) - #421

Open
robwoodgate wants to merge 2 commits into
cashubtc:bls-protocolfrom
robwoodgate:taproot-secrets
Open

NUT-10: Taproot secrets (v3 keysets)#421
robwoodgate wants to merge 2 commits into
cashubtc:bls-protocolfrom
robwoodgate:taproot-secrets

Conversation

@robwoodgate

@robwoodgate robwoodgate commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Implementations

These are Proof of concept implementations.

Summary

Formalizes taproot secrets, the secret family for v3 (BLS) keysets, as version-scoped additions to the existing NUTs rather than a new NUT.

The core expands NUT-10: secrets are compressed secp256k1 points, bare or tweaked BIP341-style over a tree of declarative condition leaves (threshold, after, hashlock); a shared TLV grammar; the transaction transcript that every v3 input signs; key path and script path witnesses; spend info for transfer; and receive-time verification. Full design rationale lives in the discussion draft and is deliberately kept out of the spec text.

Per-NUT deltas:

  • NUT-00: v3 secret bytes for hash_to_curve_G1; secret uniqueness stated on the Proof model; si shown in the V4 token format.
  • NUT-03/05: every v3 input carries a witness over the transaction transcript; transactions mixing keyset versions verify per input.
  • NUT-04: v3 mint quotes are always locked and enter the transaction as inputs, signing via the existing signature field. NUT-29: a batch is one transaction, one digest.
  • NUT-11/14/20: scoped to pre-v3 keysets.
  • NUT-13: the v3 secret branch derives a private key (rejection sampling against SECP256K1_N); per-purpose derivation paths are superseded for v3.
  • NUT-18/26: the taproot payment request option (k, l, b), carried in creqB under new TLV tag 0x0b.
  • NUT-28: the blinding core applied one layer down: positional sender slots, receivers matching by value, verbatim NUMS bases.

Test vectors

New tests/10-tests.md (leaf forms, tree folds, worked derivations, transaction transcripts with signatures, V4 tokens with spend info) plus additions to the NUT-13/18/26/28 vectors. Every value is produced by one of two independent implementations (cashu-ts and nutshell) that pass a shared integration suite against each other, and the tree, tweak, and transcript values were re-derived independently during review.

Stacking

Builds on #371 (BLS12-381 v3 keyset protocol). The PR is based on bls-protocol (#371's content with current main merged in), so the diff here is the taproot change alone. Once #371 merges to main, this retargets to main and the stack base branch can be deleted.

Defines the v3 secret family: point secrets with conditions committed
into the key (a BIP341-style tree of declarative leaves), one
transaction transcript that every input signs, key and script path
witnesses, spend info for transfer, and receive-time verification.

Existing NUTs gain version-scoped deltas: NUT-00 (secret bytes, secret
uniqueness, si in the V4 format), NUT-03/05 (v3 inputs witness the
transcript), NUT-04 (v3 quotes are locked transaction inputs), NUT-29
(a batch is one transaction), NUT-11/14/20 (scoped to pre-v3 keysets),
NUT-13 (v3 secret key branch), NUT-18/26 (the taproot payment request
option, TLV tag 0x0b), NUT-28 (the blinding core one layer down: slot
map, value matching, verbatim NUMS bases).

Adds tests/10-tests.md and extends the NUT-13/18/26/28 vectors; all
values are produced and cross-verified by two implementations.
@github-project-automation github-project-automation Bot moved this to Backlog in nuts Aug 11, 2026
@robwoodgate
robwoodgate changed the base branch from main to bls-protocol August 11, 2026 16:22
The NUT-13 V3 vectors are re-derived under the framed keyset id,
keeping the secret-key semantics, and the NUT-10 transcript and token
vectors are realigned with the regenerated shared vector file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant