Skip to content

Commit

Permalink
Expose coefficients of extension fields (#174)
Browse files Browse the repository at this point in the history
expose coeffs of extension fields
  • Loading branch information
kilic authored Sep 26, 2024
1 parent b753a83 commit ada4d50
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 ada4d50

Please sign in to comment.