I was thinking about alternatives to hashes for storing passwords, and I was wondering if there was any huge security flaw with one I came up with.
If, when the user creates their account, their password is used as a key to encrypt itself and stored that way, you could validate logins by decrypting the stored password with the given password and checking if they match.
Is there any inherent theoretical problem with this idea, assuming the encryption is immune to such things as collisions and related-key attacks?