Skip to content

Commit 8feb4d0

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cryptoki/tests/basic.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,10 +2415,11 @@ fn kbkdf_feedback_mode() -> TestResult {
24152415
PrfDataParam::new(PrfDataParamType::IterationVariable(None)),
24162416
PrfDataParam::new(PrfDataParamType::Counter(&counter_format)),
24172417
];
2418+
let iv = b"sixteen bytes iv";
24182419
let params = KbkdfFeedbackParams::new(
24192420
MechanismType::AES_CMAC,
24202421
&data_params,
2421-
Some(b"some_initialization_vector"),
2422+
Some(iv),
24222423
None,
24232424
);
24242425

@@ -2818,10 +2819,11 @@ fn kbkdf_additional_keys_feedback_mode() -> TestResult {
28182819
.iter()
28192820
.map(|template| DerivedKey::new(template))
28202821
.collect::<Vec<_>>();
2822+
let iv = b"sixteen bytes iv";
28212823
let params = KbkdfFeedbackParams::new(
28222824
MechanismType::AES_CMAC,
28232825
&data_params,
2824-
Some(b"some_initialization_vector"),
2826+
Some(iv),
28252827
Some(&mut additional_derived_keys),
28262828
);
28272829

0 commit comments

Comments
 (0)