Skip to content

Use of a Broken or Risky Cryptographic Algorithm

Description

The IDEA encryption algorithm is no longer recommended due to identified vulnerabilities and exploits. Consider using ChaCha20Poly1305 or AES-GCM instead.

Examples

Insecure Code

python
cryptography.hazmat.primitives.ciphers.algorithms.IDEA(...)

Secure Code

python
from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305
key = ChaCha20Poly1305.generate_key()
chacha = ChaCha20Poly1305(key)

Remediation

Replace IDEA with a secure encryption algorithm like ChaCha20Poly1305 or AES-GCM.

Rule Details

FieldValue
IDCODE-0126
CategoryCrypto
SeverityMEDIUM
CWECWE-327
ConfidenceHIGH
ImpactMEDIUM
LikelihoodMEDIUM
ExploitabilityMODERATE
Tagsencryption, vulnerability
OWASPA3:2017-Sensitive Data Exposure, A02:2021-Cryptographic Failures