'\" t .\" Title: kcapi_cipher_stream_init_dec .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: April 2024 .\" Manual: Programming Interface .\" Source: libkcapi Manual 1.4.0 .\" Language: English .\" .TH "KCAPI_CIPHER_STREAM_" "3" "April 2024" "libkcapi Manual 1\&.4\&.0" "Programming Interface" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" kcapi_cipher_stream_init_dec \- start a decryption operation (stream) .SH "SYNOPSIS" .HP \w'ssize_t\ kcapi_cipher_stream_init_dec('u .BI "ssize_t kcapi_cipher_stream_init_dec(struct\ kcapi_handle\ *\ " "handle" ", const\ uint8_t\ *\ " "iv" ", struct\ iovec\ *\ " "iov" ", size_t\ " "iovlen" ");" .SH "ARGUMENTS" .PP \fIhandle\fR .RS 4 [in] cipher handle .RE .PP \fIiv\fR .RS 4 [in] IV to be used for cipher operation .RE .PP \fIiov\fR .RS 4 [in] scatter/gather list with data to be encrypted\&. This is the pointer to the first iov entry if an array of iov entries is supplied\&. See sendmsg(2) for details on how iov is to be used\&. This pointer may be NULL if no data to be encrypted is available at the point of the call\&. .RE .PP \fIiovlen\fR .RS 4 [in] number of scatter/gather list elements\&. If iov is NULL, this value must be zero\&. .RE .SH "DESCRIPTION" .PP A stream decryption operation is started with this call\&. Multiple successive \fBkcapi_cipher_stream_update\fR function calls can be invoked to send more ciphertext data to be decrypted\&. The kernel buffers the input until \fBkcapi_cipher_stream_op\fR picks up the decrypted data\&. Once ciphertext is decrypted during the \fBkcapi_cipher_stream_op\fR it is removed from the kernel buffer\&. .PP The function calls of \fBkcapi_cipher_stream_update\fR and \fBkcapi_cipher_stream_op\fR can be mixed, even by multiple threads of an application\&. .PP The IV buffer must be exactly \fBkcapi_cipher_ivsize\fR bytes in size\&. .PP \fIreturn\fR number of bytes sent to the kernel upon success; a negative errno\-style error code if an error occurred .SH "AUTHOR" .PP \fBStephan Mueller\fR <\&smueller@chronox.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br