E12D
Degree-12 extension field element (generic coefficients).
Represents an element of the extension field F_{q^12} modeled as the quotient ring F_qw/p(w), where p(w) is an irreducible polynomial of degree 12. Canonical polynomial form:
w0 + w1*w + w2*w^2 + w3*w^3 + w4*w^4 + w5*w^5
+ w6*w^6 + w7*w^7 + w8*w^8 + w9*w^9 + w10*w^10 + w11*w^11
Coefficients w0 … w11 are of type T.
When T is a limb-based integer type used in this codebase:
T = [u384](4 x u96 limbs) orT = [u288](3 x u96 limbs). Helpers below serialize/deserialize to a flatArray<felt252>(12x4 foru384, 12x3 foru288).num::traits::Oneis implemented forE12D<u384>andE12D<u288>; the multiplicative identity isw0 = 1and all other coefficients are zero.
Example: create the multiplicative identity for u288 coefficients.
let one: E12D<u288> = E12D {
w0: U288One::one(),
w1: U288Zero::zero(),
w2: U288Zero::zero(),
w3: U288Zero::zero(),
w4: U288Zero::zero(),
w5: U288Zero::zero(),
w6: U288Zero::zero(),
w7: U288Zero::zero(),
w8: U288Zero::zero(),
w9: U288Zero::zero(),
w10: U288Zero::zero(),
w11: U288Zero::zero(),
};
Fully qualified path: garaga::definitions::structs::fields::E12D
[derive(Copy, Drop, Debug, PartialEq)]
pub struct E12D<T> {
pub w0: T,
pub w1: T,
pub w2: T,
pub w3: T,
pub w4: T,
pub w5: T,
pub w6: T,
pub w7: T,
pub w8: T,
pub w9: T,
pub w10: T,
pub w11: T,
}
Members
w0
Fully qualified path: garaga::definitions::structs::fields::E12D::w0
pub w0: T
w1
Fully qualified path: garaga::definitions::structs::fields::E12D::w1
pub w1: T
w2
Fully qualified path: garaga::definitions::structs::fields::E12D::w2
pub w2: T
w3
Fully qualified path: garaga::definitions::structs::fields::E12D::w3
pub w3: T
w4
Fully qualified path: garaga::definitions::structs::fields::E12D::w4
pub w4: T
w5
Fully qualified path: garaga::definitions::structs::fields::E12D::w5
pub w5: T
w6
Fully qualified path: garaga::definitions::structs::fields::E12D::w6
pub w6: T
w7
Fully qualified path: garaga::definitions::structs::fields::E12D::w7
pub w7: T
w8
Fully qualified path: garaga::definitions::structs::fields::E12D::w8
pub w8: T
w9
Fully qualified path: garaga::definitions::structs::fields::E12D::w9
pub w9: T
w10
Fully qualified path: garaga::definitions::structs::fields::E12D::w10
pub w10: T
w11
Fully qualified path: garaga::definitions::structs::fields::E12D::w11
pub w11: T