If I understand correctly, for RSA to work we need the message(cleartext) M $\in Z_n$ and gcd(M,n)=1. That is M coprime to n. This is to fulfil the requirement for Eulers theorem. How does RSA make sure this is the case, and wouldn't this mean that some cleartext cannot be encrypted? Thanks,
Asked
Active
Viewed 51 times
0
-
1dupe 1 Can RSA be used to encrypt p?. and the real dupe Does RSA work for any message M? – kelalaka Oct 03 '20 at 15:17
-
1@kelalaka . Yes the dupes answer my question. Thanks – ghetto_department Oct 03 '20 at 15:29
-
@kelalaka . I have a question to the answer of you linked question. However, I do not have enough rep to comment about this there. Maybe you know this: If two distinct primes p,q both divide a number z, will their product also divide Z? – ghetto_department Oct 03 '20 at 19:15
-
Of course, they will divide. One can prove it like if $p|z$ then there is a $k_p$ such that $z = p p_k$ and similarly $z = q q_k$. Now look at $p p_k = q q_k$. here you can conclude that $p|q_k$ since $p$ and $q$ are distinct. then write $q_k = p q_p$ then $z = p q q_p$. The rest is obvious... – kelalaka Oct 03 '20 at 19:21
-
@kelalaka . I am not following why $p | q_k$. For this to be true $p_k/q$ would have to be an integer right? but how can you be sure this is the case? my apologies if this is trivial. – ghetto_department Oct 03 '20 at 19:32
-
$p \nmid q$ then it must divide $q_k$ – kelalaka Oct 03 '20 at 19:46
-
Ah of cause, thx a lot. – ghetto_department Oct 03 '20 at 19:48
-
You can “crack” RSA by guessing a factor of n = pq. Of course your chances for a successful guess are infinitesimally small. Of course if M is the encrypted message, you can feel free to calculate gcd(M,n) and if the gcd is not 1 then RSA is cracked. But the chances of this happening are again infinitesimally small, so it’s not worthwhile for the attacker to try this, or for the defender to try to prevent it. Intentionally sending cp as an encrypted message would of course be very unwise. – gnasher729 Oct 04 '20 at 16:51