bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: symbol catenation and montgomery


From: Niels Möller
Subject: Re: symbol catenation and montgomery
Date: 29 Sep 2000 11:07:15 +0200

Torbjorn Granlund <address@hidden> writes:

> address@hidden (Niels Möller) writes:
> 
>   According to Henrik Grubbström (address@hidden), there are a few
>   compilers that define __STDC__ only in strict ansi mode. I can see two
>   ways to fix that, either do some autoconf test and insert a symbol in
>   gmp.h depending on the result, or doing a test using only cpp,
>   something like
>   
> There are compilers that define __STDC__ to 0 when in semi ANSI mode
> too.  But before somebody can give an example of a compiler where the
> current code really fails, I don't think we should change anything.

Grubba gave me the following examples: cc/AIX, lc/NT and elc/NT. I
haven't tried any of them personally; the reason I noticed was that
Pike's gmp-module uses a special kludges to handle those, which was
broken with the new symbol names in gmp-3.

> Is GMP slower than other packages for modular exponentiation?

The claim is that the modexp routines in both PGP and OpenSSL are
faster than GMP. And that Zmodexp and MIRACLE are even faster, on
Pentium hardware. I haven't used OpenSSL, but at least I have it
installed, so perhaps I could try doing some benchmarks. I include the
conversation leading up to those claims below.

Regards,
/Niels

: From: address@hidden
: Subject: Re: lpf.ai.mit.edu web server migration
: To: address@hidden
: Date: 26 Sep 2000 20:38:52 -0000
: 
:    Sender: address@hidden
:    Content-Type: text/plain; charset=US-ASCII
:    From: address@hidden (Niels Möller)
:    Date: 26 Sep 2000 22:27:44 +0200
: 
:    address@hidden writes:
: 
:    > Besides adding the CRT, you really want a faster arithmetic library
:    > than GMP.  But CRT would be a start.
: 
:    What libs would you recommend? Do you have any references to
:    benchmarks to back that up? What platforms do you care about? GMP-3.1
:    includes well tuned assembler for
: 
: From what I understand, the basic arithmetic in recent GMP versions is
: pretty good, but it doesn't do modular exponentials well.  There are
: special optimizations that you want for that, like Montgomery
: reduction.  If GMP does that these days, then it might compare with
: OpenSSL.  
: 
: Besides OpenSSL the only other really fast free modexp-optimized
: library that I know of is Colin Plumb's library that comes with PGP
: 5.x and also with SKIP.  One thing I knotice is that GPG (which uses
: GMP) is a heck of a lot slower than PGP, and I attribute the
: difference to PGP's very fast modexp, but I could be wrong about that.
: 
: You could also look at Mike Scott's MIRACL page (http://indigo.ie/~mscott)
: for some benchmarks, though MIRACL isn't free software.
: 
: The fastest 512-bit modexp that I know of is Dan Bernstein's, at
: 
:   http://cr.yp.to/zmodexp.html
: 
: It is free, but it *only* does 512-bit modexp (no other operations, no
: other operand sizes); its design principles are completely obscure;
: and Bernstein isn't certain that it always gives correct results.  The
: page mentions a new version in progress, but it's said that for the
: past 5 years.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]