Skip to content

Commit

Permalink
using new field implementation in bls12-377
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Feb 4, 2025
1 parent a0f96fc commit 0a682c5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bls12-377-fr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde = { workspace = true, features = ["derive"] }
lazy_static = { version = "1.5.0" }

# Feild
crrl = {path = "../../crrl", features = ["modint256"]}
crrl = {git = "https://github.com/distributed-lab/crrl.git", branch = "feature/fix-mod-int-impl", features = ["modint256"]}
bytes = "1.10.0"

[dev-dependencies]
Expand Down
5 changes: 1 addition & 4 deletions bls12-377-fr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub use poseidon2::Poseidon2Bls12337;
use rand::distributions::{Distribution, Standard};
use rand::Rng;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use num_traits::ToBytes;

type Scalar = crrl::field::ModInt256<
725501752471715841u64,
Expand Down Expand Up @@ -70,7 +69,7 @@ impl Packable for Bls12_377Fr {}

impl Hash for Bls12_377Fr {
fn hash<H: Hasher>(&self, state: &mut H) {
let mut serialized_bytes = self.value.encode32();
let serialized_bytes = self.value.encode32();
serialized_bytes.hash(state);
}
}
Expand Down Expand Up @@ -289,8 +288,6 @@ impl TwoAdicField for Bls12_377Fr {

#[cfg(test)]
mod tests {
use std::str::FromStr;

use num_traits::One;
use p3_field_testing::{test_field, test_two_adic_field};

Expand Down
2 changes: 0 additions & 2 deletions bls12-377-fr/src/poseidon2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ impl<const WIDTH: usize> ExternalLayer<Bls12_377Fr, WIDTH, BLS12_337_S_BOX_DEGRE

#[cfg(test)]
mod tests {
use std::str::FromStr;

use lazy_static::lazy_static;
use p3_poseidon2::ExternalLayerConstants;
use p3_symmetric::Permutation;
Expand Down

0 comments on commit 0a682c5

Please sign in to comment.