GithubHelp home page GithubHelp logo

Comments (8)

indutny avatar indutny commented on August 20, 2024

Added jodid to benchmarks suite: c0374dd .

Regarding triple-dh, it is not explicitly supported, but it is possible to perform it manually using key.getPrivate() and point.mul(num).

from elliptic.

indutny avatar indutny commented on August 20, 2024

Interestingly enough, jodid seems to be much faster than elliptic.js, at least on curve25519. I have no idea why this is happening, but surely will try to close the gap and catch it ;)

from elliptic.

indutny avatar indutny commented on August 20, 2024

Ok, great news! The benchmark was incorrect, the elliptic.js is only a bit slower (10%, not two times), than jodid. Still it performs better, and I'll try to see what could be improved to at least match it!

from elliptic.

pohutukawa avatar pohutukawa commented on August 20, 2024

Hmm, on my i7 developer laptop the speed difference is ~42% between the two. I have adapted the curve25519 test for jodid25519 a bit to better reflect what the elliptic test does (no significance though to performance), and I have added two tests for ed25519 sign and verify. Though, something seems a bit fishy with the verify test. The signing on jodid25519 is about 4 times as slow compared to elliptic, which is probably due to the less efficient use of jsbn for the 512 bit integers, as the more efficient 256 bit integer code for curve25519 isn't fully sufficient.

Find the fork with just the updated benchmarks/index.js here:

https://github.com/pohutukawa/elliptic

from elliptic.

indutny avatar indutny commented on August 20, 2024

@pohutukawa I'm using i7 developer laptop too, you are probably using node.js v0.10.x, which has pretty outdated v8. Give a try to v0.11.x, it is much faster there. Anyway there seems to be some performance problem and it just degrades more on v0.10.x.

Regarding your fork, you may probably want to use ed25519 curve for sign/verify as curve25519 couldn't perform any-point multiplication.

from elliptic.

pohutukawa avatar pohutukawa commented on August 20, 2024

Re the benchmarking, yes, I ran it on node 0.10.x, which is in the repositories of my Linux distro. But don't care much for others as our target platform is the browser. I'd like to find a way to run this in the browser, ideally through http://jsperf.com, so everybody can test their own.

Yes, it seems like the benchmarking test runner has swallowed the exceptions. Re-did it it with a fixed implementation (and added a few other comparative benchmarks as well). So, signatures are jodid's weak points: Signing is ~8x slower and verifying ~4x slower.

from elliptic.

indutny avatar indutny commented on August 20, 2024

Take a look at http://jsperf.com/jsbn-vs-sjcl-ecc/16 , technically it should be very easy to benchmark it in browser.

Regarding signatures, that's what elliptic.js initially aimed for. I'll see what I could do about ECDH.

from elliptic.

indutny avatar indutny commented on August 20, 2024

Sorry, no progress here, and it doesn't look like I will have time to work on it. I suggest opening another issue if this is still concerns you. Thanks!

from elliptic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.