1KCAPI_PBKDF_ITERATIO(3) Programming Interface KCAPI_PBKDF_ITERATIO(3)
2
3
4
6 kcapi_pbkdf_iteration_count - Calculate numbers of iterations for a
7 PBKDF
8
10 uint32_t kcapi_pbkdf_iteration_count(const char * hashname,
11 uint64_t timeshresh);
12
14 hashname
15 [in] kernel crypto API name of a keyed hash (e.g. hmac(sha1))
16
17 timeshresh
18 [in] Time duration in nanoseconds that the PBKDF operation shall at
19 least require. If that value is 0, a default of (1<<27) nanoseconds
20 is used.
21
23 The function measures the time the PBKDF operation takes for different
24 round counts for the given keyed message digest type.
25
26 The result should be taken as the iteration count for a PBKDF
27 operation.
28
29 If an error occurs with the PBKDF calculation, a value of 1<<18 is
30 returned.
31
32 return number of iterations a PBKDF should take on this computer.
33
35 Stephan Mueller <smueller@chronox.de>
36 Author.
37
39libkcapi Manual 1.3.1 July 2021 KCAPI_PBKDF_ITERATIO(3)