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

NAME

6       kcapi_aead_encrypt_aio - asynchronously encrypt AEAD data (one shot)
7

SYNOPSIS

9       int32_t kcapi_aead_encrypt_aio(struct kcapi_handle * handle,
10                                      struct iovec * iniov,
11                                      struct iovec * outiov, uint32_t iovlen,
12                                      const uint8_t * iv, int access);
13

ARGUMENTS

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

DESCRIPTION

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       After invoking this function the caller should use
50       kcapi_aead_getdata_output to obtain the resulting ciphertext and
51       authentication tag references.
52

IMPORTANT NOTE

54       The kernel will only process sysconf(_SC_PAGESIZE) * ALG_MAX_PAGES at
55       one time. Longer input data cannot be handled by the kernel.
56
57       return number of bytes encrypted upon success; a negative errno-style
58       error code if an error occurred
59

AUTHOR

61       Stephan Mueller <smueller@chronox.de>
62           Author.
63
65libkcapi Manual 1.2.1             March 2021           KCAPI_AEAD_ENCRYPT_A(3)
Impressum