I know there are many questions about hashing passwords on the client side out there, but none of them, which I found, address my use case.
My app will be end-to-end-encrypted and it is not an option to send the actual user password to my server. I have to hash the password on client side.
After hours of research I decided to use PBKDF2 with SHA256, but I am confused. It seems that PBKDF2 needs a salt.
I want to use the implementations from crypto-js, because I did not find other implementations for PBKDF2.
How should I generate the salt for PBKDF2? The resulting hash has to be the same for every run, because it will be the users password from the application servers perspective.
Could you additionally provide some reference code or project, where this is being done?
(The hashing is not intended to prevent MITM, but to prevent my application from knowing the password at any moment.)
Thanks in advance.
Context (as suggested by @Daisetsu)
This should be an application where small teams can store credentials, for example for network switches. All data should be end-to-end encrypted, so that companies can trust the application and even hacking the application server does not give sensitive information.
Because some users might set the same password for authentication and encryption their private keys (which I think every user will do), my server normally would be able to decrypt the private keys as the user logs in. To prevent this, it has to be hashed by the client.