Reputation: 1549
In an app for a website, there is a method which needs to send user password to server(server is in .NET)
As sending plain text to server can expose user password over the network. Considering user privacy. We wish to encrypt the password with any encrypt algo before sending over the network.
Algo should conform following points 1. Should not generate any invalid XML character 2. Should give same result @ server side and iPhone side. As we tried simple XOR encryption with int key 129 it gives different result on iPHone compared to server side.
Please let me know if there are any recomendations on that.
Upvotes: 2
Views: 874
Reputation: 4179
A rather late answer! But, hope someone in the future finds it useful. What I suggest is the following.
Upvotes: 0
Reputation: 27597
Do not encrypt the password but either send it via SSL-encrypted HTTP or, even better, transmit a hashed version of the password. For the latter, on the server-side, either store a hashed version in your database and not the clear-text at all OR hash the password on login and compare with the remote (mobile) hashed version.
Upvotes: 0
Reputation: 72049
You could just use HTTPS to encrypt the network traffic. Then the only code to do is changing the URL. The only trouble is that you'll have to configure the server, however that's a very common thing to do.
Upvotes: 2
Reputation: 38734
Feels like the True method is using asymmetric cyphers with pubkeys and privkeys. Think about password safety in case of somebody extracted the key from iPhone application.
You can use Base64 or hex encoding to store crypto things in XML.
Upvotes: 0