Replaced crypto-browserify with browserify-aes, which is a dependency of crypto-browserify; without all the unnecessary modules. We are still using browserify-aes because the keythereum's related api methods are synchronous - ethereum-cryptography/aes exposes async-only methods, I didn't want to change API
Replaced keccak with ethereum-cryptography/keccak
Replaced scrypt-js with ethereum-cryptography/scrypt. NOTE: tests were failing after that because EC's scrypt conforms to RFC7914 section 2, which prohibits N: 262144, p: 8, r: 1. The old version did not conform to spec. My guess is that someone at some point messed up the tests and passed p: 8, r: 1 instead of r: 8, p: 1, which is standard.
Replaced secp256k1 with ethereum-cryptography/secp256k1-compat
Removed sjcl which had pbkdf2 implementation - we are using EC's one
Updated uuid from 3.0.0 to 8.3.2
The package versions are exact, like before - no version ranges
wc < dist/keythereum.js output:
before 31994 118030 921363
after 15243 63140 484003
Backwards incompatibilities:
BigInt support is now required
keythereum.crypto is now an emulated object instead of crypto-browserify stuff: i've searched GitHub for its usage and those seem to be the only used methods; I think it'll be good
crypto-browserify
withbrowserify-aes
, which is a dependency of crypto-browserify; without all the unnecessary modules. We are still usingbrowserify-aes
because the keythereum's related api methods are synchronous - ethereum-cryptography/aes exposes async-only methods, I didn't want to change APIkeccak
withethereum-cryptography/keccak
scrypt-js
withethereum-cryptography/scrypt
. NOTE: tests were failing after that because EC's scrypt conforms to RFC7914 section 2, which prohibitsN: 262144, p: 8, r: 1
. The old version did not conform to spec. My guess is that someone at some point messed up the tests and passedp: 8, r: 1
instead ofr: 8, p: 1
, which is standard.secp256k1
withethereum-cryptography/secp256k1-compat
sjcl
which had pbkdf2 implementation - we are using EC's oneuuid
from 3.0.0 to 8.3.2wc < dist/keythereum.js
output:31994 118030 921363
15243 63140 484003
Backwards incompatibilities:
keythereum.crypto
is now an emulated object instead ofcrypto-browserify
stuff: i've searched GitHub for its usage and those seem to be the only used methods; I think it'll be good