Re: LibTomMath forked [SSE2 addons]

From: Phil Carmody (thefatphil_demunged_at_yahoo.co.uk)
Date: 06/28/04


Date: 28 Jun 2004 14:12:13 +0300

Tom St Denis <tom@securescience.net> writes:

> I said I'd never put asm messyness in any mainline LT project... so I forked
> LTM and created LTM-SSE. It's a very direct port of LTM that has carefully
> dropped in SSE2 optimizations [in four files only I might add...]
>
> Here are the results [for Montgomery exptmod] with GCC 3.3.3 on a 2.8Ghz
> Northwood P4.
>
> LTM-SSE
> CLK_PER_SEC == 2808950608
> Exponentiating 513-bit => 611/sec, 5659540452 ticks
>
> LTM-031
> CLK_PER_SEC == 2810915412
> Exponentiating 513-bit => 269/sec, 5666527812 ticks

That latter figure looks _way_ off the mark. A 512-bit (Barrett) expmod
in plain C (using gcc) on my Duron/900 takes <1260000 ticks, which is
716/sec.

Did you try a Barrett rather than Monty method? I considered Monty
briefly, but prefered Barrett's simplicity.

Phil

-- 
1st bug in MS win2k source code found after 20 minutes: scanline.cpp
2nd and 3rd bug found after 10 more minutes: gethost.c
Both non-exploitable. (The 2nd/3rd ones might be, depending on the CRTL)


Relevant Pages

  • Re: Blowfish Pseudocode
    ... Speed is not the goal of the LTM project. ... You are quite able to harm your reputation by yourself. ... fix the bug in due course. ... fixed precision public domain crypto library in C and Assembler FOR FREE ...
    (sci.crypt)
  • Re: LibTomMath overflow bug
    ... and you quote Vaudenay like JSH quotes Mazur. ... Where did I say "people who use LTM are idiots"? ... That you didn't find my overflow bug shows that you ...
    (sci.crypt)
  • Re: Use of LibTomMath (LTM 0.35)
    ... > We are definining our own heap functions using command line defines, ... yeah that is a typo. ... It will be in LTM ... Your welcome and thanks for the bug report. ...
    (sci.crypt)
  • LibTomMath forked [SSE2 addons]
    ... I said I'd never put asm messyness in any mainline LT project... ... LTM and created LTM-SSE. ... It's a very direct port of LTM that has carefully ...
    (sci.crypt)
  • Re: Use of LibTomMath (LTM 0.35)
    ... Tom St Denis wrote: ... glad you found the bug and I'm glad LTM is working for ya. ... We are definining our own heap functions using command line defines, ...
    (sci.crypt)