Skip to content

Commit

Permalink
removed . clone()s
Browse files Browse the repository at this point in the history
  • Loading branch information
jotabulacios committed Nov 4, 2024
1 parent 1e57ac7 commit c7344bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::traits::ByteConversion;
use crate::unsigned_integer::element::U384;

pub const BLS12377_PRIME_FIELD_ORDER: U384 = U384::from_hex_unchecked("1ae3a4617c510eac63b05c06ca1493b1a22d9f300f5138f1ef3622fba094800170b5d44300000008508c00000000001");
pub const FP2_RESIDUE: FieldElement<BLS12377PrimeField> =FieldElement::from_hex_unchecked("1AE3A4617C510EAC63B05C06CA1493B1A22D9F300F5138F1EF3622FBA094800170B5D44300000008508BFFFFFFFFFFC");
pub const FP2_RESIDUE: FieldElement<BLS12377PrimeField> =FieldElement::from_hex_unchecked("0x1ae3a4617c510eac63b05c06ca1493b1a22d9f300f5138f1ef3622fba094800170b5d44300000008508bffffffffffc");

// FPBLS12377
#[derive(Clone, Debug)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,21 +256,21 @@ pub fn cyclotomic_square(a: &Fp12E) -> Fp12E {
// r00 = 3v00 - 2b0
let mut r00 = &v0.value()[0] - b0;
r00 = r00.double();
r00 += v0.value()[0].clone();
r00 = &v0.value()[0] + r00;

// r01 = 3v10 -2b1
let mut r01 = &v1.value()[0] - b1;
r01 = r01.double();
r01 += v1.value()[0].clone();
r01 = &v1.value()[0] + r01;

// r11 = 3v01 - 2b4
let mut r11 = &v0.value()[1] + b4;
r11 = r11.double();
r11 += v0.value()[1].clone();
r11 = &v0.value()[1] + r11;
// r12 = 3v11 - 2b5
let mut r12 = &v1.value()[1] + b5;
r12 = r12.double();
r12 += v1.value()[1].clone();
r12 = &v1.value()[1] + r12;
// r12 = 3v11 - 2b5

let v21 = mul_fp2_by_nonresidue(&v2.value()[1]);
Expand All @@ -281,7 +281,7 @@ pub fn cyclotomic_square(a: &Fp12E) -> Fp12E {
// 3 * ( u) * v20 - 2b3
let mut r02 = &v2.value()[0] - b2;
r02 = r02.double();
r02 += v2.value()[0].clone();
r02 = &v2.value()[0] + r02;

Fp12E::new([Fp6E::new([r00, r01, r02]), Fp6E::new([r10, r11, r12])])
}
Expand Down

0 comments on commit c7344bc

Please sign in to comment.