Skip to content

Conversation

@Nodonisko
Copy link
Contributor

@Nodonisko Nodonisko commented Sep 12, 2025

  • It uses official bitcoin-core/secp256k1 library for secp256k1
  • Added validation step for CI that checks if bitcoin-core/secp256k1 is pinned to specific version (0.7.0)
  • Disabled all unused functionality from bitcoin-core/secp256k1 so most of the library code is actually not builded and included at all
  • Implements native C++ getPublicKey function
    • ~133x faster than @noble/secp256k1 (1068ms => 8ms)
    • fully compatible signature with JS @noble/secp256k1 so it could be used as drop-in replacement
  • Example app that include comprehensive tests is in another PR feat: add Example app with tests cases #6 to avoid noise in this PR (because tests are few thousand lines)

@Nodonisko Nodonisko requested a review from a team as a code owner September 12, 2025 13:41
Copy link

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

- Add secp256k1 submodule at cpp/secp256k1
- Pin to official v0.7.0 release (a660a4976efe880bae7982ee410b9e0dc59ac983)
- Add explicit commit hash documentation in .gitmodules
- Add SUBMODULES.md for tracking submodule versions
- Add verification script to prevent accidental updates
- Ensures reproducible builds with stable cryptographic library
@Nodonisko Nodonisko force-pushed the feat/add-native-public-key-generation-2 branch from 1f2fb79 to 56b3a3d Compare September 18, 2025 11:40
@Nodonisko
Copy link
Contributor Author

Rebased to include example app and test files.

@Nodonisko
Copy link
Contributor Author

@danroc Resolved

Copy link

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@sethkfman sethkfman merged commit 0bb656d into MetaMask:main Sep 22, 2025
15 checks passed
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.

4 participants