Create a random gamma and then P = gs * y + h * gamma
(
rng: &mut R,
y: &[G::ScalarField],
gs: &[G],
h: &G,
)
| 58 | |
| 59 | /// Create a random gamma and then P = gs * y + h * gamma |
| 60 | fn create_P<R: RngCore, G: AffineRepr>( |
| 61 | rng: &mut R, |
| 62 | y: &[G::ScalarField], |
| 63 | gs: &[G], |
| 64 | h: &G, |
| 65 | ) -> (G::ScalarField, G) { |
| 66 | let gamma = G::ScalarField::rand(rng); |
| 67 | let P = G::Group::msm_unchecked(gs, &y) + h.mul_bigint(gamma.into_bigint()); |
| 68 | (gamma, P.into_affine()) |
| 69 | } |
| 70 | |
| 71 | macro_rules! impl_homomorphism { |
| 72 | ($name: ident, $G: ident) => { |
no test coverage detected