arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Proof of correctness

We now consider cd=med=mc^d = m^{ed} = mcd=med=mnecessary for the successful description of an RSA ciphertext. The core of this result is due to Euler's theoremarrow-up-right which states

aΟ•(n)≑1mod  na^{\phi(n)} \equiv 1 \mod naΟ•(n)≑1modn

for all coprime integers (a,n)(a,n)(a,n) and Ο•(n)\phi(n)Ο•(n) is Euler's totient functionarrow-up-right.

circle-info

As a reminder, we say two integers are coprime if they share no non-trivial factors. This is the same statement that gcd⁑(a,n)=1\gcd(a,n)=1gcd(a,n)=1.

From the definition of the protocol, we have that

for some . Combining this with Euler's theorem, we see that we recover from the ciphertext

When the requirement does not hold, we can instead look at the equivalences modulo and respectively. Clearly, when we have that and our correctness still holds. Now, consider the case where we have that and Since we have already excluded the case that we can conclude that as is prime. This means that and by the multiplicative properties of the function, we determine that We conclude by invoking the Chinese Remainder theorem with

that The case for follows in a parallel manner.

ed≑1mod  ϕ(n),β€…β€Šβ€…β€Šβ‡’β€…β€Šβ€…β€Šed=1+kΟ•(n)ed \equiv 1 \mod \phi(n), \;\; \Rightarrow \;\; ed = 1 + k\phi(n)ed≑1modΟ•(n),β‡’ed=1+kΟ•(n)
k∈Zk \in \mathbb{Z}k∈Z
mmm
cd≑(me)dmod  n≑medmod  n≑mkΟ•+1mod  n≑mkΟ•mmod  n≑(mΟ•)kmmod  n≑1kmmod  n≑mmod  n\begin{align} c^d &\equiv (m^e)^d &&\mod n \\ &\equiv m^{ed} &&\mod n \\ &\equiv m^{k\phi + 1} &&\mod n \\ &\equiv m^{k\phi} m &&\mod n \\ &\equiv (m^\phi)^km &&\mod n \\ &\equiv 1^km &&\mod n \\ &\equiv m &&\mod n \\ \end{align}cd​≑(me)d≑med≑mkΟ•+1≑mkΟ•m≑(mΟ•)km≑1km≑m​​modnmodnmodnmodnmodnmodnmodn​​
gcd⁑(m,n)=1\gcd(m, n) = 1gcd(m,n)=1
ppp
qqq
gcd⁑(m,n)=n,\gcd(m, n) = n,gcd(m,n)=n,
c≑m≑0mod  nc \equiv m \equiv 0 \mod nc≑m≑0modn
m=kβ‹…p,m = k\cdot p,m=kβ‹…p,
c≑m≑0mod  pc \equiv m \equiv 0 \mod pc≑m≑0modp
cd≑(me)d(modq).c^d \equiv (m^e)^d \pmod q.cd≑(me)d(modq).
gcd⁑(m,q)=q,\gcd(m, q) = q,gcd(m,q)=q,
gcd⁑(m,q)=1,\gcd(m, q) = 1,gcd(m,q)=1,
qqq
mβ„“Ο•(q)≑1mod  qm^{\ell\phi(q)} \equiv 1 \mod qmβ„“Ο•(q)≑1modq
Ο•\phiΟ•
mβ„“nΟ•(n)=mβ„“Ο•(q)≑1mod  q.m^{\ell_n\phi(n)} = m^{\ell\phi(q)} \equiv 1 \mod q.mβ„“n​ϕ(n)=mβ„“Ο•(q)≑1modq.
m≑0mod  pm≑1β„“mmod  q\begin{align*} m &\equiv 0 &&\mod p \\ m &\equiv 1^\ell m &&\mod q\\ \end{align*}mm​≑0≑1β„“m​​modpmodq​
meβ‹…d≑mmod  n.m^{e\cdot d} \equiv m \mod n.meβ‹…d≑mmodn.
m=kβ‹…qm = k\cdot qm=kβ‹…q