views:

131

answers:

2

My iphone application wants to connect to server by giving username and password. How can I send this password securely. Anyone please help. I am a beginner.

A: 

This depends on the reasons you are submitting a username and password. If you are submitting the username and password to your own service, then simply use Transport Layer Security (TLS), as it will generate an encrypted session and all data sent during the session will be encrypted. If you are trying to login to an online web service, you will probably need to follow whatever authentication protocol that particular web service uses. Many websites use OAuth, for example. If you are connecting to such a service, you should also see if there are any client libraries available for communicating with that service as many popular web services already have code available to communicate and authenticate with them.

Michael Aaron Safyan
+1  A: 

If you are unable to use SSL for some reason but you have control over the server side, you may try a "Challenge-response authentication" 1.

iwat