xref: /linux/Documentation/crypto/libcrypto-unauth-encryption.rst (revision d47db9bf50d28647689e6743ee93c45cb755ffc3)
15ab301fcSEric Biggers.. SPDX-License-Identifier: GPL-2.0-or-later
25ab301fcSEric Biggers
35ab301fcSEric BiggersUnauthenticated encryption
45ab301fcSEric Biggers==========================
55ab301fcSEric Biggers
65ab301fcSEric BiggersThese APIs provide support for unauthenticated encryption and decryption,
75ab301fcSEric Biggersincluding bare stream ciphers and other length-preserving algorithms such as
85ab301fcSEric Biggersblock ciphers in XTS mode.  The legitimate use cases for these algorithms are:
95ab301fcSEric Biggers
105ab301fcSEric Biggers- Support for legacy protocols that really should have chosen an authenticated
115ab301fcSEric Biggers  mode (or even another primitive entirely) but didn't.
125ab301fcSEric Biggers
135ab301fcSEric Biggers- Internal components of authenticated modes.  For example, AES-CTR is used by
145ab301fcSEric Biggers  AES-GCM and AES-CCM internally.
155ab301fcSEric Biggers
165ab301fcSEric Biggers- Storage encryption that cannot accommodate ciphertext expansion.  Usually
175ab301fcSEric Biggers  AES-XTS is used for this.
185ab301fcSEric Biggers
195ab301fcSEric Biggers- Stream ciphers for key derivation and random number generation.
205ab301fcSEric Biggers
215ab301fcSEric BiggersBesides the above, these shouldn't be used.
225ab301fcSEric Biggers
233cbcf6a2SEric BiggersAES-CBC and AES-CBC-CTS
243cbcf6a2SEric Biggers-----------------------
253cbcf6a2SEric Biggers
263cbcf6a2SEric BiggersThis API provides support for AES in the CBC and CBC-CTS modes of operation.
273cbcf6a2SEric Biggers
283cbcf6a2SEric Biggers.. kernel-doc:: include/crypto/aes-cbc.h
293cbcf6a2SEric Biggers
301f2d69a3SEric BiggersAES-CTR and AES-XCTR
311f2d69a3SEric Biggers--------------------
321f2d69a3SEric Biggers
331f2d69a3SEric BiggersThis API provides support for AES in the CTR and XCTR modes of operation.
341f2d69a3SEric Biggers
351f2d69a3SEric Biggers.. kernel-doc:: include/crypto/aes-ctr.h
361f2d69a3SEric Biggers
375ab301fcSEric BiggersAES-ECB
385ab301fcSEric Biggers-------
395ab301fcSEric Biggers
405ab301fcSEric BiggersThis API provides support for AES in the ECB mode of operation.
415ab301fcSEric Biggers
425ab301fcSEric Biggers.. kernel-doc:: include/crypto/aes-ecb.h
43*de9cccc5SEric Biggers
44*de9cccc5SEric BiggersAES-XTS
45*de9cccc5SEric Biggers-------
46*de9cccc5SEric Biggers
47*de9cccc5SEric BiggersThis API provides support for AES in the XTS mode of operation.
48*de9cccc5SEric Biggers
49*de9cccc5SEric Biggers.. kernel-doc:: include/crypto/aes-xts.h
50