Migrate cryptography to noble
https://medium.com/nomic-labs-blog/a-safer-smaller-and-faster-ethereum-cryptography-stack-5eeb47f62d79
This would be for our key management, and could also be used for our hashing. Has fantastically reduced dependency load and bundle size, it's looking like the new gold standard in JS Eth crypto.
@mcmire Pinging for you to take a look and post an update on this issue.
It appears that ethereum-cryptography v1 started using the noble and scure packages (that's what the linked article is about), and v2 switched from noble-secp256k1 to noble-curves.
That said, of course, we don't need to use ethereum-cryptography, we can just use the noble and scure packages directly.
Many of our packages do this already. As of this writing, these packages are:
-
@metamask/key-tree -
@metamask/message-signing-snaps -
@metamask/rpc-methods -
@metamask/snaps-registry -
@metamask/snaps-rpc-methods -
@metamask/snaps-utils -
@metamask/utils
Packages that still use ethereum-cryptography directly are:
-
@metamask/accounts-controller -
@metamask/eth-hd-keyring -
@metamask/eth-sig-util -
@metamask/eth-simple-keyring
We should probably make separate tickets for the last three, but @metamask/accounts-controller is in this repo (core), so it definitely applies.
Here are some related tickets in other repos:
- Extension
- https://github.com/MetaMask/metamask-extension/issues/14928
- https://github.com/MetaMask/metamask-extension/issues/15904