247 Commits

Author SHA1 Message Date
Jacob Heun
f01e3812e9
chore: update contributors 2020-02-26 17:21:45 +01:00
Alan Shaw
00477e3bcb
perf: remove asn1.js and use node-forge (#166)
* 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
2020-02-26 17:16:32 +01:00
dependabot-preview[bot]
0f4c533dfa chore(deps-dev): bump sinon from 8.1.1 to 9.0.0
Bumps [sinon](https://github.com/sinonjs/sinon) from 8.1.1 to 9.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v8.1.1...v9.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-19 08:27:36 -05:00
dependabot-preview[bot]
d566e7ef3b chore(deps-dev): bump @types/mocha from 5.2.7 to 7.0.1
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 5.2.7 to 7.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 08:31:56 -05:00
dependabot-preview[bot]
78e2ddd2bd chore(deps-dev): bump sinon from 7.5.0 to 8.1.1
Bumps [sinon](https://github.com/sinonjs/sinon) from 7.5.0 to 8.1.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v7.5.0...v8.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 08:31:41 -05:00
dependabot-preview[bot]
0ad513887a
chore(deps): bump err-code from 1.1.2 to 2.0.0 (#165)
Bumps [err-code](https://github.com/IndigoUnited/js-err-code) from 1.1.2 to 2.0.0.
- [Release notes](https://github.com/IndigoUnited/js-err-code/releases)
- [Commits](https://github.com/IndigoUnited/js-err-code/compare/1.1.2...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 07:57:07 -05:00
dependabot-preview[bot]
e7468d830d
chore(deps-dev): bump aegir from 20.6.1 to 21.0.2 (#167)
Bumps [aegir](https://github.com/ipfs/aegir) from 20.6.1 to 21.0.2.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ipfs/aegir/compare/v20.6.1...v21.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 07:56:49 -05:00
Alan Shaw
cc2094975b
perf: remove jwk2privPem and jwk2pubPem (#162)
These 2 unused functions required us to import the whole of the node-forge PKI implementation when we only use some RSA stuffs.

BREAKING CHANGE: removes unused jwk2pem methods `jwk2pubPem` and `jwk2privPem`. These methods are not being used in any js libp2p modules, so only users referencing these directly will be impacted.
2020-02-03 14:28:23 +01:00
Jacob Heun
ad4bf3b357
chore: release version v0.17.2 v0.17.2 2020-01-17 12:08:41 +01:00
Jacob Heun
730d762717
chore: update contributors 2020-01-17 12:08:40 +01:00
Carson Farmer
e01977c5a3 feat: add typescript types + linting/tests (#161)
* feat: adds typescript types + linting/tests

Signed-off-by: Carson Farmer <carson.farmer@gmail.com>

* feat: much better types testing

Signed-off-by: Carson Farmer <carson.farmer@gmail.com>

* chore: revert eslintignore

Signed-off-by: Carson Farmer <carson.farmer@gmail.com>

* feat: update types entry

Signed-off-by: Carson Farmer <carson.farmer@gmail.com>

* chore: exclude has no effect here

Signed-off-by: Carson Farmer <carson.farmer@gmail.com>

* feat: more nuanced return types on keypair

Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
2020-01-17 12:04:52 +01:00
Jacob Heun
b5d94ecae7
chore: release version v0.17.1 v0.17.1 2019-10-25 13:56:54 +02:00
Jacob Heun
1f9c2ddadb
chore: update contributors 2019-10-25 13:56:53 +02:00
Jacob Heun
d6d06a8404 chore: remove commitlint
chore: update deps

chore: add bundlesize to ci
2019-10-25 13:51:00 +02:00
Maciej Krüger
8b8d0c1510 fix: jwk var naming 2019-10-25 13:51:00 +02:00
Maciej Krüger
b998f63aec feat: use forge to convert jwk2forge 2019-10-25 13:51:00 +02:00
Maciej Krüger
adc6eb478c test: add interop test 2019-10-25 13:51:00 +02:00
Maciej Krüger
2c1bac5ce9 fix: padding error 2019-10-25 13:51:00 +02:00
Maciej Krüger
027a5a9332 fix: use direct buffers instead of converting to hex 2019-10-25 13:51:00 +02:00
Maciej Krüger
2c294b56ab fix: lint 2019-10-25 13:51:00 +02:00
Maciej Krüger
487cd076fb refactor: cleanup 2019-10-25 13:51:00 +02:00
Maciej Krüger
b8e2414420 fix: browser rsa enc/dec 2019-10-25 13:51:00 +02:00
Maciej Krüger
9f747a173f feat: browser enc/dec 2019-10-25 13:51:00 +02:00
Maciej Krüger
34c5f5c8f0 feat: add (rsa)pubKey.encrypt and (rsa)privKey.decrypt
nodeJS only for now
2019-10-25 13:51:00 +02:00
Jacob Heun
a008bc2fcb
chore: update lead maintainer (#159) 2019-09-26 12:51:16 +02:00
Friedel Ziegelmayer
b68060388f
Merge pull request #157 from libp2p/fix/better-err-missing-webcrypto
fix: better error for missing web crypto
2019-08-13 15:28:33 +02:00
Alan Shaw
afe94ded6b
docs: problem resolution 2019-07-22 11:21:24 +01:00
Alan Shaw
a5e05603ef
fix: better error for missing web crypto
This PR simply detects missing web crypto and throws an error with an appropriate message.

This is a stepping stone that will help users understand the problem until we have time to do a refactor of this module and of all the modules that use it to enable optionally passing your own crypto implementation.

refs https://github.com/libp2p/js-libp2p-crypto/pull/149
refs https://github.com/libp2p/js-libp2p-crypto/pull/150
refs https://github.com/libp2p/js-libp2p-crypto/issues/105
refs https://github.com/ipfs/js-ipfs/issues/2153
refs https://github.com/ipfs/js-ipfs/issues/2017

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
2019-07-22 11:21:22 +01:00
dirkmc
0b686d363c chore: add error codes (#155)
* chore: add error codes

* chore: create errors with new Error()

* fix: better error testin

* refactor: simplify random bytes error checks
2019-07-22 11:16:02 +01:00
dignifiedquire
2d15e717e4 chore: release version v0.17.0 v0.17.0 2019-07-11 15:23:54 +02:00
dignifiedquire
6775dbf670 chore: update contributors 2019-07-11 15:23:54 +02:00
Friedel Ziegelmayer
4b09aae8ca
fix(deps): update to ursa-optiona@0.10 (#156)
fix(deps): update to ursa-optiona@0.10
2019-07-11 15:22:40 +02:00
dignifiedquire
764d8bff3e chore(ci): run on node@12 2019-07-11 15:05:24 +02:00
dignifiedquire
26b6217041 fix(deps): update to ursa-optiona@0.10
This brings compatiability with node@12 for the native dependency
2019-07-11 15:04:08 +02:00
Arve Knudsen
5500ac4a6e test: upgrade libp2p-crypto-secp256k1; ensure secp256k1 is tested (#151) 2019-07-10 23:32:51 +01:00
dirkmc
d675670ed9 fix: put optional args last for key export (#154)
BREAKING CHANGE: key export arguments are now swapped so that the optional format is last
2019-07-10 18:03:34 +01:00
Alan Shaw
ad7107233e feat: refactor to use async/await (#131)
BREAKING CHANGE: API refactored to use async/await

feat: WIP use async await
fix: passing tests
chore: update travis node.js versions
fix: skip ursa optional tests on windows
fix: benchmarks
docs: update docs
fix: remove broken and intested private key decrypt
chore: update deps
2019-07-10 17:15:26 +01:00
Arve Knudsen
5cd0e8cc1a fix: fix links in README (#148) 2019-07-04 14:31:43 +02:00
Vasco Santos
0ffe31821a chore: add discourse badge (#147) 2019-04-18 19:29:45 +02:00
dignifiedquire
7b3625888c chore: release version v0.16.1 v0.16.1 2019-02-26 09:28:41 +01:00
dignifiedquire
b7bce77ad5 chore: update contributors 2019-02-26 09:28:41 +01:00
Yusef Napora
c1f867bd9c chore: update badges for consistency across libp2p org 2019-02-26 09:25:15 +01:00
Alberto Elias
e3f02eb6f1 chore: updates libp2p-crypto-secp256k1 2019-02-26 09:24:40 +01:00
Vasco Santos
a0874389a9 chore(ci): use travis
This PR changes Jenkins to travis for CI. In addition, 2 dependencies were missing in the `package.json` and the `dep-check` was not passing.
2019-02-20 20:57:36 +01:00
David Dias
567d68c855 chore: release version v0.16.0 v0.16.0 2019-01-08 21:33:49 +01:00
David Dias
af782c5906 chore: update contributors 2019-01-08 21:33:49 +01:00
David Dias
f0593c9e6d chore: update deps 2019-01-08 21:33:02 +01:00
Hugo Dias
8d8294dc3f fix: clean up, bundle size reduction
BREAKING CHANGE: getRandomValues method exported from src/keys/rsa-browser.js and src/keys/rsa.js signature has changed from accepting an array to a number for random byte length
2019-01-08 21:29:42 +01:00
David Dias
df23d634c5 chore: release version v0.15.0 v0.15.0 2019-01-03 16:15:45 +00:00
David Dias
88e1bcf75f chore: update contributors 2019-01-03 16:15:45 +00:00