Skip to content

RSA-version1.0

Latest
Compare
Choose a tag to compare
@Allenem Allenem released this 17 Sep 09:44
· 1 commit to RSA since this release

RSA-version1.0

算法简介

(1)公钥

选择两个互异大质数p,q,使 n=pq , phi(n)=(p-1)(q-1) ,phi(n)是欧拉函数,选择一个正整数额,使其满足与phi互质,将 Kp={e,n} 称作公钥。

(2)私钥

求出正数d使其满足 ed=1 mod phi ,将 Kp={d,n} 称作私钥。

(3)加密变换

明文M已知,密文C,C=M^e mod n

(4)解密变换

密文C已知,明文M,M=C^d mod n