Re: is it sufficient to solve factoring problem
- From: mm <mm@xxxxxxxxxx>
- Date: Thu, 27 Apr 2006 16:15:33 +0200
Christian Siebert a écrit :
For the main question: I think it should be sufficient because 'e*d
\equiv 1 (mod phi(N))' or in other words 'e*d - 1 \equiv 0 (mod
phi(N))'. So 'e*d - 1' is already a multiple of 'phi(N)'. Since you
also know 'N' itself, it should be possible to determine 'phi(N)' using
a greatest common divisor algorithm and maybe Euler's theorem or
similar...
... it is even more simple because the two prime factors are nearly
of the same size in RSA: 'k*phi(N) = k*(p - 1)*(q - 1)'.
Therefore 'k*phi(N) = k*p*q - k*p - k*q + k' which can be rewritten as
'k*phi(N) = k*(N - p - q + 1)'. Since 'N' is much larger than
'p + q - 1', it is easy to find 'k': 'k = ceil(k*phi(N)/N)'.
Small example: The command "openssl genrsa -out rsa.key 100" generates
an RSA key pair with a 100 bit long modulus. Execute
"openssl rsa -in rsa.key -text" to print the key:
modulus 'N' = 1033328981239965908482322556937
public exponent 'e' = 65537
private exponent 'd' = 419137041797792997701877718877
[You'll also get the two prime numbers, but this is what we want to
calculate now.]
1st step: calculate 'k * phi(N) = e*d - 1'
( 'k * phi(N) = 27468984308301959690387960062041948' )
2nd step: calculate 'k = ceil(k * phi(N) / N)' and extract 'phi(N)'
( 'k = 26583' and 'phi(N) = 1033328981239963875047510065156' )
3rd step: use 'phi(N) = (p - 1)*(q - 1)' and 'N = p * q' to find the
factors of 'N'
( 'p, q = (N + 1 - phi(N))/2 +/- sqrt(((N + 1 - phi(N))/2)^2 - N)' )
( 'p, q = 1016717406245891 +/- 19629134555712' )
( => 'p = 1036346540801603' and 'q = 997088271690179' ) ;-)
Yes. But is "e*d - 1" always a multiple of Phi(N)? I mean, knowing
that N,e,d are RSA keys [*], it is sure that "e*d - 1" is divisible
by "p-1" and by "q-1", but is it always divisible by "(p-1)*(q-1)"?
[*] Which makes very probable that d is not "1/e mod Phi(N)" but
"1/e mod lcm(p-1,q-1)".
mm
.
- Follow-Ups:
- Re: is it sufficient to solve factoring problem
- From: Christian Siebert
- Re: is it sufficient to solve factoring problem
- From: Sebastian Gottschalk
- Re: is it sufficient to solve factoring problem
- References:
- is it sufficient to solve factoring problem
- From: laicko
- Re: is it sufficient to solve factoring problem
- From: Christian Siebert
- Re: is it sufficient to solve factoring problem
- From: Christian Siebert
- is it sufficient to solve factoring problem
- Prev by Date: Re: Compression leads to encryption NEW COMPRESSION METHOD!
- Next by Date: Re: Compression leads to encryption NEW COMPRESSION METHOD!
- Previous by thread: Re: is it sufficient to solve factoring problem
- Next by thread: Re: is it sufficient to solve factoring problem
- Index(es):
Relevant Pages
|
|