Skip to content

Commit

Permalink
Correct forb constant comment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnevadoc committed Nov 3, 2023
1 parent b3e30d8 commit 5116461
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/bn256/fq2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,12 @@ impl Fq2 {
}

pub fn mul_assign(&mut self, other: &Self) {
let mut t1 = self.c0 * other.c0;
let mut t0 = self.c0 + self.c1;
let mut t1 = self.c0 * other.c0;
let t2 = self.c1 * other.c1;
self.c1 = other.c0 + other.c1;

self.c0 = t1 - t2;
self.c1 = other.c0 + other.c1;
t1 += t2;
t0 *= self.c1;
self.c1 = t0 - t1;
Expand Down
12 changes: 6 additions & 6 deletions src/bn256/fq6.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ pub const FROBENIUS_COEFF_FQ6_C1: [Fq2; 6] = [
];

pub const FROBENIUS_COEFF_FQ6_C2: [Fq2; 6] = [
// Fq2(u + 1)**(((2q^0) - 2) / 3)
// Fq2(u + 9)**(((2q^0) - 2) / 3)
Fq2 {
c0: Fq([
0xd35d438dc58f0d9d,
Expand All @@ -518,7 +518,7 @@ pub const FROBENIUS_COEFF_FQ6_C2: [Fq2; 6] = [
]),
c1: Fq([0x0, 0x0, 0x0, 0x0]),
},
// Fq2(u + 1)**(((2q^1) - 2) / 3)
// Fq2(u + 9)**(((2q^1) - 2) / 3)
Fq2 {
c0: Fq([
0x7361d77f843abe92,
Expand All @@ -533,7 +533,7 @@ pub const FROBENIUS_COEFF_FQ6_C2: [Fq2; 6] = [
0x24830a9d3171f0fd,
]),
},
// Fq2(u + 1)**(((2q^2) - 2) / 3)
// Fq2(u + 9)**(((2q^2) - 2) / 3)
Fq2 {
c0: Fq([
0x71930c11d782e155,
Expand All @@ -543,7 +543,7 @@ pub const FROBENIUS_COEFF_FQ6_C2: [Fq2; 6] = [
]),
c1: Fq([0x0, 0x0, 0x0, 0x0]),
},
// Fq2(u + 1)**(((2q^3) - 2) / 3)
// Fq2(u + 9)**(((2q^3) - 2) / 3)
Fq2 {
c0: Fq([
0x448a93a57b6762df,
Expand All @@ -558,7 +558,7 @@ pub const FROBENIUS_COEFF_FQ6_C2: [Fq2; 6] = [
0x170c812b84dda0b2,
]),
},
// Fq2(u + 1)**(((2q^4) - 2) / 3)
// Fq2(u + 9)**(((2q^4) - 2) / 3)
Fq2 {
c0: Fq([
0x3350c88e13e80b9c,
Expand All @@ -568,7 +568,7 @@ pub const FROBENIUS_COEFF_FQ6_C2: [Fq2; 6] = [
]),
c1: Fq([0x0, 0x0, 0x0, 0x0]),
},
// Fq2(u + 1)**(((2q^5) - 2) / 3)
// Fq2(u + 9)**(((2q^5) - 2) / 3)
Fq2 {
c0: Fq([
0x843420f1d8dadbd6,
Expand Down

0 comments on commit 5116461

Please sign in to comment.