The web app I am developing should be end-to-end-encrypted, but for slightly better user experience, I do not want the user to enter private keys into the client.
Instead I am planning to store the encrypted private key on the application server. The client then decrypts it with a password provided by the user. Of course to download the encrypted private key, the user has to log into the application. Hopefully with a different password as for encrypting the key. (See below)
One risk would be, that the user uses the same password for login and private key encryption, so that the application would not be end-to-end-encrypted anymore.
How do you think about this? Or are there any security issues I do not see?
(To avoid this risk, should I prehash the login password on client side?)
Thanks in advance.