RSA找到了公共指数的逆。

[英]RSA finding the inverse of the public exponent


I have a very basic doubt in RSA key generation and its usage.

我对RSA密钥生成及其用法有一个非常基本的怀疑。

In RSA key generation you choose two large prime numbers of a very large order. Then you multiply them.(eq p * q = N) Now, Euler(N)=(p-1)(q-1). Now you find a number 0 < e < Euler(N) such that e and Euler(N) are coprime. {e.Euler(N)} becomes your public key. Now you compute d(private key) such that e * d =1 (mod(Euler(N))).
Now suppose you encrypt something(m) with your the public key - c=m^e(mod(N)). And now while decrypting with the private key(d), you do c^d(mod(N)).
Now my doubt is that you found out the inverse of e in mod(Euler(N)), but when you are decrypting you are doing it in mod(N). How is this possible?

在RSA密钥生成中,你选择了两个大的质数数目。然后相乘。(eq p * q = N)现在,欧拉(N)=(p-1)(q-1)。现在你找到了一个0 < e < Euler(N), e和Euler(N)是coprime。{e.Euler(N)}成为你的公钥。现在计算d(私钥),比如e * d =1 (mod(Euler(N)))。现在假设你与你的公钥加密(m)的东西- c = m ^ e(mod(N))。现在在解密私钥(d),你做c ^ d(mod(N))。现在我的疑问是你在mod(Euler(N))中发现了e的逆(Euler(N)),但是当你解密的时候,你是在mod(N)中做的。这怎么可能?

1 个解决方案

#1


4  

See wikipedia here and here. Basically, you want to decryption to "undo" encryption. Since e*d = 1 mod φ(N) is equivalent to e*d = 1 + k*φ(N) for some integer k, you have:

看看维基百科。基本上,您需要解密以“撤消”加密。因为e * d = 1 modφ(N)相当于e * d = 1 + k *φ为整数k(N),有:

cd mod N = (me)d mod N = m(e*d) mod N = m(1 + k*φ(N)) = (m1) * (mφ(N))k mod N

cd mod N =(我)d mod N = m(e * d)mod N = m(1 + k *φ(N))=(m1)*(mφ(N))k mod N

by application of the following rules you learned in algebra:

运用以下的代数规则:

1) axy = (ax)y = (ay)x, and
2) ax+y = ax * ay

1)axy = (ax)y = (ay)x, (2) ax+y = ax * ay。

To finish this and simplify (m1) * (mφ(N))k mod N, remember that aφ(N) = 1 mod N, so

为了完成这个和简化(m1) * (m (N))k mod N,记得a (N) = 1 mod N,所以。

(mφ(N))k mod N = 1k = 1 mod N.

(mφ(N))k mod N = 1 k = 1 mod N。

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2012/04/06/72038e5646f7857581ea288cdc33c6a3.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告