commit
eeba050585
@ -205,7 +205,7 @@ class BN128 {
|
|||||||
f,
|
f,
|
||||||
c.ell_0,
|
c.ell_0,
|
||||||
this.F2.mulScalar(c.ell_VW , pre1.PY),
|
this.F2.mulScalar(c.ell_VW , pre1.PY),
|
||||||
this.F2.mulScalar(c.ell_VV , pre1.PX, ));
|
this.F2.mulScalar(c.ell_VV , pre1.PX));
|
||||||
|
|
||||||
if (bit)
|
if (bit)
|
||||||
{
|
{
|
||||||
@ -213,8 +213,8 @@ class BN128 {
|
|||||||
f = this._mul_by_024(
|
f = this._mul_by_024(
|
||||||
f,
|
f,
|
||||||
c.ell_0,
|
c.ell_0,
|
||||||
this.F2.mulScalar(c.ell_VW, pre1.PY, ),
|
this.F2.mulScalar(c.ell_VW, pre1.PY),
|
||||||
this.F2.mulScalar(c.ell_VV, pre1.PX, ));
|
this.F2.mulScalar(c.ell_VV, pre1.PX));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@ class BN128 {
|
|||||||
f = this._mul_by_024(
|
f = this._mul_by_024(
|
||||||
f,
|
f,
|
||||||
c.ell_0,
|
c.ell_0,
|
||||||
this.F2.mulScalar(c.ell_VW, pre1.PY, ),
|
this.F2.mulScalar(c.ell_VW, pre1.PY),
|
||||||
this.F2.mulScalar(c.ell_VV, pre1.PX));
|
this.F2.mulScalar(c.ell_VV, pre1.PX));
|
||||||
|
|
||||||
return f;
|
return f;
|
||||||
|
@ -50,7 +50,7 @@ module.exports = function isValid(vk_verifier, proof, publicSignals) {
|
|||||||
if (! bn128.F12.equals(
|
if (! bn128.F12.equals(
|
||||||
bn128.F12.mul(
|
bn128.F12.mul(
|
||||||
bn128.pairing( G1.add(full_pi_a, proof.pi_c) , vk_verifier.vk_gb_2 ),
|
bn128.pairing( G1.add(full_pi_a, proof.pi_c) , vk_verifier.vk_gb_2 ),
|
||||||
bn128.pairing( vk_verifier.vk_gb_1 , proof.pi_b ),
|
bn128.pairing( vk_verifier.vk_gb_1 , proof.pi_b )
|
||||||
),
|
),
|
||||||
bn128.pairing( proof.pi_kp , vk_verifier.vk_g )))
|
bn128.pairing( proof.pi_kp , vk_verifier.vk_g )))
|
||||||
return false;
|
return false;
|
||||||
@ -59,7 +59,7 @@ module.exports = function isValid(vk_verifier, proof, publicSignals) {
|
|||||||
bn128.pairing( full_pi_a , proof.pi_b ),
|
bn128.pairing( full_pi_a , proof.pi_b ),
|
||||||
bn128.F12.mul(
|
bn128.F12.mul(
|
||||||
bn128.pairing( proof.pi_h , vk_verifier.vk_z ),
|
bn128.pairing( proof.pi_h , vk_verifier.vk_z ),
|
||||||
bn128.pairing( proof.pi_c , G2.g ),
|
bn128.pairing( proof.pi_c , G2.g )
|
||||||
)))
|
)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user