1KCAPI_AEAD_DECRYPT_A(3) Programming Interface KCAPI_AEAD_DECRYPT_A(3)
2
3
4
6 kcapi_aead_decrypt_aio - asynchronously decrypt AEAD data (one shot)
7
9 int32_t kcapi_aead_decrypt_aio(struct kcapi_handle * handle,
10 struct iovec * iniov,
11 struct iovec * outiov, uint32_t iovlen,
12 const uint8_t * iv, int access);
13
15 handle
16 [in] cipher handle
17
18 iniov
19 [in] array of scatter-gather list with input buffers
20
21 outiov
22 [out] array of scatter-gather list with output buffers
23
24 iovlen
25 [in] number of IOVECs in array
26
27 iv
28 [in] IV to be used for cipher operation
29
30 access
31 [in] kernel access type (KCAPI_ACCESS_HEURISTIC - use internal
32 heuristic for fastest kernel access; KCAPI_ACCESS_VMSPLICE - use
33 vmsplice access; KCAPI_ACCESS_SENDMSG - sendmsg access)
34
36 The AEAD cipher operation requires the furnishing of the associated
37 authentication data. In case such data is not required, it can be set
38 to NULL and length value must be set to zero.
39
40 Each IOVEC is processed with its individual AEAD cipher operation. The
41 memory holding the input data will receive the processed data.
42
43 The memory should be aligned at the page boundary using
44 posix_memalign(sysconf(_SC_PAGESIZE)), If it is not aligned at the page
45 boundary, the vmsplice call may not send all data to the kernel.
46
47 The IV buffer must be exactly kcapi_cipher_ivsize bytes in size.
48
49 To catch authentication errors (i.e. integrity violations) during the
50 decryption operation, the return value of this call should be checked.
51 If this function returns -EBADMSG, an authentication error was
52 detected.
53
55 The kernel will only process sysconf(_SC_PAGESIZE) * ALG_MAX_PAGES at
56 one time. Longer input data cannot be handled by the kernel.
57
58 return number of bytes encrypted upon success; a negative errno-style
59 error code if an error occurred
60
62 Stephan Mueller <smueller@chronox.de>
63 Author.
64
66libkcapi Manual 1.1.5 January 2020 KCAPI_AEAD_DECRYPT_A(3)