I have RSA d (private exponent) that is 0x10001 and n (modulus).
As I understand, n is common between Private and Public keys.
Now I need to calculate e (public exponent), is it possible?
I also tried Yafu, but no result..
Masoud Rev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
6
You seem to assume that you have the private key – but you don’t. And thus, what you’re asking isn’t possible.
First, I’m willing to bet that your 0x10001
is actually the public exponent e
and not the private exponent d
, just judging from experience. And if you’re “decrypting” with it, that just sounds like you’re using the public key to verify a signature.
But it doesn’t matter, from a mathematical perspective those are one and the same. d
and e
are each other’s exponential inverse modulo n
, so if you could get e
from d
, then the same process could be applied to get d
from e
, which would break RSA.
The only known and computationally feasible way to compute the exponential inverse of a number modulo n = p*q
is to find its multiplicative inverse modulo λ(n) = lcm(p-1, q-1)
… which requires you to know p
and q
.