| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "EVP_AES_128_GCM 3SSL" |
| 58 |
.TH EVP_AES_128_GCM 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
EVP_aes_128_cbc, |
| 65 |
EVP_aes_192_cbc, |
| 66 |
EVP_aes_256_cbc, |
| 67 |
EVP_aes_128_cfb, |
| 68 |
EVP_aes_192_cfb, |
| 69 |
EVP_aes_256_cfb, |
| 70 |
EVP_aes_128_cfb1, |
| 71 |
EVP_aes_192_cfb1, |
| 72 |
EVP_aes_256_cfb1, |
| 73 |
EVP_aes_128_cfb8, |
| 74 |
EVP_aes_192_cfb8, |
| 75 |
EVP_aes_256_cfb8, |
| 76 |
EVP_aes_128_cfb128, |
| 77 |
EVP_aes_192_cfb128, |
| 78 |
EVP_aes_256_cfb128, |
| 79 |
EVP_aes_128_ctr, |
| 80 |
EVP_aes_192_ctr, |
| 81 |
EVP_aes_256_ctr, |
| 82 |
EVP_aes_128_ecb, |
| 83 |
EVP_aes_192_ecb, |
| 84 |
EVP_aes_256_ecb, |
| 85 |
EVP_aes_128_ofb, |
| 86 |
EVP_aes_192_ofb, |
| 87 |
EVP_aes_256_ofb, |
| 88 |
EVP_aes_128_cbc_hmac_sha1, |
| 89 |
EVP_aes_256_cbc_hmac_sha1, |
| 90 |
EVP_aes_128_cbc_hmac_sha256, |
| 91 |
EVP_aes_256_cbc_hmac_sha256, |
| 92 |
EVP_aes_128_ccm, |
| 93 |
EVP_aes_192_ccm, |
| 94 |
EVP_aes_256_ccm, |
| 95 |
EVP_aes_128_gcm, |
| 96 |
EVP_aes_192_gcm, |
| 97 |
EVP_aes_256_gcm, |
| 98 |
EVP_aes_128_ocb, |
| 99 |
EVP_aes_192_ocb, |
| 100 |
EVP_aes_256_ocb, |
| 101 |
EVP_aes_128_wrap, |
| 102 |
EVP_aes_192_wrap, |
| 103 |
EVP_aes_256_wrap, |
| 104 |
EVP_aes_128_wrap_pad, |
| 105 |
EVP_aes_192_wrap_pad, |
| 106 |
EVP_aes_256_wrap_pad, |
| 107 |
EVP_aes_128_xts, |
| 108 |
EVP_aes_256_xts |
| 109 |
\&\- EVP AES cipher |
| 110 |
.SH SYNOPSIS |
| 111 |
.IX Header "SYNOPSIS" |
| 112 |
.Vb 1 |
| 113 |
\& #include <openssl/evp.h> |
| 114 |
\& |
| 115 |
\& const EVP_CIPHER *EVP_ciphername(void) |
| 116 |
.Ve |
| 117 |
.PP |
| 118 |
\&\fIEVP_ciphername\fR is used a placeholder for any of the described cipher |
| 119 |
functions, such as \fIEVP_aes_128_cbc\fR. |
| 120 |
.SH DESCRIPTION |
| 121 |
.IX Header "DESCRIPTION" |
| 122 |
The AES encryption algorithm for EVP. |
| 123 |
.IP "\fBEVP_aes_128_cbc()\fR, \fBEVP_aes_192_cbc()\fR, \fBEVP_aes_256_cbc()\fR, \fBEVP_aes_128_cfb()\fR, \fBEVP_aes_192_cfb()\fR, \fBEVP_aes_256_cfb()\fR, \fBEVP_aes_128_cfb1()\fR, \fBEVP_aes_192_cfb1()\fR, \fBEVP_aes_256_cfb1()\fR, \fBEVP_aes_128_cfb8()\fR, \fBEVP_aes_192_cfb8()\fR, \fBEVP_aes_256_cfb8()\fR, \fBEVP_aes_128_cfb128()\fR, \fBEVP_aes_192_cfb128()\fR, \fBEVP_aes_256_cfb128()\fR, \fBEVP_aes_128_ctr()\fR, \fBEVP_aes_192_ctr()\fR, \fBEVP_aes_256_ctr()\fR, \fBEVP_aes_128_ecb()\fR, \fBEVP_aes_192_ecb()\fR, \fBEVP_aes_256_ecb()\fR, \fBEVP_aes_128_ofb()\fR, \fBEVP_aes_192_ofb()\fR, \fBEVP_aes_256_ofb()\fR" 4 |
| 124 |
.IX Item "EVP_aes_128_cbc(), EVP_aes_192_cbc(), EVP_aes_256_cbc(), EVP_aes_128_cfb(), EVP_aes_192_cfb(), EVP_aes_256_cfb(), EVP_aes_128_cfb1(), EVP_aes_192_cfb1(), EVP_aes_256_cfb1(), EVP_aes_128_cfb8(), EVP_aes_192_cfb8(), EVP_aes_256_cfb8(), EVP_aes_128_cfb128(), EVP_aes_192_cfb128(), EVP_aes_256_cfb128(), EVP_aes_128_ctr(), EVP_aes_192_ctr(), EVP_aes_256_ctr(), EVP_aes_128_ecb(), EVP_aes_192_ecb(), EVP_aes_256_ecb(), EVP_aes_128_ofb(), EVP_aes_192_ofb(), EVP_aes_256_ofb()" |
| 125 |
AES for 128, 192 and 256 bit keys in the following modes: CBC, CFB with 128\-bit |
| 126 |
shift, CFB with 1\-bit shift, CFB with 8\-bit shift, CTR, ECB, and OFB. |
| 127 |
.IP "\fBEVP_aes_128_cbc_hmac_sha1()\fR, \fBEVP_aes_256_cbc_hmac_sha1()\fR" 4 |
| 128 |
.IX Item "EVP_aes_128_cbc_hmac_sha1(), EVP_aes_256_cbc_hmac_sha1()" |
| 129 |
Authenticated encryption with AES in CBC mode using SHA\-1 as HMAC, with keys of |
| 130 |
128 and 256 bits length respectively. The authentication tag is 160 bits long. |
| 131 |
.Sp |
| 132 |
WARNING: this is not intended for usage outside of TLS and requires calling of |
| 133 |
some undocumented ctrl functions. These ciphers do not conform to the EVP AEAD |
| 134 |
interface. |
| 135 |
.IP "\fBEVP_aes_128_cbc_hmac_sha256()\fR, \fBEVP_aes_256_cbc_hmac_sha256()\fR" 4 |
| 136 |
.IX Item "EVP_aes_128_cbc_hmac_sha256(), EVP_aes_256_cbc_hmac_sha256()" |
| 137 |
Authenticated encryption with AES in CBC mode using SHA256 (SHA\-2, 256\-bits) as |
| 138 |
HMAC, with keys of 128 and 256 bits length respectively. The authentication tag |
| 139 |
is 256 bits long. |
| 140 |
.Sp |
| 141 |
WARNING: this is not intended for usage outside of TLS and requires calling of |
| 142 |
some undocumented ctrl functions. These ciphers do not conform to the EVP AEAD |
| 143 |
interface. |
| 144 |
.IP "\fBEVP_aes_128_ccm()\fR, \fBEVP_aes_192_ccm()\fR, \fBEVP_aes_256_ccm()\fR, \fBEVP_aes_128_gcm()\fR, \fBEVP_aes_192_gcm()\fR, \fBEVP_aes_256_gcm()\fR, \fBEVP_aes_128_ocb()\fR, \fBEVP_aes_192_ocb()\fR, \fBEVP_aes_256_ocb()\fR" 4 |
| 145 |
.IX Item "EVP_aes_128_ccm(), EVP_aes_192_ccm(), EVP_aes_256_ccm(), EVP_aes_128_gcm(), EVP_aes_192_gcm(), EVP_aes_256_gcm(), EVP_aes_128_ocb(), EVP_aes_192_ocb(), EVP_aes_256_ocb()" |
| 146 |
AES for 128, 192 and 256 bit keys in CBC-MAC Mode (CCM), Galois Counter Mode |
| 147 |
(GCM) and OCB Mode respectively. These ciphers require additional control |
| 148 |
operations to function correctly, see the "AEAD INTERFACE" in \fBEVP_EncryptInit\fR\|(3) |
| 149 |
section for details. |
| 150 |
.IP "\fBEVP_aes_128_wrap()\fR, \fBEVP_aes_192_wrap()\fR, \fBEVP_aes_256_wrap()\fR, \fBEVP_aes_128_wrap_pad()\fR, \fBEVP_aes_192_wrap_pad()\fR, \fBEVP_aes_256_wrap_pad()\fR" 4 |
| 151 |
.IX Item "EVP_aes_128_wrap(), EVP_aes_192_wrap(), EVP_aes_256_wrap(), EVP_aes_128_wrap_pad(), EVP_aes_192_wrap_pad(), EVP_aes_256_wrap_pad()" |
| 152 |
AES key wrap with 128, 192 and 256 bit keys, as according to RFC 3394 section |
| 153 |
2.2.1 ("wrap") and RFC 5649 section 4.1 ("wrap with padding") respectively. |
| 154 |
.IP "\fBEVP_aes_128_xts()\fR, \fBEVP_aes_256_xts()\fR" 4 |
| 155 |
.IX Item "EVP_aes_128_xts(), EVP_aes_256_xts()" |
| 156 |
AES XTS mode (XTS-AES) is standardized in IEEE Std. 1619\-2007 and described in NIST |
| 157 |
SP 800\-38E. The XTS (XEX-based tweaked-codebook mode with ciphertext stealing) |
| 158 |
mode was designed by Prof. Phillip Rogaway of University of California, Davis, |
| 159 |
intended for encrypting data on a storage device. |
| 160 |
.Sp |
| 161 |
XTS-AES provides confidentiality but not authentication of data. It also |
| 162 |
requires a key of double-length for protection of a certain key size. |
| 163 |
In particular, XTS\-AES\-128 (\fBEVP_aes_128_xts\fR) takes input of a 256\-bit key to |
| 164 |
achieve AES 128\-bit security, and XTS\-AES\-256 (\fBEVP_aes_256_xts\fR) takes input |
| 165 |
of a 512\-bit key to achieve AES 256\-bit security. |
| 166 |
.Sp |
| 167 |
The XTS implementation in OpenSSL does not support streaming. That is there must |
| 168 |
only be one \fBEVP_EncryptUpdate\fR\|(3) call per \fBEVP_EncryptInit_ex\fR\|(3) call (and |
| 169 |
similarly with the "Decrypt" functions). |
| 170 |
.Sp |
| 171 |
The \fIiv\fR parameter to \fBEVP_EncryptInit_ex\fR\|(3) or \fBEVP_DecryptInit_ex\fR\|(3) is |
| 172 |
the XTS "tweak" value. |
| 173 |
.SH NOTES |
| 174 |
.IX Header "NOTES" |
| 175 |
Developers should be aware of the negative performance implications of |
| 176 |
calling these functions multiple times and should consider using |
| 177 |
\&\fBEVP_CIPHER_fetch\fR\|(3) with \fBEVP_CIPHER\-AES\fR\|(7) instead. |
| 178 |
See "Performance" in \fBcrypto\fR\|(7) for further information. |
| 179 |
.SH "RETURN VALUES" |
| 180 |
.IX Header "RETURN VALUES" |
| 181 |
These functions return an \fBEVP_CIPHER\fR structure that contains the |
| 182 |
implementation of the symmetric cipher. See \fBEVP_CIPHER_meth_new\fR\|(3) for |
| 183 |
details of the \fBEVP_CIPHER\fR structure. |
| 184 |
.SH "SEE ALSO" |
| 185 |
.IX Header "SEE ALSO" |
| 186 |
\&\fBevp\fR\|(7), |
| 187 |
\&\fBEVP_EncryptInit\fR\|(3), |
| 188 |
\&\fBEVP_CIPHER_meth_new\fR\|(3) |
| 189 |
.SH COPYRIGHT |
| 190 |
.IX Header "COPYRIGHT" |
| 191 |
Copyright 2017\-2025 The OpenSSL Project Authors. All Rights Reserved. |
| 192 |
.PP |
| 193 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 194 |
this file except in compliance with the License. You can obtain a copy |
| 195 |
in the file LICENSE in the source distribution or at |
| 196 |
<https://www.openssl.org/source/license.html>. |