From d8e3189f6613f222e7a9946f32b6f1b9aba5f50e Mon Sep 17 00:00:00 2001 From: kilic Date: Wed, 18 Sep 2024 23:36:21 +0300 Subject: [PATCH] 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 {