Re: Assembler versus ANSI C

From: Bryan Olson (fakeaddress_at_nowhere.org)
Date: 07/31/03


Date: Thu, 31 Jul 2003 11:56:28 GMT

George Joseph wrote:

> I would like to know whether or not it will be worth the while to compute
> the time required to compute an RSA encryption/decryption, DH key
exchange,
> El-Gamal/DSA signature with different expmod & modmul techniques in
ANSI C,
> and obtain a comparison in terms of time and iterations needed by the
> Public-key cryptosystems(PKC).
>
> Or is it more beneficial to use assembler and optimise every step to
see how
> they compare to each other. The emphasis of this task is not to see how
> quickly each PKC is implemented, but rather how each PKC compares to the
> other using the same programming platform(whether it be assembler or C).
>
> So must I write the PKC algos in C or assembler?

Are you sure you want to write them yourself? You may be a fine
programmer, but people have put a lot of work into writing fast
public-key crypto code. It would take a huge amount of work to
write your own implementations that are as fast as any out
there.

The speed of an algorithm in a particular language is defined by
the fastest such implementation. If you compare slower code,
then the results are not significant.

I'd suggest surveying implementations already out there.

-- 
--Bryan


Relevant Pages

  • Re: fast scripting language
    ... One can only compare language implementations and one can always improve implementations, so one can never claim to be able to compare languages. ... So yes, non-commercial projects can use commercial software, in this case provided that they are not engaging in commerce. ...
    (comp.lang.misc)
  • Re: A simple simple comparison question
    ... CSS implementations may vary from browsers to browsers. ... As you can see, when test2 is a string, you have a ... Mozilla browser, whereas style is an object (not necessary to compare ...
    (comp.lang.javascript)
  • Re: Detect direction of stack growth
    ... > is defined for all conforming implementations with 64 bit integers. ... Stack management ... That presumes a linear address space. ... Somewhat like trying to compare two complex numbers for greater-than ...
    (comp.lang.c)
  • Re: C/C++ string comparison
    ... [snip - debate over efficiency of operator== implementations] ... Yet calling strcmp seems it would be more ... string, and when a direct compare is different, then call a lexicographical ...
    (comp.lang.cpp)
  • Re: Very poor Lisp performance
    ... > How many implementations of Ocaml are there? ... > working on Ocaml is hammering that one version. ... > Ocaml to an open source language then choose a language for which there ... > If you want to compare Ocaml to a specific implementation of Lisp, ...
    (comp.lang.lisp)