I am curious how secure the following approach is for authentication:
- By every account I encrypt data with known structure using a symmetric algorithm (e.g. AES or twofish) with a password derived key. The data can be for example a JSON encoded object an XML or anything else, which is easy to verify. I use different IVs by every account, a secure mode of operation, block encryption, etc...
- By login I try to decrypt the cipher text with a key derived from the given password.
- If the resulting data has the proper structure, then the password was ok and the user is authenticated. Otherwise the password was wrong and the login attempt failed.
Is there any drawback by this approach compared to the usual password salting and hashing?