开发者

Implement RSA/ AES encryption on client and server

I want to implement an application in android (as client) who sends an encrypted string to php server and php server will decrypt that string.

There is no开发者_运维问答 any problem to encryption logic, but I have no idea about how can share my key(if I use AES/ RSA).

Please post some examples or links where I can understand how can I share my keys to server and client.


To do this securely, you have to design a cryptographic protocol. If you don't know how to share keys, chances are you are not qualified to do so (few people are). So your best bet is to just use SSL. It will handle both authentication (through certificates), and encryption (by generating a session key each time you connect and using it to encrypt data). Both RSA and AES (or some other symmetric cipher) will be used in the process.

If you are using PHP, all you need to do on the server is to set up Apache for SSL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜