Skip to content

Preparation for Keyset V2 - #146

Merged
elnosh merged 3 commits into
elnosh:mainfrom
lescuer97:keyset_id_verification
Aug 3, 2025
Merged

Preparation for Keyset V2#146
elnosh merged 3 commits into
elnosh:mainfrom
lescuer97:keyset_id_verification

Conversation

@lescuer97

Copy link
Copy Markdown
Collaborator

No description provided.

@lescuer97
lescuer97 requested a review from elnosh July 31, 2025 21:38
@elnosh
elnosh merged commit 4fee858 into elnosh:main Aug 3, 2025
4 checks passed
Amperstrand added a commit to OpenTollGate/gonuts-tollgate that referenced this pull request Jul 25, 2026
…n) (#8)

Replaces SHA-256 hash approach for V2 keyset ID derivation with
math/big.Int based keysetIdToBigInt() from elnosh/gonuts upstream
(lescur97's PRs elnosh#146, elnosh#147). The big.Int approach is cleaner, handles
arbitrary-length IDs without overflow risk, and supports both hex and
base64 keyset ID formats.

Adds CheckCollidingKeysets() to detect keyset ID collisions after modulo
reduction — prevents two different keyset IDs from mapping to the same
BIP32 derivation path.

Adopted from: elnosh#146
             elnosh#147

6 new tests: V2 keyset derivation, hex/base64 parsing, collision detection.

Co-authored-by: Amperstrand <amperstrand@localhost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants