xref: /linux/Documentation/crypto/libcrypto-unauth-encryption.rst (revision f4cdf7ca9a1fdcca413157df19753f388a5a224e)
1.. SPDX-License-Identifier: GPL-2.0-or-later
2
3Unauthenticated encryption
4==========================
5
6These APIs provide support for unauthenticated encryption and decryption,
7including bare stream ciphers and other length-preserving algorithms such as
8block ciphers in XTS mode.  The legitimate use cases for these algorithms are:
9
10- Support for legacy protocols that really should have chosen an authenticated
11  mode (or even another primitive entirely) but didn't.
12
13- Internal components of authenticated modes.  For example, AES-CTR is used by
14  AES-GCM and AES-CCM internally.
15
16- Storage encryption that cannot accommodate ciphertext expansion.  Usually
17  AES-XTS is used for this.
18
19- Stream ciphers for key derivation and random number generation.
20
21Besides the above, these shouldn't be used.
22
23AES-CBC and AES-CBC-CTS
24-----------------------
25
26This API provides support for AES in the CBC and CBC-CTS modes of operation.
27
28.. kernel-doc:: include/crypto/aes-cbc.h
29
30AES-CTR and AES-XCTR
31--------------------
32
33This API provides support for AES in the CTR and XCTR modes of operation.
34
35.. kernel-doc:: include/crypto/aes-ctr.h
36
37AES-ECB
38-------
39
40This API provides support for AES in the ECB mode of operation.
41
42.. kernel-doc:: include/crypto/aes-ecb.h
43
44AES-XTS
45-------
46
47This API provides support for AES in the XTS mode of operation.
48
49.. kernel-doc:: include/crypto/aes-xts.h
50