16 Commits

Author SHA1 Message Date
Maciej Krüger
e71fc150c0 feat: backport enc/dec (#160)
* feat: add (rsa)pubKey.encrypt and (rsa)privKey.decrypt

nodeJS only for now

* feat: browser enc/dec

* fix: browser rsa enc/dec

* refactor: cleanup

* fix: lint

* fix: use direct buffers instead of converting to hex

* fix: padding error

* test: add interop test

* feat: use forge to convert jwk2forge

* fix: jwk var naming

* fix: missing cbwrap
2019-10-25 19:01:57 +02: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
Jacob Heun
c54ea206f0 feat: nextTick instead of setImmediate, and fix sync in async (#136)
* fix: avoid sync callback in async function

* chore: fix linting

* chore: remove non jenkins ci

* refactor: use nextTick over setImmediate

* refactor: async/nextTick for better browser support
2019-01-03 16:13:07 +00:00
Maciej Krüger
f4c00893ad test: add test for different rsa crypto libs 2018-09-17 15:32:13 -07:00
Maciej Krüger
b05e77f375 feat: use ursa-optional for lightning fast key generation
The difference between ursa and ursa-optional is that ursa-optional does not cause any problems if it fails to compile
2018-09-17 15:32:13 -07:00
Maciej Krüger
7608fdd858 fix: catch error when unmarshaling instead of crashing (#113)
* 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
2017-12-01 08:36:29 +00:00
David Dias
2f8e234044 refactor: the whole thing (#102) 2017-07-22 10:57:27 -07:00
Friedel Ziegelmayer
148d16ab25 feat(rsa): add fallback pure js fallback for webcrypto-ossl 2016-11-29 17:54:41 +01:00
nikuda
b088bab80f feat: replace lib multihashing with multihashing-async 2016-11-01 12:48:36 +01:00
Friedel Ziegelmayer
08c5df5e79 feat: use webcrypto in favor of node-forge
BREAKING CHANGE: generateKeyPair is now async
2016-11-01 12:47:58 +01:00
dignifiedquire
1270f3e37e refactor: make rsa key generation sync 2016-05-24 12:36:34 +02:00
Friedel Ziegelmayer
18810aca86 fix: some issues found when using in libp2p-secio 2016-05-23 12:31:45 +02:00
Friedel Ziegelmayer
d4c1672e06 rsa key compat with go 2016-05-20 14:41:25 +02:00
dignifiedquire
ca0b5305a2 feat: add marshal and unmarshl methods 2016-05-19 21:45:43 +02:00
dignifiedquire
f3a22ea5ff finish rsa implementation 2016-05-19 20:18:31 +02:00
dignifiedquire
37edb7d0e4 inital commit 2016-05-19 18:47:48 +02:00