AES加密在两个iPhone和Android做 [英] AES Encryption done on both Iphone and Android

查看:107
本文介绍了AES加密在两个iPhone和Android做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在创建的Andr​​oid和iPhone相同的项目。现在的问题是,我们需要以加密形式使用Web服务的用户信息发送到服务器的aspx。我们都已经实现了,但结果diiferent所以有这将产生同样的结果,可以在服务器解析常见的AES加密方法。

We are creating same project in android and iphone. Now problem is that we need to send user information to aspx server using webservice in encrypted form. We both have implemented it but results are diiferent so is there a common AES encryption method which will produce same result and can be parsed at server.

请尽快回复,我的工作得到,因为它影响的。

Please reply as soon as possible, my work get affected because of it.

在此先感谢

推荐答案

AES加密/解密会产生就可以了相同的结果是所提供的相同的参数。特别感兴趣的是

AES encryption/decryption will produce the same results on it it is provided the same parameters. Of particular interest are


  1. 加密密钥值和大小

  2. 模式:CBC,ECB,等等。(你或许应该使用CBC)

  3. (四)需要对大多数的模式初始化向量

  4. 浸轧法:PKCS7等(AES是一种分组密码,需要输入
    在块大小的倍数)

由于一开始选择了简单的测试数据,得到的工作和进入更复杂的情况。例如:最初选择没有填充只有一个块的大小全部为0,CBC,数据的IV。当这是工作的开始增加更多的复杂性。

As a start chose simple test data, get that working and move into more complex situations. Ex: initially choose an iv of all 0, CBC, data of exactly one block size with no padding. When that is working start adding in more complexity.

安全性是不容易的,加密的部分是比较容易的部分。

Security is not easy, the encryption part is the easy part.

或者使用SSL。

有关参考和学习基本上是需要知道的一切都在应用密码学手册这是一个免费的(和法律)PDF下载,精装版也可购买。优点使用这本书,甚至我的妻子在她的工作。​​

For reference and learning basically everything one needs to know is in the Handbook of Applied Cryptography it is a free (and legal) pdf download, a hardcover version can also be purchased. Pros use this book, even my wife in her work.

这篇关于AES加密在两个iPhone和Android做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆