d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Rsa
Add Reply New Topic New Poll
Member
Posts: 5,204
Joined: Dec 6 2009
Gold: 24,204.00
Feb 17 2016 10:44pm


Hey so I need help with this problem:

I know if m and p are coprime I can use Fermat's Little Theorem and then Chinese Remainder Theorem to get it but I don't know if m and p are coprime, similarly with m and q.
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Feb 18 2016 09:40am
If r is the LCM of p-1 and q-1, you can write :
r = α.(p-1)
r = β.(q-1)
for some integers α and β.

Let M a message, M^e is the encrypted message, and (M^e)^d is what you get when trying to decrypt with an exponent d.

(M^e)^d = M^(ed)

Since ed = 1 mod r, you can write : ed = 1 + k.r, for some integer k.

M^(ed) = M^(1 + k.r) = M.M^(k.r) = M.M^(kα.(p-1)) = M. ( M^(p-1) )^ (kα)

If M is not a multiple of p, then according to Fermat's theorem : M^(p-1) = 1 mod p.
Hence : M^(ed) = M. 1^(kα) = M mod p.
And : M^(ed) - M = 0 mod p : M^(ed) - M is a multiple of p.

Else, if M is a multiple of p, then the same result obviously stands.

Do the same with q : M^(ed) - M is a multiple of q.

Since it's a multiple of both p and q, that are coprime, then it's a multiple of their product n :
M^(ed) - M = 0 mod n
M^(ed) = M mod n.
Member
Posts: 5,204
Joined: Dec 6 2009
Gold: 24,204.00
Feb 18 2016 08:16pm
Thank you feanur
Go Back To Homework Help Topic List
Add Reply New Topic New Poll