From ada4d50c0c0bb9572729b2f2cfbb8b72a96c2a46 Mon Sep 17 00:00:00 2001 From: kilic Date: Thu, 26 Sep 2024 11:22:38 +0300 Subject: [PATCH] Expose coefficients of extension fields (#174) expose coeffs of extension fields --- src/ff_ext/cubic.rs | 15 +++++++++++++++ src/ff_ext/quadratic.rs | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/ff_ext/cubic.rs b/src/ff_ext/cubic.rs index c8e90808..1142ff67 100644 --- a/src/ff_ext/cubic.rs +++ b/src/ff_ext/cubic.rs @@ -106,6 +106,21 @@ impl CubicExtField { } } + #[inline] + pub fn c0(&self) -> &F { + &self.c0 + } + + #[inline] + pub fn c1(&self) -> &F { + &self.c1 + } + + #[inline] + pub fn c2(&self) -> &F { + &self.c2 + } + #[inline] pub fn double(&self) -> Self { Self { diff --git a/src/ff_ext/quadratic.rs b/src/ff_ext/quadratic.rs index 3484798d..59c779c2 100644 --- a/src/ff_ext/quadratic.rs +++ b/src/ff_ext/quadratic.rs @@ -197,6 +197,16 @@ impl QuadExtField { } } + #[inline] + pub fn c0(&self) -> &F { + &self.c0 + } + + #[inline] + pub fn c1(&self) -> &F { + &self.c1 + } + #[inline] pub fn double(&self) -> Self { Self {