Main Content
Weak cipher mode
Encryption mode associated with the cipher context is weak
Description
This defect occurs when you associate a weak block cipher mode with the cipher context.
The cipher mode that is especially flagged by this defect is the Electronic Code Book (ECB) mode.
Risk
The ECB mode does not support protection against dictionary attacks.
An attacker can decrypt your data even using brute force attacks.
Fix
Use a cipher mode more secure than ECB.
For instance, the Cipher Block Chaining (CBC) mode protects against dictionary attacks by:
XOR-ing each block of data with the encrypted output from the previous block.
XOR-ing the first block of data with a random initialization vector (IV).
Examples
Result Information
Group: Cryptography |
Language: C | C++ |
Default: Off |
Command-Line Syntax: CRYPTO_CIPHER_WEAK_MODE |
Impact: Medium |
Version History
Introduced in R2017a
See Also
Topics
- Interpret Bug Finder Results in Polyspace Desktop User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)