views:

121

answers:

1

I'm currently investigating the use of curve25519 for signing. Original distribution can be obtained here and a C code implementation here or here.

Bernstein suggest to use ECDSA for this but I could not find any code.

+3  A: 

ECDSA is specified by ANSI X9.62. That standard defines the kind of curves on which ECDSA is defined, including details curve equations, key representations and so on. These do not match Curve25519: part of the optimizations which make Curve25519 faster than standard curves of the same size rely on the special curve equation, which does not enter in X9.62 formalism. Correspondingly, there cannot be any implementation of ECDSA which both conforms to ANSI X9.62, and uses Curve25519. In practice, I know of no implementation of an ECDSA-like algorithm on Curve25519.

To be brief, you are on your own. You may want to implement ECDSA over the Curve25519 implementation by following X9.62 (there a draft from 1998 which can be downloaded from several places, e.g. there, or you can spend a hundred bucks and get the genuine 2005 version from Techstreet). But be warned that you are walking outside of the carefully trodden paths of analyzed cryptography; in other words I explicitly deny any kind of guarantee on how secure that kind-of-ECDSA would be.

My advice would be to stick to standard curves (such as NIST P-256). Note that while Curve25519 is faster than most curves of the same size, smaller standard curves will be faster, and yet provide adequate security for most purposes. NIST P-192, for instance, provides "96-bit security", somewhat similar to 1536-bit RSA. Also, standard curves already provide performance on the order of several thousands signature per second on a small PC, and I have trouble imagining a scenario where more performance is needed.

Thomas Pornin
Thank you very much. My goal was to get compact signatures and preferably fast to verify. I red in the mean time some articles reporting that an rsa signature may be 5 time faster to verify than an ECDSA signature. This is problematic for my type of application where signatures must be checked by message relay servers.Any code for NIST P-192 to suggest I could use and benchamrk ?
chmike
Try OpenSSL (http://www.openssl.org/). It is both a library and a command-line tool. The command-line tool (included in every decent version of Linux) has a "speed" option which runs a benchmark.
Thomas Pornin
If you want fast verification, use Bernstein's Rabin-based signature scheme and probabilistic verification - blazingly fast.
Paul Crowley