feat(profile-sync-controller): derive auth and user-storage signing keys natively via SIP-6 instead of message-signing-snap - #9824
Open
mathieuartu wants to merge 5 commits into
Open
Conversation
…eys natively via SIP-6 instead of message-signing-snap
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fcbe93b. Configure here.
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
|
@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. |
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
References
Related to: https://consensyssoftware.atlassian.net/browse/MUL-2058
Client test-drive PRs:
Checklist
Note
High Risk
Breaking messenger contract plus in-process cryptographic signing and HD seed access; behavior must stay byte-identical to the snap or login and storage keys break.
Overview
BREAKING:
AuthenticationControllerandUserStorageControllerno longer callSnapController:handleRequeston@metamask/message-signing-snapfor login identifiers or user-storage keys. They now read the HD keyring seed viaKeyringController:withKeyringV2Unsafe, derive the same SIP-6 message-signing key in-process, and signmetamask:…messages locally. Clients must grantwithKeyringV2Unsafeon the messenger and can drop snap permissions for these controllers; the message-signing snap stays for Portfolio / external origins.New shared modules
message-signing(vendored SIP-6 + pubkey/sign parity with the snap) andhd-keyring-seedreplaceauth-snap-requests. HMAC-SHA-512 for SLIP-10 uses@noble/hashesso derivation works on React Native where SubtleCrypto cannot HMAC. Dependencies drop@metamask/snaps-*and add@metamask/key-tree/@noble/curves. Auth’s sign-message cache is keyed by entropy source + message (aligned with user-storage). Tests and mocks target the native helpers instead of snap RPC.Reviewed by Cursor Bugbot for commit 17f3dc1. Bugbot is set up for automated code reviews on this repo. Configure here.