1KCAPI_KPP_DH_SETPARA(3) Programming Interface KCAPI_KPP_DH_SETPARA(3)
2
3
4
6 kcapi_kpp_dh_setparam_pkcs3 - set the PG parameters using PKCS3 format
7
9 int kcapi_kpp_dh_setparam_pkcs3(struct kcapi_handle * handle,
10 const uint8_t * pkcs3,
11 uint32_t pkcs3len);
12
14 handle
15 [in] cipher handle
16
17 pkcs3
18 [in] parameter buffer in DER format
19
20 pkcs3len
21 [in] length of key buffer
22
24 With this function, the caller sets the PG parameters for subsequent
25 cipher operations.
26
27 The parameter set must be in DER format as follows
28
29 SEQUENCE { prime INTEGER ({ dh_get_p }), base INTEGER ({ dh_get_g }) }
30
31 The following command generates such parameter set where the output
32
34 openssl dhparam -outform DER -out dhparam.der 2048
35
36 Note, this function defines that the subsequent key generation and
37 shared secret operation performs an FFC Diffie-Hellman operation.
38
39 After the caller provided the key, the caller may destroy the parameter
40 as it is now maintained by the kernel.
41
42 return upon success the value of the maximum size for the KPP operation
43 is returned (e.g. the prime size); a negative errno-style error code if
44 an error occurred
45
47 Stephan Mueller <smueller@chronox.de>
48 Author.
49
51libkcapi Manual 1.4.0 July 2023 KCAPI_KPP_DH_SETPARA(3)