Skip to content

Insecure encryption algorithm (DES)

Description

The DES algorithm has not been recommended for over 15 years and was withdrawn from NIST (FIPS 46-3) in 2005. Consider using libsodium's `crypto_secretbox_easy` authenticated encryption functions instead. If you must be FIPS compliant, consider using OpenSSL's AES or 3DES ciphers.

Examples

Insecure Code

c
EVP_des_ecb(...);

Secure Code

c
EVP_aes_256_cbc(...);

Remediation

Replace DES with a secure encryption algorithm like AES or 3DES, and consider using authenticated encryption functions like `crypto_secretbox_easy` from libsodium.

Rule Details

FieldValue
IDCODE-0586
CategoryCrypto
SeverityMEDIUM
CWECWE-327
ConfidenceHIGH
ImpactMEDIUM
LikelihoodMEDIUM
ExploitabilityEASY
Tagsencryption, DES, AES, 3DES
OWASPA3:2017-Sensitive Data Exposure, A02:2021-Cryptographic Failures