* fix: add buffer, cleanup, reduce size
- add buffer related to https://github.com/ipfs/js-ipfs/issues/2924
- remove unnecessary eslint ignore
- remove tweelnacl and use node-forge
- remove browserify-aes and use node-forge
- use multibase to encode b58
- require only sha256 from multihashing
- reduce bundle size
after all the deps here https://github.com/ipfs/js-ipfs/issues/2924 are merged libp2p-crypto will be able to be bundle with `node: false` 🎉
* fix: reduce bundle size
* fix: use new secp
* fix: bundle size
* chore: update secp
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
* perf: remove asn1.js from rsa
* fix: tweaks
* fix: it works, but I do not know 100% why
* chore: remove asn1.js
* fix: ensure jwk params encoded as uint
* fix: util tests
* fix: zero pad base64urlToBuffer
* fix: more zero pad
* test: add round trip test
* test: base64url to Buffer with padding
* feat: export/import password protected RSA key
* docs: crypto.key.import
* test: import with wrong password
* fix: lint
* test: importing openssl keys
* just to trigger circle with new ubuntu
* feat: get the RSA key id
* feat: get the ED 25519 key id
* feat: pbkdf2
* fix(pbkdf2): base64 has more chars to guess than hex
* chore: update deps
* test: Add failing tests
* fix: Fix some failing tests
* fix: various fixes on garbage error handling and respective tests
* tests: increased timeout for test timing out in CI
* tests: increasing test timeout to please the CI gods
* tests: increasing test timeout to please the CI gods
* fix: for when unMarshallPrivateKey is called with null or undefined key
Implement generateKeyPairFromSeed for ed25519 - this will produce the same keypair for the same seed (or first 32 bytes of reader) as given to GenerateKeyPairWithReader in go-libp2p.
Due to the design of `AES-CTR` in the webcrypto spec, there
is no streaming mode provided. This results in the counter
not being reused between subsequent calls to `encrypt` or
`decrypt`. As both the node.js and the go implementation rely
on this webcrypto had to be replaced.