Skip to content

Conversation

@gugell
Copy link
Contributor

@gugell gugell commented Dec 4, 2025

Description

This pull request introduces a native optimization for EdDSA public key generation in the @noble/curves library by integrating a call to a native crypto library, with a fallback to the existing JavaScript implementation. It also updates the patch references in package.json to use a new custom patch that includes this enhancement.

Integration of native crypto library for public key generation:

  • Modified abstract/edwards.js to attempt public key calculation using react-native-nitro-avalabs-crypto.getPublicKey, falling back to the JavaScript implementation if the native call fails. This can improve performance and security on platforms where the native library is available.

Dependency and patch management:

  • Updated all references to the @noble/curves package in package.json to use a new patch file (@noble-curves-patch-8bddd6a892.patch) that includes the native optimization, replacing the previous patch file. This ensures all package consumers benefit from the new logic.

Testing

Dev Testing (if applicable)

  • Provide steps to test the happy path of your feature
  • Provide steps to test edge cases and error states
  • Trigger a build on bitrise and reference it here
  • Move the ticket into the "Testing" column on Jira

QA Testing (if applicable)

  • Provide instructions for QA to test this feature thoroughly
  • State expected behavior / acceptance criteria

Checklist

Please check all that apply (if applicable)

  • I have performed a self-review of my code
  • I have verified the code works
  • I have included screenshots / videos of android and ios
  • I have added testing steps
  • I have added/updated necessary unit tests
  • I have updated the documentation

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.

1 participant