Skip to content

Conversation

@hieu-w
Copy link
Contributor

@hieu-w hieu-w commented Jan 28, 2026

Motivation and Context

Jira Link:

Description

  • Replace elliptic by @noble/curves ver 2
  • Remove Buffer

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

High Risk
High risk because it rewrites cryptography primitives (ECDSA/ECDH/ECIES) and changes the public API’s binary types from Buffer to Uint8Array, which can break consumers and subtly alter crypto outputs if mismatched.

Overview
Switches the library’s secp256k1 backend from elliptic to @noble/curves and standardizes all inputs/outputs (including Ecies) on Uint8Array instead of Buffer, updating key validation, signing/verifying, ECDH derivation (including padded/unpadded behavior), and ECIES encrypt/decrypt plumbing.

Adds a Node-only backward-compatibility test suite (via eccrypto-old) to compare outputs across getPublic*, sign/verify, derive*, and encrypt/decrypt, adjusts browser test config to exclude those tests, and refreshes README usage/API docs plus dependency/lockfile changes to drop elliptic in favor of @noble/curves.

Written by Cursor Bugbot for commit b3052af. This will update automatically on new commits. Configure here.

@hieu-w hieu-w force-pushed the feat/noble-curve-replacement branch from 8feec72 to be75748 Compare January 28, 2026 15:24
@hieu-w hieu-w self-assigned this Jan 28, 2026
@hieu-w hieu-w force-pushed the feat/noble-curve-replacement branch from 1ac76a6 to c6f6dce Compare January 29, 2026 04:44
This reverts commit 55af097.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Copy link

@ieow ieow left a comment

Choose a reason for hiding this comment

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

lgtm

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.

3 participants