Skip to content

Commit b6c5d04

Browse files
committed
Additional warnings in cipher.h
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
1 parent 4ff0231 commit b6c5d04

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

include/mbedtls/cipher.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ typedef enum {
103103
/**
104104
* \brief Supported {cipher type, cipher mode} pairs.
105105
*
106-
* \warning RC4 and DES are considered weak ciphers and their use
107-
* constitutes a security risk. Arm recommends considering stronger
106+
* \warning RC4 and DES/3DES are considered weak ciphers and their use
107+
* constitutes a security risk. We recommend considering stronger
108108
* ciphers instead.
109109
*/
110110
typedef enum {
@@ -140,12 +140,12 @@ typedef enum {
140140
MBEDTLS_CIPHER_CAMELLIA_128_GCM, /**< Camellia cipher with 128-bit GCM mode. */
141141
MBEDTLS_CIPHER_CAMELLIA_192_GCM, /**< Camellia cipher with 192-bit GCM mode. */
142142
MBEDTLS_CIPHER_CAMELLIA_256_GCM, /**< Camellia cipher with 256-bit GCM mode. */
143-
MBEDTLS_CIPHER_DES_ECB, /**< DES cipher with ECB mode. */
144-
MBEDTLS_CIPHER_DES_CBC, /**< DES cipher with CBC mode. */
145-
MBEDTLS_CIPHER_DES_EDE_ECB, /**< DES cipher with EDE ECB mode. */
146-
MBEDTLS_CIPHER_DES_EDE_CBC, /**< DES cipher with EDE CBC mode. */
147-
MBEDTLS_CIPHER_DES_EDE3_ECB, /**< DES cipher with EDE3 ECB mode. */
148-
MBEDTLS_CIPHER_DES_EDE3_CBC, /**< DES cipher with EDE3 CBC mode. */
143+
MBEDTLS_CIPHER_DES_ECB, /**< DES cipher with ECB mode. \warning DES is considered weak. */
144+
MBEDTLS_CIPHER_DES_CBC, /**< DES cipher with CBC mode. \warning DES is considered weak. */
145+
MBEDTLS_CIPHER_DES_EDE_ECB, /**< DES cipher with EDE ECB mode. \warning 3DES is considered weak. */
146+
MBEDTLS_CIPHER_DES_EDE_CBC, /**< DES cipher with EDE CBC mode. \warning 3DES is considered weak. */
147+
MBEDTLS_CIPHER_DES_EDE3_ECB, /**< DES cipher with EDE3 ECB mode. \warning 3DES is considered weak. */
148+
MBEDTLS_CIPHER_DES_EDE3_CBC, /**< DES cipher with EDE3 CBC mode. \warning 3DES is considered weak. */
149149
MBEDTLS_CIPHER_BLOWFISH_ECB, /**< Blowfish cipher with ECB mode. */
150150
MBEDTLS_CIPHER_BLOWFISH_CBC, /**< Blowfish cipher with CBC mode. */
151151
MBEDTLS_CIPHER_BLOWFISH_CFB64, /**< Blowfish cipher with CFB64 mode. */
@@ -226,11 +226,11 @@ typedef enum {
226226
enum {
227227
/** Undefined key length. */
228228
MBEDTLS_KEY_LENGTH_NONE = 0,
229-
/** Key length, in bits (including parity), for DES keys. */
229+
/** Key length, in bits (including parity), for DES keys. \warning DES is considered weak. */
230230
MBEDTLS_KEY_LENGTH_DES = 64,
231-
/** Key length in bits, including parity, for DES in two-key EDE. */
231+
/** Key length in bits, including parity, for DES in two-key EDE. \warning 3DES is considered weak. */
232232
MBEDTLS_KEY_LENGTH_DES_EDE = 128,
233-
/** Key length in bits, including parity, for DES in three-key EDE. */
233+
/** Key length in bits, including parity, for DES in three-key EDE. \warning 3DES is considered weak. */
234234
MBEDTLS_KEY_LENGTH_DES_EDE3 = 192,
235235
};
236236

0 commit comments

Comments
 (0)