1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-11-03 14:19:40 +00:00

BIP-374: Pass G and m to VerifyProof in GenerateProof self-check

This commit is contained in:
Forostovec 2025-10-19 13:21:14 +03:00 committed by GitHub
parent 1d186274ea
commit 1bb1aee5b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,7 +82,7 @@ The algorithm ''GenerateProof(a, B, r, G, m)'' is defined as:
* Let ''e = int(hash<sub>BIP0374/challenge</sub>(cbytes(A) || cbytes(B) || cbytes(C) || cbytes(G) || cbytes(R<sub>1</sub>) || cbytes(R<sub>2</sub>) || m'))''. * Let ''e = int(hash<sub>BIP0374/challenge</sub>(cbytes(A) || cbytes(B) || cbytes(C) || cbytes(G) || cbytes(R<sub>1</sub>) || cbytes(R<sub>2</sub>) || m'))''.
* Let ''s = (k + e⋅a) mod n''. * Let ''s = (k + e⋅a) mod n''.
* Let ''proof = bytes(32, e) || bytes(32, s)''. * Let ''proof = bytes(32, e) || bytes(32, s)''.
* If ''VerifyProof(A, B, C, proof)'' (see below) returns failure, abort. * If ''VerifyProof(A, B, C, proof, G, m)'' (see below) returns failure, abort.
* Return the proof ''proof''. * Return the proof ''proof''.
=== DLEQ Proof Verification === === DLEQ Proof Verification ===