Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate cryptography to noble #682

Open
danfinlay opened this issue Jan 26, 2022 · 2 comments
Open

Migrate cryptography to noble #682

danfinlay opened this issue Jan 26, 2022 · 2 comments

Comments

@danfinlay
Copy link
Contributor

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.

@desi
Copy link

desi commented Apr 22, 2024

@mcmire Pinging for you to take a look and post an update on this issue.

@mcmire
Copy link
Contributor

mcmire commented Apr 25, 2024

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:

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

No branches or pull requests

3 participants