1.假定我们已知若干用RSA算法编码的分组但不知私钥,假设n=pq,e是公钥.若某人告诉我们说他知道其中一有一个明文分组与n有公因子,这对我们有帮助吗?
有的,明文有公因子,则他加密的密文肯定也有,找到就行了,且gcd一定是p或q.
2.
Prove that the RSA Cryptosystem is insecure against a chosen ciphertext attack. In particular, given a ciphertext y, describe how
to choose a ciphertext y’ != y, such that knowledge of the plaintext x’ = Dk(y’) allows x = Dk(y) to be computed.
本题意思可转化为描述选择明文攻击的过程.
首先明确,攻击方拥有由密文得到明文的接口.正常发送方为S,正常接受方为A.n,e,d皆为一般定义.欲破解密文为c(题目中的x,但是我接下来不会用这个x的定义).
首先我们取一个随机数r.然后用接口解密(加密)r,得到 x = r^e%modn.
再 计算 y = x*c%n .
再计算r的逆元 t = r^-1 .
使用接口,对y进行解密. 得到 z = y^d%n.
那么计算明文m的方式就是计算(z*t)%n.
证明如下.
z*t = (x*c)^d*r^-1 = c^d * x^d * r^-1 = c^d * r * r^-1 = c^d = m.
以上式子我省略了取模,事实上皆在模域中.