Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/testing/kats/src/wycheproof/mlkem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 6 additions & 3 deletions crates/utils/core-models/src/core_arch/x86/interpretations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,12 @@ pub mod int_vec {

pub fn _mm256_bsrli_epi128<const IMM8: i32>(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
}
})
}

Expand Down