Rename: vkX -> combination

This commit is contained in:
Mark Spanbroek 2024-01-30 15:10:50 +01:00 committed by markspanbroek
parent a4ce10f4de
commit f9637f192b
1 changed files with 4 additions and 4 deletions

View File

@ -138,15 +138,15 @@ contract Groth16Verifier {
return false; return false;
} }
} }
// Compute the linear combination vkX // Compute the linear combination
G1Point memory vkX = _verifyingKey.ic[0]; G1Point memory combination = _verifyingKey.ic[0];
for (uint i = 0; i < input.length; i++) { for (uint i = 0; i < input.length; i++) {
G1Point memory product; G1Point memory product;
(success, product) = _multiply(_verifyingKey.ic[i + 1], input[i]); (success, product) = _multiply(_verifyingKey.ic[i + 1], input[i]);
if (!success) { if (!success) {
return false; return false;
} }
(success, vkX) = _add(vkX, product); (success, combination) = _add(combination, product);
if (!success) { if (!success) {
return false; return false;
} }
@ -157,7 +157,7 @@ contract Groth16Verifier {
proof.b, proof.b,
_verifyingKey.alpha1, _verifyingKey.alpha1,
_verifyingKey.beta2, _verifyingKey.beta2,
vkX, combination,
_verifyingKey.gamma2, _verifyingKey.gamma2,
proof.c, proof.c,
_verifyingKey.delta2 _verifyingKey.delta2