C#


ROSLYN.SECURITY.CA5373 : Do not use obsolete key derivation function (C#)

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

Summary

Password-based key derivation should use PBKDF2 with SHA-2. Avoid using PasswordDeriveBytes since it generates a PBKDF1 key. Avoid using Rfc2898DeriveBytes.CryptDeriveKey since it doesn't use the iteration count or salt.

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

Properties

Class Name Do not use obsolete key derivation function (C#)
Significance security
Mnemonic ROSLYN.SECURITY.CA5373
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 obsolete key derivation function (C#)"

Relevant Configuration File Parameters

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