diff --git a/bls12_381/src/g1.rs b/bls12_381/src/g1.rs index b6ac706..5469fd6 100644 --- a/bls12_381/src/g1.rs +++ b/bls12_381/src/g1.rs @@ -1046,7 +1046,7 @@ fn test_projective_addition() { let mut d = G1Projective::generator(); for _ in 0..5 { - d = d + G1Projective::generator(); + d += G1Projective::generator(); } assert!(!bool::from(c.is_identity())); assert!(bool::from(c.is_on_curve())); @@ -1167,7 +1167,7 @@ fn test_mixed_addition() { let mut d = G1Projective::generator(); for _ in 0..5 { - d = d + G1Affine::generator(); + d += G1Affine::generator(); } assert!(!bool::from(c.is_identity())); assert!(bool::from(c.is_on_curve())); diff --git a/bls12_381/src/g2.rs b/bls12_381/src/g2.rs index 63b4cf7..d3f505b 100644 --- a/bls12_381/src/g2.rs +++ b/bls12_381/src/g2.rs @@ -1208,7 +1208,7 @@ fn test_projective_addition() { let mut d = G2Projective::generator(); for _ in 0..5 { - d = d + G2Projective::generator(); + d += G2Projective::generator(); } assert!(!bool::from(c.is_identity())); assert!(bool::from(c.is_on_curve())); @@ -1372,7 +1372,7 @@ fn test_mixed_addition() { let mut d = G2Projective::generator(); for _ in 0..5 { - d = d + G2Affine::generator(); + d += G2Affine::generator(); } assert!(!bool::from(c.is_identity())); assert!(bool::from(c.is_on_curve())); diff --git a/bls12_381/src/pairings.rs b/bls12_381/src/pairings.rs index 459d501..d2e65d0 100644 --- a/bls12_381/src/pairings.rs +++ b/bls12_381/src/pairings.rs @@ -57,28 +57,28 @@ impl MillerLoopResult { // For A z0 = t0 - z0; - z0 += z0 + t0; + z0 = z0 + z0 + t0; z1 = t1 + z1; - z1 += z1 + t1; + z1 = z1 + z1 + t1; let (mut t0, t1) = fp4_square(z2, z3); let (t2, t3) = fp4_square(z4, z5); // For C z4 = t0 - z4; - z4 += z4 + t0; + z4 = z4 + z4 + t0; z5 = t1 + z5; - z5 += z5 + t1; + z5 = z5 + z5 + t1; // For B t0 = t3.mul_by_nonresidue(); z2 = t0 + z2; - z2 += z2 + t0; + z2 = z2 + z2 + t0; z3 = t2 - z3; - z3 += z3 + t2; + z3 = z3 + z3 + t2; Fp12 { c0: Fp6 {