'\" t .\" Title: crypto_aead_encrypt .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Programming Interface .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "CRYPTO_AEAD_ENCRYPT" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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" crypto_aead_encrypt \- encrypt plaintext .SH "SYNOPSIS" .HP \w'int\ crypto_aead_encrypt('u .BI "int crypto_aead_encrypt(struct\ aead_request\ *\ " "req" ");" .SH "ARGUMENTS" .PP \fIreq\fR .RS 4 reference to the aead_request handle that holds all information needed to perform the cipher operation .RE .SH "DESCRIPTION" .PP Encrypt plaintext data using the aead_request handle\&. That data structure and how it is filled with data is discussed with the aead_request_* functions\&. .PP IMPORTANT NOTE The encryption operation creates the authentication data / tag\&. That data is concatenated with the created ciphertext\&. The ciphertext memory size is therefore the given number of block cipher blocks + the size defined by the crypto_aead_setauthsize invocation\&. The caller must ensure that sufficient memory is available for the ciphertext and the authentication tag\&. .SH "RETURN" .PP 0 if the cipher operation was successful; < 0 if an error occurred .SH "AUTHORS" .PP \fBStephan Mueller\fR <\&smueller@chronox.de\&> .RS 4 Author. .RE .PP \fBMarek Vasut\fR <\&marek@denx.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br