电子邮件回复中的 RSA 技巧

发布于 2024-10-29 08:45:13 字数 272 浏览 6 评论 0原文

A 对她的电子邮件使用 RSA 加密。 B 发现一封发给 A 的加密电子邮件:c = m^e mod n,他想知道明文。 B 知道当 A 回复她的电子邮件时,她总是在回复中包含她正在回复的邮件文本

假设A只接收长度最多为log n的位串消息,可以是 映射到 Zn。

还假设 B 不能简单地将 c 作为自己的电子邮件发送给 A 并期望得到回复,但 A 将回复除 c 之外的电子邮件。

B 如何仅使用 c、e、n 和 Zn 中的随机值来学习 m?

A uses RSA encryption for her email. B finds an encrypted email to A: c = m^e mod n that he wants to know the plain text. B knows that when A replies to her email, she always includes the text of the message she is responding to in the reply.

Assume A only receives messages that are bit strings of length at most log n, which can be
mapped to Zn.

Also assume that B cannot simply send c as his own email to A and expect a reply, but that A will respond to email messages other than c.

How can B learn m using only c, e, n and random values from Zn?

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

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

发布评论

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

评论(1

浅黛梨妆こ 2024-11-05 08:45:13

来自维基百科

RSA 具有以下特性:该产品
两个密文之和等于
产品的加密
各自的明文。即 m1^e m2^eeq(m1m2)^e (mod n) 因为
这个乘法性质 a
选择密文攻击是可能的。
例如,攻击者想知道
密文的解密 c = m^e
(mod n) 可以询问持有者
解密的私钥
看起来毫无可疑的密文 c' =
cr^e (mod n) 对于某个值 r 选择
攻击者。因为
乘法属性 c' 是
mr (mod n) 的加密。因此,如果
攻击者成功地
攻击,他将从中学习 mr (mod n)
他可以通过以下方式导出消息 m
将 mr 与模相乘
r 模 n 的倒数。

这实际上非常简洁,感谢您提出这个问题,引导我学习这一点。
至于你的3020 vs 600的问题,它是乘法;数学中很少使用连接,因为毕竟我们应该始终独立于基数工作。

From wikipedia:

RSA has the property that the product
of two ciphertexts is equal to the
encryption of the product of the
respective plaintexts. That is m1^e m2^e≡(m1m2)^e (mod n) Because
of this multiplicative property a
chosen-ciphertext attack is possible.
E.g. an attacker, who wants to know
the decryption of a ciphertext c = m^e
(mod n) may ask the holder of the
private key to decrypt an
unsuspicious-looking ciphertext c' =
cr^e (mod n) for some value r chosen by
the attacker. Because of the
multiplicative property c' is the
encryption of mr (mod n). Hence, if
the attacker is successful with the
attack, he will learn mr (mod n) from
which he can derive the message m by
multiplying mr with the modular
inverse of r modulo n.

That's actually pretty neat, thanks for asking the question that lead me to learning this.
As for your question of 3020 vs 600, it's multiplicative; rarely are concatenations used in mathematics, since after all we should always be working independent of base.

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