Skip to content

Commit 41f0ca3

Browse files
committed
tests: Use 16 byte IV for KBKDF for OpenSSL compatibility
Signed-off-by: Jakub Jelen <[email protected]>
1 parent c9895e9 commit 41f0ca3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

cryptoki/tests/basic.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,12 +2417,8 @@ fn kbkdf_feedback_mode() -> TestResult {
24172417
PrfDataParam::new(PrfDataParamType::IterationVariable(None)),
24182418
PrfDataParam::new(PrfDataParamType::Counter(&counter_format)),
24192419
];
2420-
let params = KbkdfFeedbackParams::new(
2421-
MechanismType::AES_CMAC,
2422-
&data_params,
2423-
Some(b"some_initialization_vector"),
2424-
None,
2425-
);
2420+
let iv = b"sixteen bytes iv";
2421+
let params = KbkdfFeedbackParams::new(MechanismType::AES_CMAC, &data_params, Some(iv), None);
24262422

24272423
// Derive key
24282424
let derived_key_feedback_iv = session.derive_key(
@@ -2820,10 +2816,11 @@ fn kbkdf_additional_keys_feedback_mode() -> TestResult {
28202816
.iter()
28212817
.map(|template| DerivedKey::new(template))
28222818
.collect::<Vec<_>>();
2819+
let iv = b"sixteen bytes iv";
28232820
let params = KbkdfFeedbackParams::new(
28242821
MechanismType::AES_CMAC,
28252822
&data_params,
2826-
Some(b"some_initialization_vector"),
2823+
Some(iv),
28272824
Some(&mut additional_derived_keys),
28282825
);
28292826

0 commit comments

Comments
 (0)