Score:0

Prove the correctness of the RSA for $GCD(m_i,n)=1$ and $GCD(m_i,n) \neq1$

eg flag

How to make a proof of the correctness of the RSA encryption and decryption formula for $GCD(m_i,n)=1$ and $GCD(m_i,n) \neq1$ where encryption is defined as $c_i = m_{i}^e$ mod n and decryption $m_i = c_{i}^d$ mod n.

So thanks @poncho for giving tips, I wrote a following proof:

Recall that the integers $e > 0$ and $k > 0$ are chosen such that $ ed = 1 + k(p − 1)(q − 1)$

It suffices to show that the two congruences

$(m^e)^d \equiv m\ \textrm{mod}\ p $ and $(m^e)^d \equiv m\ \textrm{mod}\ q $ hold. p and q are distinct primes, so $gcd(p,q) = 1$ and the above congruences imply that

$(m^e)^d \equiv m\ \textrm{mod}\ n $ by the Chinese Remainder Theorem. If $m \equiv 0\ \textrm{mod}\ p $, then certainly $(m^e)^d \equiv m\ \textrm{mod}\ p $. If $m \not\equiv 0\ \textrm{mod}\ p $, then $m^{p-1} \equiv 1\ \textrm{mod}\ p $ beacuse of Fermat's little theorem ($a^{p-1} \equiv 1\ \textrm{mod}\ p $) hence,

$$ (m^e)^d \equiv m^{1 + k(p - 1)(q - 1)} \equiv m(m^{p-1})^{k(q-1)} \equiv m 1^{k(q-1)} \equiv m\ \textrm{mod}\ p $$

Therefore $(m^e)^d \equiv m\ \textrm{mod}\ p $ holds for all integers m. Replacing p by q in the previous argument shows that $m \equiv (m^e)^d \textrm{mod}\ q $ holds for all integers m

Any comments about correctness of my proof are appreciated!

kelalaka avatar
in flag
For the people who answer or upvote HW problems; This is our consensus [Do we want to update the way we handle homework questions?](https://crypto.meta.stackexchange.com/a/1117/18298) in short **Only hints and in comments.**. If you don't agree on this, go on and downvote there. Or ask a new question for the policy change!
Score:3
my flag

This is obviously a homework problem, and so I'll only give a hint:

  • Can you prove it modulo $p$ (where $p$ is one of the prime factors of $n$)? That is, can you prove that $(m^e \bmod p)^d \bmod p \equiv m \pmod p$, for any $m$?

  • Would the same proof also approve modulo $q$?

  • Given the above two, how can you show that it applies modulo $p \cdot q = n$?

jelu1999 avatar
eg flag
Thanks, @poncho! I rewrote the question with my version of proof. Hope it is correct now
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.