Change signature verification equation to permit batch verification.
This commit is contained in:
parent
3e43cae526
commit
cae9715a8e
|
@ -145,8 +145,11 @@ impl<E: JubjubEngine> PublicKey<E> {
|
||||||
Ok(s) => s,
|
Ok(s) => s,
|
||||||
Err(_) => return false,
|
Err(_) => return false,
|
||||||
};
|
};
|
||||||
// S . P_G = R + c . vk
|
// 0 = 8(-S . P_G + R + c . vk)
|
||||||
self.0.mul(c, params).add(&r, params) == params.generator(p_g).mul(s, params).into()
|
self.0.mul(c, params).add(&r, params).add(
|
||||||
|
¶ms.generator(p_g).mul(s, params).negate().into(),
|
||||||
|
params
|
||||||
|
).mul_by_cofactor(params).eq(&Point::zero())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue