Skip to content

Commit 33d5640

Browse files
authored
Merge pull request #426 from filecoin-project/optimization/reduce-feistel-rounds
Reduce feistel rounds from 4 to 3.
2 parents 3381400 + 7c53bf4 commit 33d5640

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage-proofs/src/crypto/feistel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use blake2::{Blake2s, Digest};
22

3+
pub const FEISTEL_ROUNDS: usize = 3;
34
pub type FeistelPrecomputed = (u32, u32, u32);
45

56
pub fn precompute(num_elements: u32) -> FeistelPrecomputed {
@@ -55,7 +56,6 @@ fn common_setup(index: u32, precomputed: FeistelPrecomputed) -> (u32, u32, u32,
5556

5657
(left, right, right_mask, half_bits)
5758
}
58-
pub const FEISTEL_ROUNDS: usize = 4;
5959

6060
fn encode(index: u32, keys: &[u32], precomputed: FeistelPrecomputed) -> u32 {
6161
let (mut left, mut right, right_mask, half_bits) = common_setup(index, precomputed);

0 commit comments

Comments
 (0)