Recently, I was given the task:
Communicate with the server in encrypted form.
After wandering through all kinds of Internet, I was able to find quite a bit of useful information in this regard. Most of the articles were devoted to acquaintance with cryptography "to the top" and only locally. A la "Как зашифровать и расшифровать «Hello world» на Android" . "Как зашифровать и расшифровать «Hello world» на Android" I am also interested in the implementation process on a client-server scale. Moreover, the implementation of the server part was also entrusted to me, so it is important to know how to implement both on the client (Java) and on the server (PHP) . Ideally implement a scheme similar to Telegram:
- Private keys are determined by passing open
- The message is encrypted with its private key locally.
- Transmitted over a secure connection (within which it is encrypted again using a different algorithm / same algorithm, but with a different vector)
- Stands for the other side
The principal difference in this scheme is that in the Telegram this is done according to the клиент-клиент scheme (without decoding on the server side), in my case the server should act as the second client.
I will be grateful to any answers, especially those detailed, since in this area I am not “in the tooth's leg”.