针对 iPhone 使用 AES 的非对称加密
团队,
我想使用 Objective C 对 iPhone 应用程序使用 AES 算法进行非对称加密。 我广泛看到使用 AES 的对称加密,因此我不确定 AES 对非对称加密的支持。请就此向我提出建议。
Team,
I would like to have asymmetric encryption using AES algorithm for iPhone application using Objective C.
I have widely seen symmetric encryption using AES, so im not sure about the support for asymmetric encryption with AES. Kindly suggest me on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AES 是一种对称密码。它不能简单地用作非对称(即公钥)容量。
我猜您问题的原因是密钥交换问题 - 这样您就可以建立 AES 加密连接,而不必依赖预共享密钥。
存在许多有效的方法,但我只提出两个:
看看 Diffie-Hellman。您可以让连接双方就密钥达成一致,而无需实际交换该密钥。 http://en.wikipedia.org/wiki/Diffie–Hellman_key_exchange
RSA。我是牡丹的粉丝。它是免费的。有用。您可以在双方生成公钥/私钥对,交换公钥,然后安全地交换私钥,然后启动 AES。 http://botan.randombit.net/pubkey.html
与往常一样,此建议需要伴随着警告:很容易错误地执行此操作,并且很大程度上(或完全)阻碍您的安全工作。小心行事。
AES is a symmetric cipher. It can't simply be used an an asymmetric (i.e., public-key) capacity.
I am guessing the reason for your question is the issue of key exchange - such that you can establish an AES-encrypted connection without having to rely on a pre-shared key.
Numerous valid approaches exist, but I'll just hit on two:
Take a look at or Diffie-Hellman. You can get both sides of a connection to agree on a key without actually having to exchange that key. http://en.wikipedia.org/wiki/Diffie–Hellman_key_exchange
RSA. I'm a fan of Botan. It's free. It works. You can generate public/private key pairs on both sides, exchange the public keys, then securely exchange private keys, and then start AES. http://botan.randombit.net/pubkey.html
As always, this advice needs to be accompanied with a warning: it's very easy to do this incorrectly and largely (or entirely) thwart your security efforts. Tread carefully.