[NUT-13] V2 keysets use legacy BIP32 derivation instead of HMAC-SHA256 — cross-wallet restore broken
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go
- Domain
- cryptography
Research direction
The payload names no source files, so start by locating the NUT-13 derivation code for V2 (01) keysets and the restore loop in the repository. First confirm whether the BIP32-vs-HMAC-SHA256 mismatch still reproduces on upstream main, since the issue says this was not re-verified. Done means V2 keysets derive secrets with Cashu_KDF_HMACSHA256 per NUT-13, the restore loop uses continue on unit mismatch, and the counter no longer over-increments.
Written by the indexing model from the issue text.
Description
Migrated from Amperstrand/tollgate-module-basic-go#82 as part of the fork retirement — OpenTollGate/tollgate-module-basic-go is the single source of truth; the fork issue carries the original discussion and any lab evidence. Retirement plan: #758.]
NUT-13 deterministic secrets: V2 (01) keysets use BIP32 path instead of mandated HMAC-SHA256 Cashu_KDF_HMACSHA256. This breaks cross-wallet restore from nutshell/cdk/cashu-ts for V2 keysets.
Additional restore loop bugs:
breakon unit mismatch (shouldcontinue)- Counter over-increment
Legacy BIP32 is implemented correctly for V1 keysets, but V2 must use HMAC-SHA256 per spec.
Fix: Implement HMAC-SHA256 derivation for V2 keysets; fix restore loop logic.
Evidence: /home/ubuntu/src/tollgate_audit_report_2026-08-26.md §6, line 103; §7
Section reference: /home/ubuntu/src/tollgate_audit_report_2026-08-26.md §6
Migrated 2026-10-09. Applicability to current upstream main (4614ac2, post-rc1) was not re-verified during migration — confirming whether the finding still reproduces upstream is this issue's first task.
- Dominant language
- Go
- Stars
- 12
- Forks
- 14
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 240
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenTollGate/tollgate-module-basic-go
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenTollGate/tollgate-module-basic-go#833 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OpenTollGate/tollgate-module-basic-go#813 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenTollGate/tollgate-module-basic-go#804 ·
Maintainers usually reply within 1 day
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)Possibly taken @Amperstrand claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#726 · 2 comments ·
Maintainers usually reply within 1 day
-
rebrand-literal-gutter: uhttpd section-vocabulary check trips on a COMMENT (uhttpd.luci in 92-tollgate-admin-setup:178)Possibly taken @Amperstrand claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#723 ·
Maintainers usually reply within 1 day
All issues in OpenTollGate/tollgate-module-basic-go
Similar issues
-
Action Required: Fix Renovate ConfigurationPossibly taken @thompson-tomo claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 78/100
open-telemetry/opentelemetry-collector#16170 ·
Maintainers usually reply within 1 day
-
automation awf compiler specifications
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
state:triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
puppe1990/amarra-cais#342 ·
Maintainers usually reply within 1 day
-
replay: a run cancelled during environment setup is logged as an ERROR (Instrument drops the cancellation)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day