MathWiki
|
November 21, 2024, at 11:45 AM | MathWiki / MathWiki / RSASystem |
|
RSASystemWe need some theorems from Number Theory.
Now, we can describe the RSA System. Let $p$ and $q$ be distinct primes. Put $\phi=(p-1)(q-1)$ and $n=pq$. Choose $e$ with $1<e<\phi$ and $\text{gcd}(e,\phi)=1$. Also take $d$ with $1<d<\phi$ and $de\equiv 1\pmod\phi$. Now, announce $(e,n)$ as the public key, while keep $d$ secret. A message is an $m$ with $1\leq m<n$ and $\text{gcd}(m,n)=1$. The cipher for $m$ is $c\equiv m^e\pmod n$ and $1\leq c<n$. <b>Claim.</b> <i>If $m$ and $n$ are coprime, and $c\equiv m^e\pmod n$. Then $c^d\equiv m\pmod n$.</i> <i>Proof.</i> Assume the $m$ and $n$ are coprime and let $c\equiv m^e\pmod n$. From $\text{gcd}(m,n)=1$, we have $p$ and $q$ do not divide $m$, and so $p$ does not divide $m^{q-1}$ and $q$ does not divide $m^{p-1}$. By Fermat's Little Theorem, one gets $m^\phi=(m^{p-1})^{q-1}\equiv 1\pmod q$ and $m^\phi=(m^{q-1})^{p-1}\equiv1\pmod p$. As $p$ and $q$ are distinct primes, we have $m^\phi\equiv 1\pmod n$. From $de\equiv 1\pmod\phi$, we write $de=k\phi+1$ for some $k$. Therefore, $c^d=m^{de}=m^{k\phi+1}=m\cdot m^{k\phi}\equiv m \pmod n$ as claimed. $\Box$ <b>Note.</b> Among the numbers from $1$ to $n=pq$, there are $\phi$ of them comprime to $n$. Thus, the chance to pick up one that is not comprime to $n$ is $1-\frac{\phi}{n}=1-\big(1-\frac1p\big)\big(1-\frac1q\big)=\frac1p+\frac1q-\frac1{pq}$. When $p$ and $q$ are large, this is very small. |
Validate the XHTML and CSS of this page. | Page last modified on June 09, 2012, at 09:15 AM | Edit History Print Recent Changes |
Powered by PmWiki |