Main Content
Constant cipher key
Encryption or decryption key is constant instead of randomized
Description
This defect occurs when you use a constant for the encryption or decryption key.
Risk
If you use a constant for the encryption or decryption key, an attacker can retrieve your key easily.
You use a key to encrypt and later decrypt your data. If a key is easily retrieved, data encrypted using that key is not secure.
Fix
Produce a random key by using a strong random number generator.
For a list of random number generators that are cryptographically
weak, see Vulnerable pseudo-random
number generator
.
Examples
Result Information
Group: Cryptography |
Language: C | C++ |
Default: Off |
Command-Line Syntax: CRYPTO_CIPHER_CONSTANT_KEY |
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)