Skip to content

Commit

Permalink
fp: use arkworks for u64_backend
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Jun 27, 2024
1 parent b57e932 commit 649ee0f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 3,818 deletions.
9 changes: 6 additions & 3 deletions src/fields/fp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ use crate::EncodingError;
pub mod arkworks;
mod ops;
mod u32;

// The u64 backend requires arkworks
#[cfg(feature = "arkworks")]
mod u64;

cfg_if! {
if #[cfg(feature = "u32_backend")] {
pub type Fp = u32::Fp;
} else {
if #[cfg(feature = "arkworks")] {
pub type Fp = u64::Fp;
} else {
pub type Fp = u32::Fp;
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/fields/fp/arkworks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,7 @@ mod tests {
#[test]
fn test_minus_one_squared() {
let minus_one = Fp::zero() - Fp::one();
assert_eq!(Fp::one(), Fp::ONE);

//assert_eq!(minus_one.square(), Fp::ONE);
assert_eq!(minus_one.square(), Fp::ONE);
}

#[test]
Expand Down
1 change: 0 additions & 1 deletion src/fields/fp/u64.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod fiat;
pub mod wrapper;

pub use wrapper::Fp;
Loading

0 comments on commit 649ee0f

Please sign in to comment.