C#


ROSLYN.SECURITY.CA5351 : Do Not Use Broken Cryptographic Algorithms (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

An attack making it computationally feasible to break this algorithm exists. This allows attackers to break the cryptographic guarantees it is designed to provide. Depending on the type and application of this cryptographic algorithm, this may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA512, SHA384, or SHA256. Replace digital signature uses with RSA with a key length greater than or equal to 2048-bits, or ECDSA with a key length greater than or equal to 256 bits.

This check corresponds to Roslyn rule CA5351. For full rule details, see the Microsoft website: CA5351.

Properties

Class Name Do Not Use Broken Cryptographic Algorithms (C#)
Significance security
Mnemonic ROSLYN.SECURITY.CA5351
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Do Not Use Broken Cryptographic Algorithms (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.