I am writing an encryption program using C#. My goal is to secure files even if the computer is stolen and somehow logged into.
Assumptions
- The code used to write the program is visible to a malicious user
- The password hash used in the program's login process is also visible
Concerns
- I am using the same password to:
- Derive an AES encryption key using
Rfc2898DeriveBytes
- Login to the software by comparing a stored
SHA256
hash
- Derive an AES encryption key using
- I don't know if the stored hash can be used to figure out the encryption key
Notes
I use two different salts: one for the hash and the other for the key. I'm not sure if this really helps though because they are both stored in plain text along with the user's password hash.
Does using a PBKDF and a SHA256 hashing algorithm on the same password text present a security risk in a single computer application?