We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #182: RSA encryption
Project Euler #182: RSA encryption
Sort by
recency
|
10 Discussions
|
Please Login in order to post a comment
This can be solved via evalutaing arithemtic sums using inclusion/exclusion principle. We have to handle special case where there are no odd prime factors in phi. The most challenging part is derive conditions for candidates e and properly evaluate sums using inclusion/exlcusion principle.
This problem can be transformed into a problem of evaluating sums of the form
Those two pages shall help: https://en.wikipedia.org/wiki/Chinese_remainder_theorem https://math.stackexchange.com/questions/58373/rsa-unconcealed-messages
Can anyone give a hint to the next step? I observed that the minimum sum is always 9. So I have to find e such that 1. gcd(e, t) == 1 2. gcd(e-1, p-1) == 2 3. gcd(e-1, q-1) == 2
Terminated due to timeout after 7 Testcases? Any hints?