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

NAME

6       kcapi_aead_stream_update - send more data for processing (stream)
7

SYNOPSIS

9       int32_t kcapi_aead_stream_update(struct kcapi_handle * handle,
10                                        struct iovec * iov, uint32_t iovlen);
11

ARGUMENTS

13       handle
14           [in] cipher handle
15
16       iov
17           [in] scatter/gather list with data to be processed by the cipher
18           operation.
19
20       iovlen
21           [in] number of scatter/gather list elements.
22

DESCRIPTION

24       Using this function call, more plaintext for encryption or ciphertext
25       for decryption can be submitted to the kernel.
26
27       Note, see the order of input data as outlined in
28       kcapi_aead_stream_init_dec.
29
30       This function may cause the caller to sleep if the kernel buffer
31       holding the data is getting full. The process will be woken up once
32       more buffer space becomes available by calling kcapi_aead_stream_op.
33

NOTE

35       The last block of input data MUST be provided with
36       kcapi_aead_stream_update_last as the kernel must be informed about the
37       completion of the input data.
38
39       With the separate API calls of kcapi_aead_stream_update and
40       kcapi_aead_stream_op a multi-threaded application can be implemented
41       where one thread sends data to be processed and one thread picks up
42       data processed by the cipher operation.
43

IMPORTANT NOTE

45       The kernel will only process sysconf(_SC_PAGESIZE) * ALG_MAX_PAGES at
46       one time. Longer input data cannot be handled by the kernel.
47

WARNING

49       The memory referenced by iov is not accessed by the kernel during this
50       call. The memory is first accessed when kcapi_cipher_stream_op is
51       called. Thus, you MUST make sure that the referenced memory is still
52       present at the time kcapi_cipher_stream_op is called.
53
54       return number of bytes sent to the kernel upon success; a negative
55       errno-style error code if an error occurred
56

AUTHOR

58       Stephan Mueller <smueller@chronox.de>
59           Author.
60
62libkcapi Manual 1.1.5            January 2020          KCAPI_AEAD_STREAM_UP(3)
Impressum