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       ssize_t kcapi_aead_stream_update(struct kcapi_handle * handle,
10                                        struct iovec * iov, size_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

WARNING

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

AUTHOR

54       Stephan Mueller <smueller@chronox.de>
55           Author.
56
58libkcapi Manual 1.4.0             August 2022          KCAPI_AEAD_STREAM_UP(3)
Impressum