I'm not a security expert, so I might be asking a silly question, but let me describe what I am thinking about.
First, I know that a lot of web sites store hashed/encrypted passwords which could be decrypted by brute force attack once the table on db is hacked. Hackers might even be able to use the passwords in other websites and access other confidential info.
Given that AES cannot be broken why can't we just use a logic similar to the authenticated encryption? here is another relevant link. For example,
- Prepare 1kb random binary file as expected file.
- Encrypt the expected file using a hashed password
- When a user logs in the system, validate the password by decrypting the encrypted file and check against the expected file. If fails reject the log-in. I suppose we can use the same logic for secret questions and answers for resetting password without actually storing answers.
If the confidential files are also encrypted using the password, then I guess the user will not be able to reset password. Is there any way to do it?
While writing this, I found a very similar question, but they are talking about client side decryption and I'm talking about server side (or only within the local system).
I'd really appreciate any comments and suggestions.