1
0
mirror of https://github.com/bitcoin/bips.git synced 2024-11-19 01:40:05 +01:00

remove P = None check as cpoint never returns None

This commit is contained in:
siv2r 2024-07-18 17:09:19 +05:30
parent 1c6ac0c4cf
commit 0d79b5eeb5

View File

@ -440,8 +440,6 @@ def partial_sig_verify_internal(psig: bytes, pubnonce: bytes, pk: PlainPk, sessi
Re_s_ = point_add(R_s1, point_mul(R_s2, b)) Re_s_ = point_add(R_s1, point_mul(R_s2, b))
Re_s = Re_s_ if has_even_y(R) else point_negate(Re_s_) Re_s = Re_s_ if has_even_y(R) else point_negate(Re_s_)
P = cpoint(pk) P = cpoint(pk)
if P is None:
return False
a = get_session_key_agg_coeff(session_ctx, P) a = get_session_key_agg_coeff(session_ctx, P)
g = 1 if has_even_y(Q) else n - 1 g = 1 if has_even_y(Q) else n - 1
g_ = g * gacc % n g_ = g * gacc % n