开发者

Encryption/decryption across multiple platforms (iOS, Android, WP7 and PHP)

I'm building an application across multiple mobile devices (iOS, Android and WP7). These platforms send data to the same server, which runs PHP (Apache 2).

What I would like to achieve is to encrypt all data that needs to be sent to the server, using the same algorithm and private key on each mobile device. PHP should then decrypt this data with the same private key.

Is there any common sol开发者_开发百科ution to achieve this?


Do you want to secure the connection from the apps to the server or do you want to secure your data from the end users on the phones? The former can be achieved by using SSL.


http://scrypt.codeplex.com

This allows you to use RSA for encryption from your WP7 device. You would only need to keep the public key on your devices to do the encryption and use the private key from your web site/service (PHP) to decrypt the data. This way you won't be exposing your key in your application as you would with a symmetric scheme like AES.


Try AES ECB encryption and decryption, you will find libraries for all the platforms.

For PHP take a look here http://phpseclib.sourceforge.net

With this library you can encrypt and decrypt data and than you can also look for Base16 encoding/decoding.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜