@@ -85,7 +85,7 @@ impl KbkdfDkmLengthFormat {
85
85
} ,
86
86
bLittleEndian : ( endianness == Endianness :: Little ) . into ( ) ,
87
87
ulWidthInBits : width_in_bits. try_into ( ) . expect (
88
- "bit width of KBKDF derived key material length value does not fit in CK_ULONG" ,
88
+ "bit width of KBKDF DKM length value does not fit in CK_ULONG" ,
89
89
) ,
90
90
} )
91
91
}
@@ -111,7 +111,8 @@ pub enum PrfDataParamType<'a> {
111
111
/// * [`PrfDataParamType::IterationVariable`] is required for the KDF in all modes.
112
112
/// * In counter-mode, [`PrfDataParamType::IterationVariable`] must contain [`KbkdfCounterFormat`].
113
113
/// In feedback- and double pipeline-mode, it must contain [`None`].
114
- /// * [`PrfDataParamType::Counter`] must not be present in counter-mode.
114
+ /// * [`PrfDataParamType::Counter`] must not be present in counter-mode, and can be present at most
115
+ /// once in feedback- and double-pipeline modes.
115
116
/// * [`PrfDataParamType::DkmLength`] can be present at most once, in any mode.
116
117
/// * [`PrfDataParamType::ByteArray`] can be present any amount of times, in any mode.
117
118
#[ derive( Debug , Clone , Copy ) ]
@@ -162,7 +163,7 @@ impl<'a> PrfDataParam<'a> {
162
163
ulValueLen : data
163
164
. len ( )
164
165
. try_into ( )
165
- . expect ( "length of data parameter does not fit in CK_ULONG" ) ,
166
+ . expect ( "length of PRF data parameter does not fit in CK_ULONG" ) ,
166
167
} ,
167
168
} ,
168
169
_marker : PhantomData ,
@@ -259,7 +260,7 @@ impl<'a> KbkdfParams<'a> {
259
260
ulNumberOfDataParams : prf_data_params
260
261
. len ( )
261
262
. try_into ( )
262
- . expect ( "number of data parameters does not fit in CK_ULONG" ) ,
263
+ . expect ( "number of PRF data parameters does not fit in CK_ULONG" ) ,
263
264
pDataParams : prf_data_params. as_ptr ( ) as cryptoki_sys:: CK_PRF_DATA_PARAM_PTR ,
264
265
ulAdditionalDerivedKeys : additional_derived_keys. as_ref ( ) . map_or ( 0 , |keys| {
265
266
keys. len ( )
@@ -331,7 +332,7 @@ impl<'a> KbkdfFeedbackParams<'a> {
331
332
ulNumberOfDataParams : prf_data_params
332
333
. len ( )
333
334
. try_into ( )
334
- . expect ( "number of data parameters does not fit in CK_ULONG" ) ,
335
+ . expect ( "number of PRF data parameters does not fit in CK_ULONG" ) ,
335
336
pDataParams : prf_data_params. as_ptr ( ) as cryptoki_sys:: CK_PRF_DATA_PARAM_PTR ,
336
337
ulIVLen : iv. map_or ( 0 , |iv| {
337
338
iv. len ( )
0 commit comments