I'm developing a password manager web app. It's just for fun: I'm not exposing anybody's passwords.
My idea was to use hashing+salting, and that's what I did for the master password. But then I realised that I have to retrieve accounts' passwords in order to use them (and I felt a bit stupid), so that hashing is not an option.
Obviously symmetric encryption is useless in this case because we have the same problem with the decryption key. And asymmetric encryption could be an option but not very practical (the user has the private key and he has to use every time he wants to get a password: not practical).
I don't know how can I use these cryptographic tools (or others) to solve this problem.
Summary: I have to store passwords in a database but I have to be able to retrieve them in plain text.