1KCAPI_CIPHER_ENCRYPT(3) Programming Interface KCAPI_CIPHER_ENCRYPT(3)
2
3
4
6 kcapi_cipher_encrypt_aio - encrypt data (asynchronous one shot)
7
9 int32_t kcapi_cipher_encrypt_aio(struct kcapi_handle * handle,
10 struct iovec * iniov,
11 struct iovec * outiov,
12 uint32_t iovlen, const uint8_t * iv,
13 int access);
14
16 handle
17 [in] cipher handle
18
19 iniov
20 [in] head of scatter-gather list array holding the plaintext
21
22 outiov
23 [out] head of scatter-gather list of the destination buffers filled
24 with ciphertext
25
26 iovlen
27 [in] number of scatter-gather list entries
28
29 iv
30 [in] IV to be used for cipher operation
31
32 access
33 [in] kernel access type (KCAPI_ACCESS_HEURISTIC - use internal
34 heuristic for fastest kernel access; KCAPI_ACCESS_VMSPLICE - use
35 vmsplice access; KCAPI_ACCESS_SENDMSG - sendmsg access)
36
38 The individual scatter-gather list entries are processed with separate
39 invocations of the the given cipher.
40
41 The memory should be aligned at the page boundary using
42 posix_memalign(sysconf(_SC_PAGESIZE)), If it is not aligned at the page
43 boundary, the vmsplice call may not send all data to the kernel.
44
45 The IV buffer must be exactly kcapi_cipher_ivsize bytes in size.
46
47 return number of bytes encrypted upon success; a negative errno-style
48 error code if an error occurred
49
51 Stephan Mueller <smueller@chronox.de>
52 Author.
53
55libkcapi Manual 1.1.5 August 2019 KCAPI_CIPHER_ENCRYPT(3)