bitcoinjs / bip32

A BIP32 compatible library.
MIT License
181 stars 129 forks source link

[ERROR] Digital envelope routines::unsupported #59

Closed emidev98 closed 2 years ago

emidev98 commented 2 years ago

Hello, we have found that the library has breaking changes with node v17. The reason why is explained in this webiste, but a tinny extract from the website says:

This error is because node.js 17 uses OpenSSL3, which has changed code for initialization context of md family (including md4), and this is a breaking change.

NPM/NodeJs: image

Error: image

Please let us know if more information is needed or if we can help on a different way

junderw commented 2 years ago

@motorina0 this sounds like fun...

junderw commented 2 years ago

It seems like the only way to "fix" this is to remove node based hashing and only use pure JS hashing.

Alternatively, we could also use WASM.

junderw commented 2 years ago

or actually this might be better fixed upstream: https://github.com/crypto-browserify/createHash

junderw commented 2 years ago

......? I looked at Node v17 API for createHash... it hasn't really changed...

Is it just that OpenSSL no longer supports ripemd160?

emidev98 commented 2 years ago

I could find this https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V17.md#openssl-30

motorina0 commented 2 years ago

@motorina0 this sounds like fun...

yes, but you are too fast. Do you ever sleep?

Just to summarize:

junderw commented 2 years ago

Fixed in 3.1.0