mirror of
https://github.com/bitcoin/bips.git
synced 2026-10-26 19:39:14 +00:00
Fail if any point is infinity when verifying
This commit is contained in:
2 files changed
+3
No files matched your search
@@ -75,6 +75,8 @@ def dleq_generate_proof(
|
||||
def dleq_verify_proof(
|
||||
A: GE, B: GE, C: GE, proof: bytes, G: GE = G, m: bytes | None = None
|
||||
) -> bool:
|
||||
if A.infinity or B.infinity or C.infinity or G.infinity:
|
||||
return False
|
||||
assert len(proof) == 64
|
||||
e = int.from_bytes(proof[:32], "big")
|
||||
s = int.from_bytes(proof[32:], "big")
|
||||
|
||||
Reference in new issue
Block a user