1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-05-12 12:03:29 +00:00

3 Commits

Author SHA1 Message Date
VolodymyrBg
7c80a699ff Implement subtraction operator for GE class in BIP-0374 reference code
This commit implements the subtraction operator (sub) for the GE (Group Element) class in the secp256k1.py file as requested in the TODO comment in reference.py.

The implementation is straightforward, leveraging the existing neg method to define subtraction as addition with the negated element: self + (-a).

After implementing the operator, the code in reference.py was simplified by replacing expressions like:
s * G + (-e * A) with s * G - e * A

This makes the code more readable and directly matches the mathematical notation used in the BIP-0374 specification.

Co-Authored-By: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
2025-04-15 14:39:09 +03:00
Jon Atack
cce668de3c bip374: update secp256k1.py to be executable 2024-12-28 18:20:56 -07:00
Andrew Toth
cb3afee850
Move test vectors to bip-0374 directory, add tests for G 2024-12-26 14:17:52 -05:00