ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1141. RSA Attack

This problem involves number theory???
Posted by Miguel Angel 9 Dec 2001 09:18
This problem involves number theory???
Re: This problem involves number theory???
Posted by mon 4 Apr 2002 11:37
> This problem involves number theory???

yes, you can refer to chapter 33 of Introduction to Algorithms,
MIT Press, there covers enough knowledge you need to solve the
problem.

suppose d is multiplicative inverse of e, modulo (p - 1)(q - 1),
where p * q = n

then the answer should be c^d (mod n)
Could you tell me where I can find this book?
Posted by Tony 10 Jul 2003 17:29
> > This problem involves number theory???
>
> yes, you can refer to chapter 33 of Introduction to Algorithms,
> MIT Press, there covers enough knowledge you need to solve the
> problem.
>
> suppose d is multiplicative inverse of e, modulo (p - 1)(q - 1),
> where p * q = n
>
> then the answer should be c^d (mod n)
Re: This problem involves number theory???
Posted by Yu Xin 10 Mar 2006 20:12
Thanks!
Re: This problem involves number theory???
Posted by Felix_Mate 17 Aug 2016 14:40
Но ведь ответ не всегда верен! Контрпример:
e=3
n=15 (p=3,q=5)
c=3

GCD(e,(p-1)(q-1))=GCD(3,8)=1
e<(p-1)(q-1)

e*d=1 modulo (2*4) => d=3
m=c^d (modulo n)=3^3 mod (15)=(15+12) modulo (15)=12 (modulo 15) != 3 modulo (15)=c modulo (15)

Проблема возникает в случае GCD(c,n)>1 (p or q (if pq then c=0 mod (n))). Автор забыл упомянуть, что GCD(c,n)=1 или мне повезло с АС?

Edited by author 17.08.2016 14:41