How to protect traffic between an iOS application and a server?

I am creating an application that receives JSON-encoded data from a web server. Right now, anyone can access a script server that receives data, and potentially access sensitive data.

So, what is the best way to ensure that an application is what receives data and protects traffic between the server and the application? Server - script - this is PHP.

Thanks.

+8
php ios objective-c iphone data-transfer
source share
2 answers

You must use nonces

Here is a great tutorial on how to generate an MD5 hash in C:

http://www.saobart.com/md5-has-in-objective-c/

+4
source share

So, what is the best way to ensure that the application is what receives the data

In general, you cannot. The best you can do is use some kind of login system, but anyone who sniffs packages can figure it out.

and protect traffic between the server and the application?

Use TLS, i.e. HTTPS using SSL.

+1
source share

Source: https://habr.com/ru/post/650276/


All Articles