Skip to content

UMP v3 token support with Argon2id password KDF - #5

Merged
BraydenLangley merged 5 commits into
masterfrom
ump-argon2id-support
Mar 26, 2026
Merged

UMP v3 token support with Argon2id password KDF#5
BraydenLangley merged 5 commits into
masterfrom
ump-argon2id-support

Conversation

@Stephen-Thomson

Copy link
Copy Markdown
Collaborator

Description of Changes

Add UMP v3 token support to the overlay backend — topic manager and lookup service
now parse and validate KDF metadata fields (umpVersion, kdfAlgorithm, kdfParams)
from on-chain tokens.

Fixes a v3 detection bug where tokens without an encrypted-profiles field had
umpVersion at field index 11 (not 12), causing them to be treated as legacy tokens.
Detection now checks both layouts: single-byte at field[11] = v3 without profiles,
single-byte at field[12] = v3 with profiles.

Also adds a Jest test suite with 29 unit tests covering both the topic manager and
lookup service, including legacy tokens, v3 tokens with and without profiles, and
invalid/edge-case inputs. Includes the Jest/ts-jest configuration needed to run
tests in this LARS project structure.

Linked Issues / Tickets

n/a

Testing Procedure

New unit tests in backend/src/__tests/:

  • UMPTopicManager.test.ts — validates admission logic for legacy tokens, v3 tokens
    (with/without profiles), insufficient fields, invalid KDF metadata, and
    unsupported KDF algorithms

  • UMPLookupServiceFactory.test.ts — validates indexing and lookup of presentation
    hash, recovery hash, and outpoint for both legacy and v3 tokens

  • I have added new unit tests

  • All tests pass locally

  • I have tested manually in my local environment

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have run npm run doc and npm run lint one final time before requesting a review
  • I have run npm version patch so that my changes will trigger a new version to be released when they are merged

@BraydenLangley
BraydenLangley self-requested a review March 26, 2026 19:19
@BraydenLangley

Copy link
Copy Markdown
Collaborator

Ran integration testing with new wallet-toolbox changes locally.

@BraydenLangley
BraydenLangley merged commit 3dcdc61 into master Mar 26, 2026
2 checks passed
@BraydenLangley
BraydenLangley deleted the ump-argon2id-support branch March 26, 2026 19:42
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