Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using WebAssembly for the browser implementation #129

Open
kripod opened this issue Jun 5, 2018 · 6 comments
Open

Consider using WebAssembly for the browser implementation #129

kripod opened this issue Jun 5, 2018 · 6 comments

Comments

@kripod
Copy link
Contributor

kripod commented Jun 5, 2018

Related article: https://blog.bitjson.com/just-released-webassembly-version-of-secp256k1-10x-faster-than-javascript-eb3cebe4d411

@kripod kripod changed the title Consider using WebAssembly for browser implementation Consider using WebAssembly for the browser implementation Jun 5, 2018
@dcousens
Copy link
Contributor

dcousens commented Jun 5, 2018

@kripod what is the route for detecting support for that?

@kripod
Copy link
Contributor Author

kripod commented Jun 5, 2018

@dcousens It isn’t trivial, but I found the following answer on StackOverflow: https://stackoverflow.com/a/47880734

@dcousens
Copy link
Contributor

dcousens commented Jun 5, 2018

@bitjson do you encourage users to compile their own WASM? What is the release process for inclusion in a library like this (or others).

@fanatid
Copy link
Member

fanatid commented Jun 5, 2018

I had seen this article yesterday, performance make impression.
Not sure what we should do here, I'd like that users compiled WASM themselves (on same reason why I removed prebuild bindings). Also looks like we need elliptic in any case, because sometimes WASM can be not supported by old browsers.

@bitjson
Copy link

bitjson commented Jun 5, 2018

@dcousens I don't think it's particularly necessary for users to compile their own. If users are already trusting the javascript they're getting from NPM, they might as well trust the WebAssembly too. If not, users should audit both themselves, and part of doing that would be to run the WASM compilation step (or check that entities they trust have signed it). Not a new problem in the Node.js space though.

For now, I've opted to avoid even PGP signing anything, since I'd rather people not trust me at all. (In the future, I'm hoping to use something more definitive than PGP, like BitAuth, then I might start signing things. 😄)

@fanatid
Copy link
Member

fanatid commented Dec 15, 2019

WebAssembly + n-api addon in fanatid/fcrypto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants