Patch to speed-up LibTomMath

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Fri Dec 19 21:24:46 WST 2008


> On Wed, Dec 17, 2008 at 11:20:07PM +0100, bodrato at mail.dm.unipi.it wrote:
>> I patched the 3-way Toom from libtommath with some simple optimizations
>> ( http://bodrato.it/software/toom.html ), now it is
>> significantly faster: on my laptop it "obsoletes" the Karatsuba code,
>
> Hi Marco,
>
> Speedups for libtommath would be of interest. I guess the
> easiest way would be to email me off-list with a patch or
> a set of the relevant files? I won't guarantee that I'll include
> the changes (given I haven't dealt with the LibTomMath code
> much in depth) though it sounds useful. I'm not 100% sure

Hi Matt,

I'll send you my code in minutes. I just have to test it against the
libtommath-0.40 included in Dropbear... since I developed it with 0.41.
The TOOM_MUL_CUTOFF and TOOM_SQR_CUTOFF constants should be computed and
set to lower values to see if this impacts somehow on performances.
If not, the best thing to do would be to completely remove Toom code, by
un-defining BN_MP_TOOM_MUL_C and BN_MP_TOOM_SQR_C.

Marco
-- 
http://bodrato.it/papers/




More information about the Dropbear mailing list