S
S
StynuBlizz2017-02-01 10:22:06
Android
StynuBlizz, 2017-02-01 10:22:06

How to process and send data in android to the server to form an https connection?

How to organize https connection in android? To begin with, I will go through the scheme so that it is clearer what exactly I want:

  • The client requests a secure connection from the server and sends data about the encryption algorithm used, etc.
  • The server sends a certificate with a key
  • The client checks the validity of the certificate
  • If everything is fine, then I send the generated key for symmetric encryption to the server, which I encrypted with the public key of the server
  • The server accepting, it confirms that the connection is established
  • Next, I send all messages by encrypting them before this with my key, the server decrypts them with it

So, to begin with, I’ll ask if the scheme is correct (if not, tell me where and what is wrong)? If so, how do I do all this client logic, namely: How to handle the certificate, generate a key, add a MAC to the request, and so on. What libraries can be used to do this?
Ps I understand that the question is very general, so you can simply describe common tools and brief explanations and recommendations for them, but if you decide to write a detailed answer, I will be very grateful.
Pps everything I read on the Internet did not bring any clarity about how to organize the connection from a to z.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2017-02-02
@StynuBlizz

So, to begin with, I’ll ask if the scheme is correct (if not, tell me where and what is wrong)? If so, how do I do all this client logic, namely: How to handle the certificate, generate a key, add a MAC to the request, and so on. What libraries can be used to do this?
And now - deobfuscation:
All the details on how the protocol works are here .
Function to create a secure HTTPS connection on Android: HttpsURLConnection

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question