Math RSA私钥和公钥
对于如何解决这个问题,我几乎没有什么疑问:Math RSA私钥和公钥,math,rsa,Math,Rsa,对于如何解决这个问题,我几乎没有什么疑问: Xavier and Yvonne are in love. They both set up their own RSA keys: Xavier’s public key is (eX , nX ) = (887, 15833), and Yvonne’s public key is (eY , nY ) = (977, 13019). For each of the following, do not factor nX nor n
Xavier and Yvonne are in love. They both set up their own RSA keys:
Xavier’s public key is (eX , nX ) = (887, 15833), and Yvonne’s public key
is (eY , nY ) = (977, 13019). For each of the following, do not factor nX nor
nY , show the set up of the calculations and the results. You should use a
computer to perform the calculations.
(a) Yvonne wants to send Xavier a private message of love, which is
M = 3141. What is the ciphertext that Yvonne needs to send to Xavier?
(b) In return, Yvonne received three mysterious messages: C1 = 10889,
C2 = 2622, C3 = 4061. All three senders claim to be Xavier, and all
claim to have sent the message Ci ≡ MdX (mod nX) where M = 3141 and dX
is Xavier’s private key. However, only Xavier himself knows the actual
value of dX , and the other two are imposters trying to steal Yvonne away
from him. Help Yvonne determine which message is actually from Xavier,
and explain why your method works.
任何提示都很好,谢谢 a)为了发送RSA加密的消息,只有私钥持有者才能对其解密,必须使用收件人的公钥对其进行加密。在本例中,收件人是Xavier,因此使用他的公钥对消息进行加密:(eX,nX)=(88715833):
信息:M=3141
密文:C=MeX mod nX
C=3141887模块15833
C=2054
b) 这本质上是对使用Xavier私钥签名的消息的签名验证,这需要使用签名者的公钥。当使用Xavier的公钥解密时,有必要找出三条消息中的哪一条会导致发送的消息(3141):
密文1:C1=10889
消息1:M1=C1eX模块nX
M1=10889887模块15833
M1=6555(不匹配)
密文2:C2=2622
消息2:M2=C2eX模块nX
M2=2622887 mod 15833
M2=1466(不匹配)
密文3:C3=2622
消息3:M3=C3eX模块nX
M3=4061887模块15833
M3=3141(匹配!)
当使用Xavier的公钥解密时,只有C3与消息匹配,因此是唯一可信的消息
注意:我过去常常执行上面的模幂运算,但是手动使用重复乘法然后使用模n的约化来执行很容易(虽然相当耗时)。你能给我们展示一下你的尝试吗?这不是建设性的,人们不应该只是在没有解释的情况下发布他们的家庭作业。 Message: M = 3141 Ciphertext: C = MeX mod nX C = 3141887 mod 15833 C = 2054 Ciphertext 1: C1 = 10889 Message 1: M1 = C1eX mod nX M1 = 10889887 mod 15833 M1 = 6555 (mismatch) Ciphertext 2: C2 = 2622 Message 2: M2 = C2eX mod nX M2 = 2622887 mod 15833 M2 = 1466 (mismatch) Ciphertext 3: C3 = 2622 Message 3: M3 = C3eX mod nX M3 = 4061887 mod 15833 M3 = 3141 (match!)