Comments (8)
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.
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.
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.
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.
@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.
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.
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.
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)
- ec.Signature is not fully available in Typescript
- How to format a PHP-OpenSSL signature to be verifiable with elliptic? HOT 1
- Convert signature to base64 HOT 1
- Curve25519 Derivation doesn't work against RFC test Vector
- ⚠️ BN.toString(16) can result in wrong output ([email protected]) HOT 1
- Custom Curves HOT 1
- recoverPubKey accepts invalid signatures for recovery
- How to convert a DER-formatted signature back to a Signature object? HOT 1
- KeyPair.fromPublic: returns a KeyPair?
- How to create an ec.Signature instance from r,s in typescript
- I seem to get a wrong signature when using 'secp256k1' HOT 1
- Why hasn't this software been updated after 2021 years? HOT 1
- Feature request: support ed448 HOT 1
- How does point comparison work for the identity / point at infinity?
- Feature Request: Support for Secp256r1
- [FEATURE] Need equivalent of secp256k1_ec_seckey_tweak_add
- v6.5.2 has a breaking change HOT 1
- Regular expression injection - (ReDos)
- Elliptic's EDDSA missing signature length check HOT 2
- Dependabot alerts being raised for elliptic HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elliptic.