fix(profile-sync-controller): remove hardcoded noble implementation for HMAC-SHA-512 - #10424
Merged
Merged
Conversation
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
Contributor
Author
|
bugbot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8f81c90. Configure here.
mathieuartu
previously approved these changes
Sep 25, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 25, 2026
mathieuartu
previously approved these changes
Sep 28, 2026
mathieuartu
approved these changes
Sep 28, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
We were forwarding
cryptographicFunctionstokey-treecause our mobile platform was lacking propercrypto.subtleimplementation (we only had a subset for it).Though, since the update of:
And this other PR (to enable
crypto.subtleon mobile):Important
We need to wait for this PR to land first!
It should allow us to re-use
crypto.subtlewithinkey-treeand have faster crypto implementations.References
Checklist
Note
Medium Risk
Changes how auth/user-storage SIP-6 keys are derived on platforms with partial Web Crypto; wrong or incomplete
crypto.subtlecould break login/signing until mobile Web Crypto lands.Overview
SIP-6 key derivation in
message-signingno longer injects a hardcoded@noble/hashesHMAC-SHA-512 intoSLIP10Node.fromSeed. HMAC for SLIP-10 / BIP-32 now follows@metamask/key-tree, which prefers Web Crypto (crypto.subtle) and only falls back to noble when needed.Tests were updated to match: the custom Jest jsdom environment exposes Node’s
webcryptowhencrypto.subtleis missing, and SIP-6 tests fail if noble’shmacruns (signing tests still allow noble HMAC for RFC-6979). The changelog notes that hosts need a fully compliantcrypto.subtlefor this path, since key-tree treats Web Crypto as all-or-nothing.Reviewed by Cursor Bugbot for commit 6fef2be. Bugbot is set up for automated code reviews on this repo. Configure here.