+ Using broken or weak cryptographic algorithms can leave data + vulnerable to being decrypted or forged by an attacker. +
+ ++ Many cryptographic algorithms provided by cryptography + libraries are known to be weak, or flawed. Using such an + algorithm means that encrypted or hashed data is less + secure than it appears to be. +
+ +
+ This query alerts on any use of a weak cryptographic algorithm, that is
+ not a hashing algorithm. Use of broken or weak cryptographic hash
+ functions are handled by the
+ rust/weak-sensitive-data-hashing query.
+
+ Ensure that you use a strong, modern cryptographic + algorithm, such as AES-128 or RSA-2048. +
+ +
+ The following code uses the des crate from the
+ RustCrypto family to encrypt some secret data. The
+ DES algorithm is old and considered very weak.
+
+ Instead we should use a strong modern algorithm. In this + case we have selected the 256-bit version of the AES + algorithm. +
+ +