1KCAPI_CIPHER_ENCRYPT(3)      Programming Interface     KCAPI_CIPHER_ENCRYPT(3)
2
3
4

NAME

6       kcapi_cipher_encrypt_aio - encrypt data (asynchronous one shot)
7

SYNOPSIS

9       ssize_t kcapi_cipher_encrypt_aio(struct kcapi_handle * handle,
10                                        struct iovec * iniov,
11                                        struct iovec * outiov, size_t iovlen,
12                                        const uint8_t * iv, int access);
13

ARGUMENTS

15       handle
16           [in] cipher handle
17
18       iniov
19           [in] head of scatter-gather list array holding the plaintext
20
21       outiov
22           [out] head of scatter-gather list of the destination buffers filled
23           with ciphertext
24
25       iovlen
26           [in] number of scatter-gather list entries
27
28       iv
29           [in] IV to be used for cipher operation
30
31       access
32           [in] kernel access type (KCAPI_ACCESS_HEURISTIC - use internal
33           heuristic for fastest kernel access; KCAPI_ACCESS_VMSPLICE - use
34           vmsplice access; KCAPI_ACCESS_SENDMSG - sendmsg access)
35

DESCRIPTION

37       The individual scatter-gather list entries are processed with separate
38       invocations of the the given cipher.
39
40       The memory should be aligned at the page boundary using
41       posix_memalign(sysconf(_SC_PAGESIZE)), If it is not aligned at the page
42       boundary, the vmsplice call may not send all data to the kernel.
43
44       The IV buffer must be exactly kcapi_cipher_ivsize bytes in size.
45
46       return number of bytes encrypted upon success; a negative errno-style
47       error code if an error occurred
48

AUTHOR

50       Stephan Mueller <smueller@chronox.de>
51           Author.
52
54libkcapi Manual 1.4.0             August 2022          KCAPI_CIPHER_ENCRYPT(3)
Impressum