Skip to content

Commit c9895e9

Browse files
committed
KBKDF: Use FIPS/OpenSSL compatible params
Signed-off-by: Jakub Jelen <[email protected]>
1 parent d69c16a commit c9895e9

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

cryptoki/tests/basic.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,9 +2295,9 @@ fn kbkdf_counter_mode() -> TestResult {
22952295
// Some variables we will use throughout
22962296
let counter_format = KbkdfCounterFormat::new(Endianness::Big, NonZeroUsize::new(16).unwrap());
22972297
let dkm_length_format = KbkdfDkmLengthFormat::new(
2298-
KbkdfDkmLengthMethod::SumOfKeys,
2298+
KbkdfDkmLengthMethod::SumOfSegments,
22992299
Endianness::Big,
2300-
NonZeroUsize::new(16).unwrap(),
2300+
NonZeroUsize::new(32).unwrap(),
23012301
);
23022302

23032303
// Instantiate KBKDF in counter-mode without additional keys
@@ -2390,7 +2390,7 @@ fn kbkdf_feedback_mode() -> TestResult {
23902390
let dkm_length_format = KbkdfDkmLengthFormat::new(
23912391
KbkdfDkmLengthMethod::SumOfKeys,
23922392
Endianness::Big,
2393-
NonZeroUsize::new(16).unwrap(),
2393+
NonZeroUsize::new(32).unwrap(),
23942394
);
23952395

23962396
/* FEEDBACK-MODE - no IV */
@@ -2504,9 +2504,9 @@ fn kbkdf_double_pipeline_mode() -> TestResult {
25042504

25052505
// Some variables we will use throughout
25062506
let dkm_length_format = KbkdfDkmLengthFormat::new(
2507-
KbkdfDkmLengthMethod::SumOfKeys,
2507+
KbkdfDkmLengthMethod::SumOfSegments,
25082508
Endianness::Big,
2509-
NonZeroUsize::new(16).unwrap(),
2509+
NonZeroUsize::new(32).unwrap(),
25102510
);
25112511

25122512
// Instantiate KBKDF in feedback-mode without additional keys
@@ -2613,9 +2613,9 @@ fn kbkdf_additional_keys_counter_mode() -> TestResult {
26132613
// Some variables we will use throughout
26142614
let counter_format = KbkdfCounterFormat::new(Endianness::Big, NonZeroUsize::new(16).unwrap());
26152615
let dkm_length_format = KbkdfDkmLengthFormat::new(
2616-
KbkdfDkmLengthMethod::SumOfKeys,
2616+
KbkdfDkmLengthMethod::SumOfSegments,
26172617
Endianness::Big,
2618-
NonZeroUsize::new(16).unwrap(),
2618+
NonZeroUsize::new(32).unwrap(),
26192619
);
26202620

26212621
// Instantiate KBKDF in counter-mode without additional keys
@@ -2771,7 +2771,7 @@ fn kbkdf_additional_keys_feedback_mode() -> TestResult {
27712771
let dkm_length_format = KbkdfDkmLengthFormat::new(
27722772
KbkdfDkmLengthMethod::SumOfKeys,
27732773
Endianness::Big,
2774-
NonZeroUsize::new(16).unwrap(),
2774+
NonZeroUsize::new(32).unwrap(),
27752775
);
27762776

27772777
let mut derived_keys = vec![];
@@ -2953,9 +2953,9 @@ fn kbkdf_additional_keys_double_pipeline_mode() -> TestResult {
29532953

29542954
// Some variables we will use throughout
29552955
let dkm_length_format = KbkdfDkmLengthFormat::new(
2956-
KbkdfDkmLengthMethod::SumOfKeys,
2956+
KbkdfDkmLengthMethod::SumOfSegments,
29572957
Endianness::Big,
2958-
NonZeroUsize::new(16).unwrap(),
2958+
NonZeroUsize::new(32).unwrap(),
29592959
);
29602960

29612961
// Instantiate KBKDF in feedback-mode without additional keys
@@ -3087,9 +3087,9 @@ fn kbkdf_invalid_data_params_counter_mode() -> TestResult {
30873087
// Some variables we will use throughout
30883088
let counter_format = KbkdfCounterFormat::new(Endianness::Big, NonZeroUsize::new(16).unwrap());
30893089
let dkm_length_format = KbkdfDkmLengthFormat::new(
3090-
KbkdfDkmLengthMethod::SumOfKeys,
3090+
KbkdfDkmLengthMethod::SumOfSegments,
30913091
Endianness::Big,
3092-
NonZeroUsize::new(16).unwrap(),
3092+
NonZeroUsize::new(32).unwrap(),
30933093
);
30943094

30953095
/* MISSING ITERATION VARIABLE */
@@ -3236,9 +3236,9 @@ fn kbkdf_invalid_data_params_feedback_mode() -> TestResult {
32363236
// Some variables we will use throughout
32373237
let counter_format = KbkdfCounterFormat::new(Endianness::Big, NonZeroUsize::new(16).unwrap());
32383238
let dkm_length_format = KbkdfDkmLengthFormat::new(
3239-
KbkdfDkmLengthMethod::SumOfKeys,
3239+
KbkdfDkmLengthMethod::SumOfSegments,
32403240
Endianness::Big,
3241-
NonZeroUsize::new(16).unwrap(),
3241+
NonZeroUsize::new(32).unwrap(),
32423242
);
32433243

32443244
/* MISSING ITERATION VARIABLE */
@@ -3359,9 +3359,9 @@ fn kbkdf_invalid_data_params_double_pipeline_mode() -> TestResult {
33593359
// Some variables we will use throughout
33603360
let counter_format = KbkdfCounterFormat::new(Endianness::Big, NonZeroUsize::new(16).unwrap());
33613361
let dkm_length_format = KbkdfDkmLengthFormat::new(
3362-
KbkdfDkmLengthMethod::SumOfKeys,
3362+
KbkdfDkmLengthMethod::SumOfSegments,
33633363
Endianness::Big,
3364-
NonZeroUsize::new(16).unwrap(),
3364+
NonZeroUsize::new(32).unwrap(),
33653365
);
33663366

33673367
/* MISSING ITERATION VARIABLE */

0 commit comments

Comments
 (0)