I've been reading about password storage, and have basically found 2 commonly used techniques.
- encrypting all of the passwords stored with a single key.
- Using hashes
- Using hashes with salt.
Is there a flaw in storing the password "encrypted by itself", i.e. encrypting a txt which says password1
with the password password1
without storing it unencrypted, and when a user wants to log in, decrypt, compare and grant access (or not)?
I am not very literate in this topic, so, can somebody enlighten me?