From cbe4024c6ff193b167184fc17c11e16b57aa3b21 Mon Sep 17 00:00:00 2001 From: Eric Mastro Date: Tue, 12 Apr 2022 00:11:18 +1000 Subject: [PATCH] WIP: Change to passing PublicKey.key in sig verification --- contracts/Proofs.sol | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contracts/Proofs.sol b/contracts/Proofs.sol index e2d60a3..b0b3d9f 100644 --- a/contracts/Proofs.sol +++ b/contracts/Proofs.sol @@ -402,12 +402,14 @@ contract Proofs { Curve.G1Point memory sigma, PublicKey memory spk) internal returns (bool) { - // is this needed in solidity? + // TODO: is this needed in solidity? // require(!isEmpty(tau.signature), "Signature cannot be empty"); - // $tau.t -- how to do this in solidity? + // TODO: $tau.t -- how to do this in solidity? + // TODO: what's the second G2 point needed, PublicKey.signkey is a G1 + // point?? Is using the PublicKey.key sufficient? uint hashedMsg = uint(sha256(abi.encodePacked(tau.t))); - require(_verifySignature(tau.signature, spk.signkey, hashedMsg), + require(_verifySignature(tau.signature, spk.key, hashedMsg), "invalid signature"); // var first: blst_p1