How we can predict the result of QueryPerformanceCounter? Could you elaborate on this topic?If that's the case, then your keyspace just dropped dramatically.
Welcome to the new Woodmann RCE Messageboards Regroupment
Please be patient while the rest of the site is restored.
To all Members of the old RCE Forums:
In order to log in, it will be necessary to reset your forum login password ("I forgot my password") using the original email address you registered with. You will be sent an email with a link to reset your password for that member account.
The old vBulletin forum was converted to phpBB format, requiring the passwords to be reset. If this is a problem for some because of a forgotten email address, please feel free to reregister with a new username. We are happy to welcome old and new members back to the forums! Thanks.
All new accounts are manually activated before you can post. Any questions can be PM'ed to Kayaker.
Please be patient while the rest of the site is restored.
To all Members of the old RCE Forums:
In order to log in, it will be necessary to reset your forum login password ("I forgot my password") using the original email address you registered with. You will be sent an email with a link to reset your password for that member account.
The old vBulletin forum was converted to phpBB format, requiring the passwords to be reset. If this is a problem for some because of a forgotten email address, please feel free to reregister with a new username. We are happy to welcome old and new members back to the forums! Thanks.
All new accounts are manually activated before you can post. Any questions can be PM'ed to Kayaker.
Delphi RNG reversing
As I said in earlier post this program uses QueryPerformanceCounter for initial seed. However I didn't get what you mean by
"There is only one road to human greatness: through the school of hard knocks." Albert Einstein

 Posts: 359
 Joined: Sat Nov 27, 2004 7:43 pm
 Contact:
I want to know what is predictable the range of QueryPerformanceCounter if you know. I didn't come up with any predictable range. That is why I am searching 0FFFFFFFFh range. Another problem is we also don't know how many times author generated big number. Each generation also affects RandomSeed. However, I am open to new ideas always.
"There is only one road to human greatness: through the school of hard knocks." Albert Einstein
Recca ?
Why do you search the next prime number ?
prime(M) + b = M with M the 1st random number and b a small number
prime(N) + c = N with N the 2nd random number and c a small number
So :
 choose a seed
 compute M and N
 if (M*N  P) is small enough, you probably find the seed (with P = prime(M)*prime(N)), In other words : Take the most significant 32 bits of N and M, multiply, if the result is close to the most significant bits of P, take the next 32 bits of N and M, multiply...
Bruteforce would be easy...
prime(M) + b = M with M the 1st random number and b a small number
prime(N) + c = N with N the 2nd random number and c a small number
So :
 choose a seed
 compute M and N
 if (M*N  P) is small enough, you probably find the seed (with P = prime(M)*prime(N)), In other words : Take the most significant 32 bits of N and M, multiply, if the result is close to the most significant bits of P, take the next 32 bits of N and M, multiply...
Bruteforce would be easy...
What is the relation between M, N and P?
Program generates P and Q (primes of RSA) by using Random function and searching next prime like this
The idea is if we can find fast method to find IsPrime function we can speed up searching. Because if we can recover the seed either seed of P or seed of Q we will find the prime numbers. Other than that I didn't get what you mean by M and N. drizz's code is very detailed and fast but I abandoned the project until I get my new computer.
Program generates P and Q (primes of RSA) by using Random function and searching next prime like this
Code: Select all
P=Random(Seed)
P=FindNextPrime(P)
Q=Random(Seed)
Q=FindNextPrime(Q)
N=P*Q
"There is only one road to human greatness: through the school of hard knocks." Albert Einstein
In my previous post : P = M*N.
You say :
My idea :
I use it to break RSA1024 with similar weak RNG (<1h to check all the 32bits values).
You say :
Code: Select all
P=Random(Seed)
P=FindNextPrime(P)
Q=Random(Seed)
Q=FindNextPrime(Q)
N=P*Q
Code: Select all
P'=Random(Seed)
Q'=Random(Seed)
N'=P'*Q'
if(N'N small enough)
{
P=FindNextPrime(P')
Q=FindNextPrime(Q')
if(N==P*Q)
{
Correct Seed !
}
}
I use it to break RSA1024 with similar weak RNG (<1h to check all the 32bits values).
What is that small enough number? I have searched prime gaps and found that biggest gap is 4724 for 75 digits so theoretically that number will be 4724^2= 22316176 ( http://www.trnicely.net/gaps/g4k.html ) is this info true or it is lower than that?
"There is only one road to human greatness: through the school of hard knocks." Albert Einstein
http://en.wikipedia.org/wiki/Prime_gap#Conjectures_about_gaps_between_primes
But, here, P and Q are linked together by the seed so few (P',Q') (and probably only 1) will pass the test even if you choose a too big gap...
If P and Q were independents, you would choose the gap carefully,g(pn) = O((ln pn)^2)
But, here, P and Q are linked together by the seed so few (P',Q') (and probably only 1) will pass the test even if you choose a too big gap...