views:

89

answers:

1

When I use C# to implement the AES symmetric encryption cipher, I noticed:

PasswordDeriveBytes derivedPassword = new PasswordDeriveBytes(password, saltBytesArray, hashAlgorithmName, numPasswordIterations);

Why do I need to use a hashing algorithm for AES encryption? Aren't they separate? Or is the hashing algorithm only used to create a secure key?

The AES algorithm doesn't use a hashing algorithm internally does it?

+2  A: 

PasswordDeriveBytes isn't part of AES. It implements an algorithm to derive encryption keys from a password. The algorithm involves the usage of a hash algorithm.

dtb