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

NAME

6       kcapi_cipher_stream_update_last - send last data for processing
7       (stream)
8

SYNOPSIS

10       ssize_t kcapi_cipher_stream_update_last(struct kcapi_handle * handle,
11                                               struct iovec * iov,
12                                               size_t iovlen);
13

ARGUMENTS

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

DESCRIPTION

26       Using this function call, more plaintext for encryption or ciphertext
27       for decryption can be submitted to the kernel.
28
29       This call is identical to the kcapi_cipher_stream_update call with the
30       exception that it marks the last data buffer before the cipher
31       operation is triggered. This is call is important for stream ciphers
32       like CTR or CTS mode when providing the last block. It is permissible
33       to provide a zero buffer if all data including the last block is
34       already provided by kcapi_cipher_stream_update.
35

WARNING

37       If this call is not made for stream ciphers with input data that is not
38       a multiple of the block size of the block cipher, the kernel will not
39       return the last block that contains less data than the block size of
40       the block cipher. For example, sending 257 bytes of data to be
41       encrypted with ctr(aes), the kernel will return only 256 bytes without
42       this call.
43
44       return number of bytes sent to the kernel upon success; a negative
45       errno-style error code if an error occurred
46

AUTHOR

48       Stephan Mueller <smueller@chronox.de>
49           Author.
50
52libkcapi Manual 1.4.0             August 2022          KCAPI_CIPHER_STREAM_(3)
Impressum