HomePhabricator

[electrum] use GENERATOR and CURVE_ORDER from ecc module

Description

[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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16682

Details

Provenance
PiRKAuthored on Aug 26 2024, 08:33
PiRKPushed on Sep 3 2024, 06:19
Reviewer
Restricted Project
Differential Revision
D16682: [electrum] use GENERATOR and CURVE_ORDER from ecc module
Parents
rABCc60c8fbc7d46: [electrum] properly handle point at infinity and point not on curve
Branches
Unknown
Tags
Unknown