diff --git a/crates/testing/kats/src/wycheproof/mlkem.rs b/crates/testing/kats/src/wycheproof/mlkem.rs index fe5d7de05c..3ec7e8089b 100644 --- a/crates/testing/kats/src/wycheproof/mlkem.rs +++ b/crates/testing/kats/src/wycheproof/mlkem.rs @@ -2,10 +2,10 @@ //! //! ### Example usage //! ```rust -//! use libcrux_kats::wycheproof::mlkem::{ParameterSet, MlKemTests}; +//! use libcrux_kats::wycheproof::mlkem::{ParameterSet, TestGroupType, MlKemTests}; //! //! // load the tests for the ML-KEM-512 parameter set -//! let tests = MlKemTests::load(ParameterSet::MlKem512); +//! let tests = MlKemTests::load(ParameterSet::MlKem512, TestGroupType::MlKemTest); //! //! for test_group in tests.keygen_and_decaps_tests() { //! for test in &test_group.tests { diff --git a/crates/utils/core-models/src/core_arch/x86/interpretations.rs b/crates/utils/core-models/src/core_arch/x86/interpretations.rs index 9a8bcba531..ab555d63e7 100644 --- a/crates/utils/core-models/src/core_arch/x86/interpretations.rs +++ b/crates/utils/core-models/src/core_arch/x86/interpretations.rs @@ -475,9 +475,12 @@ pub mod int_vec { pub fn _mm256_bsrli_epi128(a: i128x2) -> i128x2 { i128x2::from_fn(|i| { - let tmp = IMM8 % 256; - let tmp = tmp % 16; - ((a[i] as u128) >> (tmp * 8)) as i128 + let imm8 = IMM8.rem_euclid(256); + if imm8 > 15 { + 0 + } else { + ((a[i] as u128) >> (imm8 * 8)) as i128 + } }) }