This is the code that I use for the "hash" (or output the key as called in PBKDF2 in the PKCS standard) line passwords with the class Rfc2898DeriveBytes represented in .NET:
int saltSize = 256; int iterations = 1000; int keySize = 20;
Now I understand that the size of the salt doesn't matter much (if that's enough to make sure random salts are unique), but what about the key size? Does a longer key provide more protection against attacks?
(Note:
1. Performance issues do not import for me here, it is obvious that a longer salt or a longer key will require more time for GetBytes to return a value.
2. I want to use this "hash" to store them in the database, and not use them later in the encryption scheme)
c # passwords cryptography hash pkcs # 5
Otiel
source share