1
0

ecc: refactor/clean-up sign/verify APIs

This commit is contained in:
SomberNight
2024-04-11 15:13:41 +00:00
parent e72210b5d2
commit bd9d0ccc33
22 changed files with 165 additions and 165 deletions

View File

@@ -31,6 +31,7 @@ import aiorpcx
from . import bitcoin
from . import ecc
from .ecc import ECPubkey
from . import constants
from .util import bfh, NetworkJobOnDefaultServer
from .lnutil import funding_output_script_from_keys, ShortChannelID
@@ -183,6 +184,6 @@ def verify_sig_for_channel_update(chan_upd: dict, node_id: bytes) -> bool:
pre_hash = msg_bytes[2+64:]
h = sha256d(pre_hash)
sig = chan_upd['signature']
if not ecc.verify_signature(node_id, sig, h):
if not ECPubkey(node_id).ecdsa_verify(sig, h):
return False
return True