MetaMask / core

This monorepo is a collection of packages used across multiple MetaMask clients
MIT License
250 stars 172 forks source link

Migrate cryptography to noble #682

Open danfinlay opened 2 years ago

danfinlay commented 2 years ago

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 commented 2 months ago

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

mcmire commented 2 months ago

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:

Packages that still use ethereum-cryptography directly are:

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: