针对 iPhone 使用 AES 的非对称加密

发布于 2024-12-21 18:26:23 字数 117 浏览 4 评论 0原文

团队,

我想使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骷髅 2024-12-28 18:26:23

AES 是一种对称密码。它不能简单地用作非对称(即公钥)容量。

我猜您问题的原因是密钥交换问题 - 这样您就可以建立 AES 加密连接,而不必依赖预共享密钥。

存在许多有效的方法,但我只提出两个:

  1. 看看 Diffie-Hellman。您可以让连接双方就密钥达成一致,而无需实际交换该密钥。 http://en.wikipedia.org/wiki/Diffie–Hellman_key_exchange

  2. 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:

  1. 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

  2. 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文