Skip to content

fix(profile-sync-controller): remove hardcoded noble implementation for HMAC-SHA-512 - #10424

Merged
ccharly merged 9 commits into
mainfrom
cc/feat/remove-noble
Sep 28, 2026
Merged

ccharly merged 9 commits into
mainfrom
cc/feat/remove-noble

Conversation

@ccharly

@ccharly ccharly commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

We were forwarding cryptographicFunctions to key-tree cause our mobile platform was lacking proper crypto.subtle implementation (we only had a subset for it).

Though, since the update of:

And this other PR (to enable crypto.subtle on mobile):

Important

We need to wait for this PR to land first!

It should allow us to re-use crypto.subtle within key-tree and have faster crypto implementations.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes how auth/user-storage SIP-6 keys are derived on platforms with partial Web Crypto; wrong or incomplete crypto.subtle could break login/signing until mobile Web Crypto lands.

Overview
SIP-6 key derivation in message-signing no longer injects a hardcoded @noble/hashes HMAC-SHA-512 into SLIP10Node.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 webcrypto when crypto.subtle is missing, and SIP-6 tests fail if noble’s hmac runs (signing tests still allow noble HMAC for RFC-6979). The changelog notes that hosts need a fully compliant crypto.subtle for 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.

@ccharly

ccharly commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@10.0.1-preview-8f81c90d5
@metamask-previews/accounts-controller@40.0.0-preview-8f81c90d5
@metamask-previews/address-book-controller@8.0.0-preview-8f81c90d5
@metamask-previews/ai-controllers@2.0.0-preview-8f81c90d5
@metamask-previews/analytics-controller@3.0.0-preview-8f81c90d5
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-8f81c90d5
@metamask-previews/announcement-controller@9.0.0-preview-8f81c90d5
@metamask-previews/app-metadata-controller@3.0.0-preview-8f81c90d5
@metamask-previews/approval-controller@10.0.0-preview-8f81c90d5
@metamask-previews/assets-controller@16.1.0-preview-8f81c90d5
@metamask-previews/assets-controllers@112.0.2-preview-8f81c90d5
@metamask-previews/authenticated-user-storage@4.0.0-preview-8f81c90d5
@metamask-previews/base-controller@10.0.0-preview-8f81c90d5
@metamask-previews/base-data-service@2.0.0-preview-8f81c90d5
@metamask-previews/bitcoin-regtest-up@2.0.0-preview-8f81c90d5
@metamask-previews/bridge-controller@81.1.0-preview-8f81c90d5
@metamask-previews/bridge-status-controller@76.2.0-preview-8f81c90d5
@metamask-previews/build-utils@4.0.0-preview-8f81c90d5
@metamask-previews/chain-agnostic-permission@2.0.0-preview-8f81c90d5
@metamask-previews/chomp-api-service@5.0.0-preview-8f81c90d5
@metamask-previews/claims-controller@1.0.1-preview-8f81c90d5
@metamask-previews/client-controller@2.0.0-preview-8f81c90d5
@metamask-previews/client-utils@3.0.1-preview-8f81c90d5
@metamask-previews/compliance-controller@3.0.0-preview-8f81c90d5
@metamask-previews/composable-controller@13.0.0-preview-8f81c90d5
@metamask-previews/config-registry-controller@4.0.0-preview-8f81c90d5
@metamask-previews/connectivity-controller@1.0.0-preview-8f81c90d5
@metamask-previews/controller-utils@13.0.0-preview-8f81c90d5
@metamask-previews/core-backend@11.0.0-preview-8f81c90d5
@metamask-previews/cryptography@0.0.0-preview-8f81c90d5
@metamask-previews/delegation-controller@4.0.0-preview-8f81c90d5
@metamask-previews/earn-controller@13.0.0-preview-8f81c90d5
@metamask-previews/eip-5792-middleware@4.0.0-preview-8f81c90d5
@metamask-previews/eip-7702-internal-rpc-middleware@1.0.0-preview-8f81c90d5
@metamask-previews/eip1193-permission-middleware@3.0.0-preview-8f81c90d5
@metamask-previews/eth-block-tracker@16.0.0-preview-8f81c90d5
@metamask-previews/eth-json-rpc-middleware@25.0.0-preview-8f81c90d5
@metamask-previews/eth-json-rpc-provider@7.0.0-preview-8f81c90d5
@metamask-previews/foundryup@2.0.0-preview-8f81c90d5
@metamask-previews/gas-fee-controller@27.0.0-preview-8f81c90d5
@metamask-previews/gator-permissions-controller@6.0.0-preview-8f81c90d5
@metamask-previews/geolocation-controller@2.0.0-preview-8f81c90d5
@metamask-previews/java-tron-up@2.0.0-preview-8f81c90d5
@metamask-previews/json-rpc-engine@11.0.0-preview-8f81c90d5
@metamask-previews/json-rpc-middleware-stream@9.0.0-preview-8f81c90d5
@metamask-previews/keyring-controller@28.0.0-preview-8f81c90d5
@metamask-previews/kyc-controller@0.3.0-preview-8f81c90d5
@metamask-previews/local-node-utils@2.0.0-preview-8f81c90d5
@metamask-previews/logging-controller@10.0.0-preview-8f81c90d5
@metamask-previews/message-manager@15.0.0-preview-8f81c90d5
@metamask-previews/messenger@3.0.0-preview-8f81c90d5
@metamask-previews/messenger-cli@1.0.0-preview-8f81c90d5
@metamask-previews/money-account-api-data-service@1.0.0-preview-8f81c90d5
@metamask-previews/money-account-balance-service@3.0.0-preview-8f81c90d5
@metamask-previews/money-account-controller@2.0.0-preview-8f81c90d5
@metamask-previews/money-account-upgrade-controller@5.0.0-preview-8f81c90d5
@metamask-previews/money-account-utils@2.0.0-preview-8f81c90d5
@metamask-previews/multichain-account-service@14.0.0-preview-8f81c90d5
@metamask-previews/multichain-api-middleware@5.0.0-preview-8f81c90d5
@metamask-previews/multichain-network-controller@4.0.0-preview-8f81c90d5
@metamask-previews/multichain-transactions-controller@8.0.0-preview-8f81c90d5
@metamask-previews/name-controller@10.0.0-preview-8f81c90d5
@metamask-previews/network-connection-banner-controller@1.0.0-preview-8f81c90d5
@metamask-previews/network-controller@37.0.0-preview-8f81c90d5
@metamask-previews/network-enablement-controller@7.0.0-preview-8f81c90d5
@metamask-previews/notification-services-controller@29.0.0-preview-8f81c90d5
@metamask-previews/passkey-controller@4.0.0-preview-8f81c90d5
@metamask-previews/permission-controller@14.0.0-preview-8f81c90d5
@metamask-previews/permission-log-controller@6.0.0-preview-8f81c90d5
@metamask-previews/perps-controller@17.1.0-preview-8f81c90d5
@metamask-previews/phishing-controller@18.1.0-preview-8f81c90d5
@metamask-previews/platform-api-docs@0.2.0-preview-8f81c90d5
@metamask-previews/polling-controller@17.0.0-preview-8f81c90d5
@metamask-previews/preferences-controller@24.0.0-preview-8f81c90d5
@metamask-previews/profile-metrics-controller@5.1.0-preview-8f81c90d5
@metamask-previews/profile-sync-controller@32.1.1-preview-8f81c90d5
@metamask-previews/ramps-controller@23.0.0-preview-8f81c90d5
@metamask-previews/rate-limit-controller@8.0.0-preview-8f81c90d5
@metamask-previews/react-data-query@2.0.0-preview-8f81c90d5
@metamask-previews/remote-feature-flag-controller@7.0.0-preview-8f81c90d5
@metamask-previews/sample-controllers@6.0.0-preview-8f81c90d5
@metamask-previews/seedless-onboarding-controller@11.0.0-preview-8f81c90d5
@metamask-previews/selected-network-controller@27.0.0-preview-8f81c90d5
@metamask-previews/sentinel-api-service@2.0.0-preview-8f81c90d5
@metamask-previews/shield-controller@7.0.1-preview-8f81c90d5
@metamask-previews/signature-controller@40.0.0-preview-8f81c90d5
@metamask-previews/smart-transactions-controller@27.0.1-preview-8f81c90d5
@metamask-previews/snap-account-service@3.0.0-preview-8f81c90d5
@metamask-previews/social-controllers@3.0.1-preview-8f81c90d5
@metamask-previews/solana-test-validator-up@2.0.0-preview-8f81c90d5
@metamask-previews/stellar-quickstart-up@0.0.0-preview-8f81c90d5
@metamask-previews/storage-service@2.0.0-preview-8f81c90d5
@metamask-previews/subscription-controller@9.0.1-preview-8f81c90d5
@metamask-previews/transaction-controller@70.1.0-preview-8f81c90d5
@metamask-previews/transaction-pay-controller@29.0.0-preview-8f81c90d5
@metamask-previews/user-operation-controller@42.0.0-preview-8f81c90d5
@metamask-previews/utils@12.0.0-preview-8f81c90d5
@metamask-previews/wallet@13.0.0-preview-8f81c90d5
@metamask-previews/wallet-cli@0.0.0-preview-8f81c90d5

@ccharly

ccharly commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@ccharly
ccharly marked this pull request as ready for review September 24, 2026 15:18
@ccharly
ccharly requested review from a team as code owners September 24, 2026 15:18
@ccharly
ccharly deployed to default-branch September 24, 2026 15:18 — with GitHub Actions Active
mathieuartu
mathieuartu previously approved these changes Sep 25, 2026
@ccharly
ccharly added this pull request to the merge queue Sep 25, 2026
@ccharly
ccharly removed this pull request from the merge queue due to a manual request Sep 25, 2026
@ccharly
ccharly added this pull request to the merge queue Sep 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 25, 2026
mathieuartu
mathieuartu previously approved these changes Sep 28, 2026
@ccharly
ccharly added this pull request to the merge queue Sep 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 28, 2026
@ccharly
ccharly added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit 145f281 Sep 28, 2026
138 checks passed
@ccharly
ccharly deleted the cc/feat/remove-noble branch September 28, 2026 16:16
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