Skip to content

Inadequate encryption strength

Description

DES, TripleDES and RC2 are all considered broken or insecure cryptographic algorithms. Newer algorithms apply message integrity to validate ciphertext has not been tampered with. Consider using `ChaCha20Poly1305` instead as it is easier and faster than the alternatives such as `AES-256-GCM`.

Examples

Insecure Code

java
javax.crypto.Cipher.getInstance("DES");

Secure Code

java
Cipher chaChaCipher = Cipher.getInstance("ChaCha20-Poly1305/None/NoPadding");

Remediation

Replace DES with a secure encryption algorithm like ChaCha20Poly1305.

Rule Details

FieldValue
IDCODE-0686
CategoryCrypto
SeverityMEDIUM
CWECWE-326
ConfidenceHIGH
ImpactHIGH
LikelihoodMEDIUM
ExploitabilityEASY
Tagsinsecure encryption, DES
OWASPA3:2017-Sensitive Data Exposure, A02:2021-Cryptographic Failures