News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Drizz's BigNum Library

Started by Ghandi, January 06, 2010, 10:42:18 AM

Previous topic - Next topic

Ghandi

Hi again,

I'm trying to use Drizz's BigNum library and it hangs on "bnRsaGenPrime", so i assembled one of the examples he's included. It has the same issue, simply never succeeding in generating a prime. This is different behaviour than the pre-assembled exe that is in the package, it works fine, so i was wondering whether anybody has had any success in using this lib? If you read this Drizz, any insight would be greatly appreciated. :)

It seems that its getting stuck in a loop while executing:


@@: invoke bnAddDw,bn,2
@@Test:
invoke bnTrialDivpt,bn ;Test primality of number with division, never returns other than FALSE
test eax,eax
jz @B
invoke bnFermatpt test eax,eax
jz @B


HR,
Ghandi

drizz

Yes you are right, there seems to be something different when the lib is compiled with jwasm.
Until I figure out what is wrong use the attached one.
The truth cannot be learned ... it can only be recognized.

Ghandi

Thank you for your speedy reply Drizz, i just tested the lib and it works fine. I thought i was something i had done wrong, which is what confused me when it was also having trouble with your example code. I didnt want to bother you with a PM, that is why i posted in the forum.

HR,
Ghandi

drizz

found it, jwasm generates wrong code for:
.if !ABS_BN_IS_ONE(esi)
.endif
The truth cannot be learned ... it can only be recognized.

dedndave

dang - that was fast, Drizz - lol

Ghandi

He strikes again! Thanks Drizz, you help is greatly appreciated.

HR,
Ghandi