We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8943df commit 8f6cb8dCopy full SHA for 8f6cb8d
ml-kem/tests/wycheproof.rs
@@ -235,7 +235,12 @@ macro_rules! mlkem_decaps_test {
235
};
236
237
#[allow(deprecated)]
238
- let dk = DecapsulationKey::from_expanded(&test_dk).expect("should be valid");
+ let dk_result = DecapsulationKey::from_expanded(&test_dk);
239
+ if dk_result.is_err() {
240
+ assert_eq!(test.result, ExpectedResult::Invalid);
241
+ continue;
242
+ }
243
+ let dk = dk_result.unwrap();
244
245
let test_c: EncodedCiphertext = match decode_optional_hex(&test.c, "c") {
246
Some(dk) => dk,
0 commit comments