Skip to content

Commit

Permalink
to_montgomery_limbs
Browse files Browse the repository at this point in the history
  • Loading branch information
TalDerei committed Jun 28, 2024
1 parent b58fe19 commit d807276
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/fields/fq/u64/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ impl Fq {
Self(ArkworksFq::new_unchecked(BigInt::new(limbs)))
}

/// Retrieve the montgomery limbs from a field element.
///
/// This should only be used if you are familiar with the internals of the library.
pub const fn to_montgomery_limbs(element: Fq) -> [u64; N] {
element.0 .0 .0
}

pub const ZERO: Self = Self(ArkworksFq::new(BigInt::new([0; N])));
pub const ONE: Self = Self(ArkworksFq::new(BigInt::one()));

Expand Down

0 comments on commit d807276

Please sign in to comment.