Page MenuHomePhabricator

[electrum] use ECPubkey in verify_message
ClosedPublic

Authored by PiRK on Jun 19 2024, 12:32.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC398a5f60947e: [electrum] use ECPubkey in verify_message
Summary

And rename the function to verify_message_with_address

This introduces a minor change in behavior: if pubkey_from_signature raises, we catch the error and return False, so garbage signatures will no longer cause an error to be raised, we will just see the verification fail.

Depends on D16350
Split out of D16301

Test Plan
  • test with the interactive signing and verifying tool in the wallet
  • try electrum-abc --test-release-notification (or manually verify the signature data from releases.json)
  • python test_runner.py

Diff Detail

Event Timeline

PiRK requested review of this revision.Jun 19 2024, 12:32
electrum/electrumabc/ecc.py
316–318

these 3 lines will be simplified to public_key, compressed = ECPubkey.from_signature65(sig65, h) in a following commit

electrum/electrumabc_gui/qt/update_checker.py
201

This was broken anyway (there is no longer a legacy parameter)

This revision is now accepted and ready to land.Jun 20 2024, 07:55
This revision was automatically updated to reflect the committed changes.