1KCAPI_AKCIPHER_STREA(3) Programming Interface KCAPI_AKCIPHER_STREA(3)
2
3
4
6 kcapi_akcipher_stream_init_enc - start an encryption operation (stream)
7
9 ssize_t kcapi_akcipher_stream_init_enc(struct kcapi_handle * handle,
10 struct iovec * iov,
11 size_t iovlen);
12
14 handle
15 [in] cipher handle
16
17 iov
18 [in] scatter/gather list with data to be encrypted. This is the
19 pointer to the first iov entry if an array of iov entries is
20 supplied. See sendmsg(2) for details on how iov is to be used. This
21 pointer may be NULL if no data to be encrypted is available at the
22 point of the call.
23
24 iovlen
25 [in] number of scatter/gather list elements. If iov is NULL, this
26 value must be zero.
27
29 A stream encryption operation is started with this call. Multiple
30 successive kcapi_akcipher_stream_update function calls can be invoked
31 to send more plaintext data to be encrypted. The last invocation to
32 supply data must be done with kcapi_akcipher_stream_update_last. The
33 kernel buffers the input until kcapi_akcipher_stream_op picks up the
34 encrypted data. Once plaintext is encrypted during the
35 kcapi_cipher_stream_op it is removed from the kernel buffer.
36
37 The function calls of kcapi_akcipher_stream_update and
38 kcapi_akcipher_stream_op can be mixed, even by multiple threads of an
39 application.
40
41 return number of bytes sent to the kernel upon success; a negative
42 errno-style error code if an error occurred
43
45 Stephan Mueller <smueller@chronox.de>
46 Author.
47
49libkcapi Manual 1.4.0 August 2022 KCAPI_AKCIPHER_STREA(3)