I am working on an android app (in JAVA) which will provide register/login functionality. The problem I'm facing is that I cant make out the best way to encrypt the password and send it over to a server.
Firstly,I thought of making a MD5 hash of the password and send the hash to the server. And when the user is to login again, he'll just input the password and the app will convert the password to MD5 hash and send it over. The server would then compare the hashes and authenticate the user.
But the problem here arises that if the network were to fall prey to a man-in-the-middle attack, it'd be very easy for the attacker to send the hash to the server to gain access.
Secondly, any encryption that would be used, should not be taxing on the android device. Also would it be possible to have a encryption that will not be decrypted at the server end, but instead use the same logic as the MD5 method mentioned above?
Lastly, I came across RC4 encryption and Secure Salted Password hashing. Didn't really understand them, but the authors made a big deal out of them. So are they any good for such use?