Skip to content

Commit

Permalink
fix: explicitly define mds diff type (privacy-scaling-explorations#196)
Browse files Browse the repository at this point in the history
* fix: explicitly define mds diff type

* rm paren
  • Loading branch information
alexander-camuto authored and Velaciela committed Oct 9, 2023
1 parent d171a04 commit 669a670
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion halo2_gadgets/src/poseidon/primitives/mds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ pub(super) fn generate_mds<F: FromUniformBytes<64> + Ord, const T: usize>(
acc
} else {
// We can invert freely; by construction, the elements of xs are distinct.
acc * (x - x_m) * (x_j - x_m).invert().unwrap()
let diff: F = x_j - *x_m;
acc * (x - x_m) * diff.invert().unwrap()
}
})
};
Expand Down

0 comments on commit 669a670

Please sign in to comment.