1KCAPI_AKCIPHER_SETPU(3) Programming Interface KCAPI_AKCIPHER_SETPU(3)
2
3
4
6 kcapi_akcipher_setpubkey - set the public key for the cipher handle
7
9 int kcapi_akcipher_setpubkey(struct kcapi_handle * handle,
10 const uint8_t * key, uint32_t keylen);
11
13 handle
14 [in] cipher handle
15
16 key
17 [in] key buffer in DER format
18
19 keylen
20 [in] length of key buffer
21
23 With this function, the caller sets the key for subsequent cipher
24 operations.
25
26 The key must be in DER format as follows
27
28 SEQUENCE { n INTEGER ({ rsa_get_n }), e INTEGER ({ rsa_get_e }) }
29
30 After the caller provided the key, the caller may securely destroy the
31 key as it is now maintained by the kernel.
32
33 return upon success the value of the maximum size for the asymmetric
34 operation is returned (e.g. the modulus size); a negative errno-style
35 error code if an error occurred
36
38 Stephan Mueller <smueller@chronox.de>
39 Author.
40
42libkcapi Manual 1.4.0 January 2023 KCAPI_AKCIPHER_SETPU(3)