Skip to content

Commit

Permalink
expose coeffs of extension fields
Browse files Browse the repository at this point in the history
  • Loading branch information
kilic committed Sep 18, 2024
1 parent b753a83 commit d8e3189
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/ff_ext/cubic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ impl<F: ff::Field> CubicExtField<F> {
}
}

#[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 {
Expand Down
10 changes: 10 additions & 0 deletions src/ff_ext/quadratic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ impl<F: ff::Field> QuadExtField<F> {
}
}

#[inline]
pub fn c0(&self) -> &F {
&self.c0
}

#[inline]
pub fn c1(&self) -> &F {
&self.c1
}

#[inline]
pub fn double(&self) -> Self {
Self {
Expand Down

0 comments on commit d8e3189

Please sign in to comment.