1

Suppose I have known java BigIntegers c, e, and n, is there a way to quickly calculate the BigInteger m, where:

c = m^e (mod n)
Artjom B.
  • 61,146
  • 24
  • 125
  • 222
knarloc
  • 45
  • 4
  • What have you researched so far? – PM 77-1 May 10 '15 at 02:06
  • 3
    This problem really is not specific to Java... it's a number theory problem, no specific programming language will be able to decrypt RSA quickly without the secret key... – hft May 10 '15 at 02:11

1 Answers1

2

Well, sort of... Suppose that you have determined the number "d" such that

d*e=1  (mod phi(n))

Where phi(n) is the size of the set of relatively prime numbers relative to n. For example, if n=pq where p and q are prime, then phi(n)=(p-1)*(q-1).

Then

m=c^d (mod n)

In the case where you don't already know "d", then I think it is going to be pretty difficult for you to invert that function in general. Good luck.

hft
  • 1,245
  • 10
  • 29
  • Thanks. I thought that I needed to solve this equation to solve the problem I am trying to crack, but it seems that there is another way to get the solution (as I don't know the value for "d", solving this would be very difficult). – knarloc May 10 '15 at 02:14
  • You are being asked to break 2048 bit RSA encryption. – hft May 10 '15 at 02:19
  • The "2048" in my comment is the the "n=2048" in your previous comment that appears to have been deleted... Anyways, generally it is hard to break this encryption. – hft May 10 '15 at 02:29