-
Notifications
You must be signed in to change notification settings - Fork 52
Conversation
that is a bit harsh, isn't it :/ |
My apologies @dignifiedquire. I didn't mean that in a personal way at all, I know you put a lot of work into this module and made it work ❤️. I just had a very hard time myself wrapping my brain around how the code was organized and decided to shuffle things around so that others don't have to spend as much time. Updated my description there. |
Was exposing |
The point was to expose a 1:1 mapping of all modules in nodejs which are backed by native implementations where possible, not just JavaScript. |
also some other reasons in terms of making sure formats are matching I think, try looking at past issues we talked about this multiple times as far as I remember |
I recall something, but just did the diligence of trickling up the changes and npm linked everything till js-ipfs and run all the tests + interop tests with success. My conclusion is that what it was isn't an issue anymore. |
@diasdavid please run the benchmarks to check if there are regressions in node (references are here: https://github.com/libp2p/js-libp2p-crypto/blob/master/stats.md) |
|
Done. My take is that we should upgrade libp2p crypto to be able to accept other key implementations, the same way we support secp251k but using the pattern we do in js-ipfs for wrtc/webrtc. This way, we get a module that is not painful to install and doesn't cause issues for users in Electron (for example) and still enables users that have a heavy use of RSA key sign to plug node-webcrypto (or something else) to improve the perf there. Important to note: What is slow is generating the RSA keys, not the signing. Generating the keys only happens once. |
I'm going on a limb here and merge this all the way and will monitor and run more tests. From IRC:
|
I'm currently going over this module to make it more maintainable and with an API that is easier to understand. The end goal is to make a tutorial for https://github.com/libp2p/js-libp2p and invite the community to start using it.