[Haskell-cafe] ANN: crypto-pubkey: all your public key crypto algorithms belong to us.
tab at snarc.org
Tue Jan 15 09:49:49 CET 2013
On Mon, Jan 14, 2013 at 01:49:44PM +0100, Daniel Fischer wrote:
> On Monday 14 January 2013, 12:36:22, Vincent Hanquez wrote:
> > On Sat, Jan 12, 2013 at 02:12:44PM +0100, Ertugrul Söylemez wrote:
> > > > I've spend some good chunk of time adding KATs and tests,
> > > > documentation, and making sure the performance was ahead of other
> > > > haskell implementations.
> > >
> > > I suggest looking at Daniel Fischer's arithmoi  library, which
> > > implements very fast Integer operations and should provide most
> > > functionality needed. However, beware of timing attacks.
> > Very cool library and very similar to what crypto-numbers provides albeit
> > less sophisticated.
> I see you're doing a lot of x `shiftR` 1 with Integers. That's pretty bad for
> performance (at least for integer-gmp, might be not for integer-simple or
> implementations other than GHC [last I looked, JHC didn't have arbitrary
> precision Integers and used 64-bit ones, so it'd be fast there]).
Yes, the performance are terrible in term of integers. As the library is
specific to public key algorithm, i just can't reasonable work on 64 bits
integer :-), and multiprecision integers is the only way to go.
I'm on-and-off working on some mutable mpi library to be able to
define pure function that do the necessary stuff (i.e. expmod, mulmod, etc..)
I'm hoping this could be reasonably competitive with a C mpi library,
but time will tell.
More information about the Haskell-Cafe