How to process and send data in android to the server for forming a https connection?

How to organize a https connection in android? For starters, go over the diagram to make it clearer what I exactly want:
  • The client asks the server for a secure connection and sends data about the used algorithm, encryption etc
  • The server sends a certificate with a key
  • The client checks the certificate for validity
  • If all the rules, then send to serv a generated key for a symmetric encryption, I encrypted the public key of the server
  • The server is accepting, this is to confirm that the connection is established
  • Then I send all messages encrypting them before this key,the server decrypts them

So start to ask the correct schema (if not then tell me what is wrong and where)? If so, how do I do all this client-side logic , namely How to handle the certificate generate key add MAC to the query and so on. With the help of some libraries to do this?
P. s I understand that the question is very General, so you can just describe General tools and brief explanations-recommendations to them, but if you decide to write a detailed answer I would be very grateful.
P. p.s everything I read on the Internet has not brought any clarity about how to arrange this connection from a to I.
August 19th 19 at 22:44
1 answer
August 19th 19 at 22:46
Solution
So start to ask the correct schema (if not then tell me what is wrong and where)? If so, how do I do all this client-side logic , namely How to handle the certificate generate key add MAC to the query and so on. With the help of some libraries to do this?
And now deobfuscation:
Tell me: how to do HTTPS on their own the points? With the help of some libraries to do this?

Answer:
One of the most common applications of TLS is HTTPS. HTTPS are rapidly replacing the insecure version (HTTP): percentage of encrypted web traffic grows, most likely, in the near future (several years, 2016) almost all web traffic will be encrypted. In the new version of HTTP/2 data protection using TLS will be used by default. Due to this situation, SSL/TLS is one of the most studied, researched protocols of the modern Internet.

All the details on the Protocol here.

A function for creating secure HTTPS connections on Android: HttpsURLConnection
Thanks for the link,I read it,but it did not answer the question of how to implement all of this on android what tools you need? - mariah_Lang commented on August 19th 19 at 22:49
: https://developer.android.com/training/articles/se... - Wayne commented on August 19th 19 at 22:52
This article only talks about how to check the certificate and all - mariah_Lang commented on August 19th 19 at 22:55
article* - mariah_Lang commented on August 19th 19 at 22:58

Find more questions by tags AndroidCryptography