Skip to content

Commit 1830dd8

Browse files
committed
test: add secp256k1 module with FE (field element) and GE (group element) classes
These are primarily designed for ease of understanding, not performance.
1 parent b741a62 commit 1830dd8

File tree

3 files changed

+377
-286
lines changed

3 files changed

+377
-286
lines changed

test/functional/feature_taproot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@
104104
sign_schnorr,
105105
tweak_add_privkey,
106106
ECKey,
107-
SECP256K1
108107
)
108+
from test_framework import secp256k1
109109
from test_framework.address import (
110110
hash160,
111111
program_to_witness,
@@ -695,7 +695,7 @@ def spenders_taproot_active():
695695
# Generate an invalid public key
696696
while True:
697697
invalid_pub = random_bytes(32)
698-
if not SECP256K1.is_x_coord(int.from_bytes(invalid_pub, 'big')):
698+
if not secp256k1.GE.is_valid_x(int.from_bytes(invalid_pub, 'big')):
699699
break
700700

701701
# Implement a test case that detects validation logic which maps invalid public keys to the

0 commit comments

Comments
 (0)