Merge branch 'master' of github.com:iden3/snarkjs
This commit is contained in:
commit
865e53e44d
@ -188,7 +188,7 @@ contract Verifier {
|
|||||||
// Compute the linear combination vk_x
|
// Compute the linear combination vk_x
|
||||||
Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);
|
Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);
|
||||||
for (uint i = 0; i < input.length; i++) {
|
for (uint i = 0; i < input.length; i++) {
|
||||||
require(input[i] < snark_scalar_field);
|
require(input[i] < snark_scalar_field,"verifier-gte-snark-scalar-field");
|
||||||
vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));
|
vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));
|
||||||
}
|
}
|
||||||
vk_x = Pairing.addition(vk_x, vk.IC[0]);
|
vk_x = Pairing.addition(vk_x, vk.IC[0]);
|
||||||
|
@ -179,7 +179,7 @@ contract Verifier {
|
|||||||
// Compute the linear combination vk_x
|
// Compute the linear combination vk_x
|
||||||
Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);
|
Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);
|
||||||
for (uint i = 0; i < input.length; i++) {
|
for (uint i = 0; i < input.length; i++) {
|
||||||
require(input[i] < snark_scalar_field);
|
require(input[i] < snark_scalar_field,"verifier-gte-snark-scalar-field");
|
||||||
vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));
|
vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));
|
||||||
}
|
}
|
||||||
vk_x = Pairing.addition(vk_x, vk.IC[0]);
|
vk_x = Pairing.addition(vk_x, vk.IC[0]);
|
||||||
|
@ -189,7 +189,7 @@ contract Verifier {
|
|||||||
// Compute the linear combination vk_x
|
// Compute the linear combination vk_x
|
||||||
Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);
|
Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);
|
||||||
for (uint i = 0; i < input.length; i++) {
|
for (uint i = 0; i < input.length; i++) {
|
||||||
require(input[i] < snark_scalar_field);
|
require(input[i] < snark_scalar_field,"verifier-gte-snark-scalar-field");
|
||||||
vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));
|
vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));
|
||||||
}
|
}
|
||||||
vk_x = Pairing.addition(vk_x, vk.IC[0]);
|
vk_x = Pairing.addition(vk_x, vk.IC[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user