BIP-374: replace secp256k1.py with vendored copy of secp256k1lab

This commit is contained in:
Sebastian Falbesoner committed 2026-01-15 00:47:29 +01:00
1 parent 4e18ee641b
commit 459d977d9b
4 files changed
+7 -363

No files matched your search

+5 -1
View File
@@ -3,11 +3,15 @@
"""Reference implementation of DLEQ BIP for secp256k1 with unit tests."""
from hashlib import sha256
from pathlib import Path
import random
from secp256k1 import G, GE
import sys
import unittest
# Prefer the vendored copy of secp256k1lab
sys.path.insert(0, str(Path(__file__).parent / "secp256k1lab/src"))
from secp256k1lab.secp256k1 import G, GE
DLEQ_TAG_AUX = "BIP0374/aux"
DLEQ_TAG_NONCE = "BIP0374/nonce"