.NET 加密:使用 RSA 与 AES 相比,内容加密是否更加困难/不同?

发布于 2024-11-03 11:52:36 字数 244 浏览 0 评论 0原文

我使用 AES 256 加密字符串“usingAES”并删除密钥文件。然后,我使用 RSA 4096 位和 AES 256 位块密码来加密另一个字符串“usingRSA”,并删除私钥文件。

给定这两个加密字符串,破解“usingRSA”字符串的加密是否比破解“usingAES”加密字符串更难?

换句话说,分组密码密钥的 RSA 加密是否有助于保护字符串?或者该部分仅因公共/私人/数据交换原因而有趣?

--
维尔纳

I encrypt the string "usingAES" using AES 256 and delete the key file. Then I encrypt another string "usingRSA" using RSA 4096 bit with AES 256 bit block cipher - and delete the private key file.

Given those two encrypted strings, is it harder for someone to break the encryption of the "usingRSA" string than it is to break the "usingAES" encrypted string?

In other words - does the RSA encryption of the block cipher key help to protect the string at all? Or is that part only interesting for public/private/data exchange reasons?

--
Werner

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

盛夏已如深秋| 2024-11-10 11:52:36
  • 解密 usingRSA 字符串并不困难。在这两种情况下,明文均已使用 AES256 进行加密(实际使用 RSA 的唯一地方是加密用于 AES 操作的密钥)。

  • 您应该假设任何攻击您的加密方案的人都知道它是如何加密的(唯一的秘密是密钥 - Kerckhoffs 原理)。

  • AES256 本身就非常安全。如果您担心它不够强大(并且您对加密有足够的了解,因此这种担心是有效的),那么您的对手就是美国国家安全局(他们已经取得了一些无人知晓的加密突破)。

  • It's no harder to decrypt the usingRSA string. In both cases, the plaintext has been encrypted using AES256 (the only place RSA is actually used is to encrypt the key that has been used for the AES operation).

  • You should assume that anyone attacking your encryption scheme knows how it's been encrypted (the only secret is the key - Kerckhoffs's Principle).

  • AES256 is plenty secure by itself. If you're concerned that it's not strong enough (and you know enough about crypto for that concern to be valid) then your adversary is the NSA (and they've made some crypto breakthroughs that no one knows about).

江南烟雨〆相思醉 2024-11-10 11:52:36

这取决于谁有权访问对称密钥。 AES 非常强大,并且在并行计算中不容易被破解(据学术界所知),这赋予了它它的力量。然而,对称密码的明显弱点是,如果您破解应用程序一侧的密钥,您就可以访问所有内容。

RSA (PKI) 式加密的优势在于您拥有公共和私有密码。这允许您执行必须将密钥提供给不安全的客户端的操作(想象一个无线电系统,您可以将公钥放在每个无线电上,如果丢失,将不允许访问整个系统(与对称密码相反,其中如果它丢失了,你的整个通信网络现在就会被渗透)

缺点是,尽管计算成本极高,但素数分解是一项可以并行完成并取得合理成功的活动,这就是为什么非对称密码的关键强度通常如此之大。比对称的大。

It comes down to who will have access to the symmetric key. AES is very strong and is not easy to crack in parallel computations (as far as the academic world knows), giving it it's strength. However the obvious weakness to the symmetric cypher is the fact that if you crack the key on one side of the app you have access to everything.

RSA (PKI) style encryption has a strength in that you have the public and private cypher. This allows you to do things where you have to give the key out to unsafe clients (imagine a radio system, you can put public keys on each radio which if lost will not allow access to the full system (as opposed to a symmetric cypher where if it were lost your entire communication network is now penetrated)

The disadvantage is that although extremely computationally expensive, factoring primes is an activity which can be done in parallel with reasonable success. This is why the key strength of a assymetric cypher is usually so much larger than a symmetric one.

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