my asm bignum library is released (v.0.01a) on my website (http://www.effervescence.com)
it is slow as hell, and might be bugged, but it might help to do some rsa, or whatever, in asm =)
critics welcomed
it is slow as hell, and might be bugged, but it might help to do some rsa, or whatever, in asm =)
critics welcomed
hey,
you might want to speed up your powmod code a little ;) (seems like you're currently using a binary method).
you could try a sliding window technique (faster, but still pretty slow ;)) or - even better - get some info on montgomery multiplication/exponentiation.
try and implement a squaring function as well (will be ~2 times faster than multiplying a number by itself using the multiplication function).
tola
you might want to speed up your powmod code a little ;) (seems like you're currently using a binary method).
you could try a sliding window technique (faster, but still pretty slow ;)) or - even better - get some info on montgomery multiplication/exponentiation.
try and implement a squaring function as well (will be ~2 times faster than multiplying a number by itself using the multiplication function).
tola
Nice work ;)
yes, the powmod algorithm is real slow, i' ll try to recode my mul, and i already planned to make a square =) i think the worst thing is not the lame way i coded it, but more that i used lame algos =) anyway, for small need, it can be already used =)
i should make it a .lib instead of including the files, i' ll work on this too
thanks thrawn =)
i should make it a .lib instead of including the files, i' ll work on this too
thanks thrawn =)
i updated my bignum library
biglib v.0.01b can be found at http://www.effervescence.com
feel free to criticize
biglib v.0.01b can be found at http://www.effervescence.com
feel free to criticize
biglib v.0.001e released
bug in memory deallocation fixed
bug in memory deallocation fixed
roy, I've always liked the design of your site - very elegant.
Also, I am unable to download the updated source.
Also, I am unable to download the updated source.
404 error
hi
bye
ok
_BigAdd32 proc uses ebx ecx edi esi,pBigx:dword,dtValue:dword,pBigy:dword
invoke _BigCopy,pBigx,pBigy
mov ecx,dtValue
test ecx,ecx
jz __ret
mov edi,pBigy
mov esi,edi
mov edx,dword ptr [edi]
clc
add edi,4
add dword ptr [edi],ecx
jnc __doneadd
__addcarry: lea edi,[edi+4] ; lea becuase we are not allowed to change to flags?
adc dword ptr [edi],0
dec edx
jc __addcarry
__doneadd: test edx,edx
ja __ret ;why ja? shouldn taht be jz ?
inc dword ptr [esi]
__ret: ret
_BigAdd32 endp
bye
ok
hi
thanks bitrake =)
i fixed the problem, you should be able to download it now (http://www.effervescence.com)
i' ll check the _bigadd comments as soon as possible, thanks for checking the code, please do post critics and comments =)
thanks bitrake =)
i fixed the problem, you should be able to download it now (http://www.effervescence.com)
i' ll check the _bigadd comments as soon as possible, thanks for checking the code, please do post critics and comments =)
roy, I had a quick look at _BigAdd32
you don't need clc there, since following adds changes CF anyway.
you don't need clc there, since following adds changes CF anyway.
A couple simple ideas with comments:
_BigAdd32 proc uses ebx ecx edi esi,pBigx:dword,dtValue:dword,pBigy:dword
; invoke _BigCopy,pBigx,pBigy
mov esi,pBigy ;you need pBigy anyway put it at start
invoke _BigCopy,pBigx,esi ;! it will allow to use it here that is faster and shorter
mov ecx,dtValue
test ecx,ecx
jz __ret
; mov edi,pBigy
; mov esi,edi
lea edi,[esi][4] ;! value aready in esi instead of mov + add we do lea once
; mov edx,dword ptr [edi]
mov edx,[esi] ;pBigy in esi now
; clc ;don't need it - add will change CF anyway
; add edi,4 ;already done by lea
add dword ptr [edi],ecx