Page MenuHomePhabricator

[electrum] use GENERATOR and CURVE_ORDER from ecc module
ClosedPublic

Authored by PiRK on Aug 26 2024, 15:16.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCcec785ad7fc4: [electrum] use GENERATOR and CURVE_ORDER from ecc module
Summary

This replaces instances of ecdsa.ecdsa.generator_secp256k1 (instance of ecdsa.ellipticcurve.Point) with a ECPubkey instance.

After this diff, the only modules still importing ecdsa are:

  • ecc.py
  • ecc_fast.py
  • schnorr.py (the pure-python fallback code)
  • digitalbitbox.py

The plan is to now make ecc*.py and schnorr.py have a hard dependency on libsecp256k1 and remove the ecdsa dependency altogether.

This concludes backport of https://github.com/spesmilo/electrum/commit/16e4827e8c6db833b0a969351b73eb34d489681f

Depends on D16681

Test Plan

python test_runner.py

Activate Cash Fusion and wait for a succesfull fusion

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Aug 26 2024, 15:16
electrum/electrumabc_plugins/fusion/pedersen.py
92 ↗(On Diff #49369)

this needs to be reworked a bit, I plan to no raise an error for point at infinity

PiRK planned changes to this revision.Aug 27 2024, 08:29

properly handle point at infinity

PiRK planned changes to this revision.Aug 27 2024, 15:45

Use the constants GENERATOR and POINT_AT_INFINITY rather than functions.

PiRK retitled this revision from [electrum] use generator() and CURVE_ORDER from ecc module to [electrum] use GENERATOR and CURVE_ORDER from ecc module.
PiRK edited the summary of this revision. (Show Details)

rebase

This revision is now accepted and ready to land.Aug 30 2024, 20:28