Skip to content

Commit

Permalink
save work
Browse files Browse the repository at this point in the history
  • Loading branch information
jotabulacios committed Oct 23, 2024
1 parent cbd20dd commit 0e4c45f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crypto/src/hash/rescue_prime/rescue_prime_optimized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ impl RescuePrimeOptimized {
pub fn permutation(&self, state: &mut [Fp]) {
let num_rounds = NUM_FULL_ROUNDS;
for round in 0..num_rounds {
self.apply_mds(state);
let _ = self.apply_mds(state);
self.add_round_constants(state, round);
Self::apply_sbox(state);
self.apply_mds(state);
let _ = self.apply_mds(state);
self.add_round_constants_second(state, round);
Self::apply_inverse_sbox(state);
}
Expand Down Expand Up @@ -568,7 +568,7 @@ mod tests {

let expected_state = rescue.mds_matrix_vector_multiplication(&state);
let mut computed_state = state.clone();
rescue.apply_mds(&mut computed_state);
let _ = rescue.apply_mds(&mut computed_state);

assert_eq!(expected_state, computed_state);
}
Expand Down Expand Up @@ -599,7 +599,7 @@ mod tests {

let expected_state = rescue_karatsuba.mds_karatsuba(&state);
let mut computed_state = state.clone();
rescue_karatsuba.apply_mds(&mut computed_state);
let _ = rescue_karatsuba.apply_mds(&mut computed_state);

assert_eq!(expected_state, computed_state);
}
Expand Down Expand Up @@ -639,10 +639,10 @@ mod tests {
let expected_state = {
let mut temp_state = state.clone();
for round in 0..7 {
rescue.apply_mds(&mut temp_state);
let _ = rescue.apply_mds(&mut temp_state);
rescue.add_round_constants(&mut temp_state, round);
RescuePrimeOptimized::apply_sbox(&mut temp_state);
rescue.apply_mds(&mut temp_state);
let _ = rescue.apply_mds(&mut temp_state);
rescue.add_round_constants_second(&mut temp_state, round);
RescuePrimeOptimized::apply_inverse_sbox(&mut temp_state);
}
Expand Down

0 comments on commit 0e4c45f

Please sign in to comment.