I'm storing a client's password in his device and there are times when clients need to send their password to server.
- When a client connects to me(server),
- I give him a key that will be used for encryption.
- I want a client to send a encrypted password by the key.
- Server will decrypt the password with the key(which was stored) and verify the password.
Even if it may not be perfect, it sounds more secure than using one static key stored in client and server.
Sounds simple enough and I was looking at c++ encryption library(crypto++), bleh looks too complicated.
Found there is a easy one to use. Keyczar.
But doesn't seem to offer the functionality that I need.
Keyczar seems to require to generate a file that will hold encryption key, and this file is generated by one of their tools, which will be too much hassle to do it on the fly.
If this can be done in c++ or keyczar(I may have missed what it can do)
please enlighten me how to.
Thank you.
Linux/Mac platform.