Closed Mikerah closed 5 years ago
After a little bit more of searching, I may be able to remove the milagro-crypto dependency and simply fork the libp2p crypto repos and make amendments. All the libp2p crypto repos use the default crypto library provided by Node.js and uses openSSL for a lot of what we need. It also has browser version to make some crypto available in the browser. The only thing it seems to be missing is the right key derivation function, which I needed to implement anyway.
This is done in https://github.com/ChainSafe/js-libp2p-crypto/pull/2
At the moment, mainly milagro-crypto code is used since the libp2p crypto libraries don't contain everything that discv5 needs. There are some things that can be done to reconcile this:
I'm currently leaning towards 2 and 3 since we need milagro-crypto and there's no other way to get around using libp2p specific modules for some stuff.