Context used for message digest creation is associated with weak algorithm
This defect occurs when you use a cryptographic hash function that is proven to be weak against certain forms of attack.
The hash functions flagged by this checker include SHA-0, SHA-1, MD4, MD5, and RIPEMD-160. The checker detects the use of these hash functions in:
Functions from the EVP API such as EVP_DigestUpdate or
EVP_SignUpdate.
Functions from the low level API such as SHA1_Update or
MD5_Update.
You use a hash function to create a message digest from input data and thereby ensure integrity of your data. The hash functions flagged by this checker use algorithms with known weaknesses that an attacker can exploit. The attacks can comprise the integrity of your data.
Use a more secure hash function. For instance, use the later SHA functions such as SHA-224, SHA-256, SHA-384, and SHA-512.
| Group: Cryptography |
| Language: C | C++ |
| Default: Off |
Command-Line Syntax:
CRYPTO_MD_WEAK_HASH |
| Impact: Medium |
| CWE ID: 310, 327, 328, 353, 522 |