cryptographycurve-25519sqrled25519

What implementions of Ed25519 exist?


The new SQRL authentication scheme relies on Curve Ed25519 encryption developed by Daniel Bernstein. However, in order to start implementing this scheme there needs to be a mature implementation of Curve Ed25519 first.

Does anyone know of any mature, implementations? For Java, .NET or any other popular platform?


Solution

  • Curve25519 vs. Ed25519

    First of all, Curve25519 and Ed25519 aren't exactly the same thing. They're based on the same underlying curve, but use different representations. Most implementations are either for Curve25519 or Ed25519, but it's possible to reuse some code between them.

    It is possible to convert Ed25519 public keys to Curve25519, but the other way round misses a sign bit. i.e. two Ed25519 public keys correspond to a single Curve25519 public key. Private keys are very similar as well.


    Concerning implementations it's important to distinguish between the actual implementation, and libraries that package them in usable form.

    Actual implementations

    djb's implementations in SUPERCOP

    He also wrote an earlier, incompatible, prototype in NaCl, don't use that one

    Floodyberry's donna implementation

    Contains several variants, both assembly and c. Some optimized for 64 bit, some optimized for 32 bit.

    Libraries


    I recommend going with LibSodium for now. It's relatively popular and well maintained. Performance is decent, should only cause performance issues in really signature heavy applications.