Commit graph

157 commits

Author SHA1 Message Date
Filip Skokan
5b53cb0155 fix: limit calculation of missing RSA private components
- this deprecates the use of `JWK.importKey` in favor of
`JWK.asKey`
- this deprecates the use of `JWKS.KeyStore.fromJWKS` in favor of
`JWKS.asKeyStore`

Both `JWK.importKey` and `JWKS.KeyStore.fromJWKS` could have resulted
in the process getting blocked when large bitsize RSA private keys
were missing their components and could also result in an endless
calculation loop when the private key's private exponent was outright
invalid or tampered with.

The new methods still allow to import private RSA keys with these
optimization key parameters missing but its disabled by default and one
should choose to enable it when working with keys from trusted sources

It is recommended not to use @panva/jose versions with this feature in
its original on-by-default form - v1.1.0 and v1.2.0 These will
2019-06-20 23:32:13 +02:00
Filip Skokan
80cdd4f4f5 chore: update dependencies 2019-06-16 18:32:58 +02:00
Filip Skokan
83186af455 chore: remove github funding yml section
[skip ci]
2019-06-09 11:23:24 +02:00
Filip Skokan
68591969f6 chore: update devDependencies 2019-06-06 17:53:52 +02:00
Filip Skokan
bf3d3cec1c
chore: update github bug report template
[skip ci]
2019-05-29 18:46:15 +02:00
Filip Skokan
67beaae815 style: enable lint with esnext features 2019-05-27 17:23:07 +02:00
Filip Skokan
1432681891
docs: update README.md
[skip ci]
2019-05-27 09:56:08 +02:00
Filip Skokan
d4258beaf3 docs: update docs/README.md
[skip ci]
2019-05-26 15:44:20 +02:00
Filip Skokan
9f9542e54f docs: fix changelog
[skip ci]
2019-05-25 23:07:54 +02:00
Filip Skokan
0231841687 chore(release): 1.2.0 2019-05-25 22:53:03 +02:00
Filip Skokan
9d46c48fd5 feat: add support for JWK x5c, x5t and x5t#S256 2019-05-25 22:34:28 +02:00
Filip Skokan
2eae293760 feat: instances of JWKS.KeyStore are now iterable (e.g. for ... of) 2019-05-25 22:18:27 +02:00
Filip Skokan
5496a60945 chore: add FUNDING.yml 2019-05-25 18:54:34 +02:00
Filip Skokan
b1abdff637 chore(release): 1.1.0 2019-05-23 20:09:26 +02:00
Filip Skokan
2557e50dc0 test: update test coverage tool to c8 2019-05-23 20:03:51 +02:00
Filip Skokan
6e3d6fd111 feat: compute private RSA key p, q, dp, dq, qi when omitted
resolves #26
2019-05-23 19:51:45 +02:00
Filip Skokan
b0ff436daf fix: reject rsa keys without all factors and exponents with a specific message 2019-05-23 19:20:30 +02:00
Filip Skokan
6b7c92ab69 chore: add sponsor placement
[skip ci]
2019-05-23 07:38:21 +02:00
Filip Skokan
ce69aee4dd style: index.d.ts 4 spaces
[skip ci]
2019-05-13 10:57:03 +02:00
Filip Skokan
de92f7b3d4 chore(release): 1.0.2 2019-05-13 10:37:14 +02:00
Filip Skokan
c7a8606e4d fix: add missing keystore.toJWKS() .d.ts definition
fixes #25
2019-05-13 10:34:46 +02:00
Filip Skokan
46eb7edb80 refactor: mention thumbprint rather then kid in ref oct key thumbprint 2019-03-01 19:42:10 +02:00
Filip Skokan
c30e93621a chore(release): 1.0.1 2019-04-27 20:05:01 +02:00
Filip Skokan
b5cb98a085 docs: update README.md 2019-04-27 20:01:42 +02:00
Filip Skokan
0750d2c466 fix: oct key ts "k" type fix 2019-04-27 18:09:41 +02:00
Filip Skokan
e98afb4464 chore: update package.json 2019-04-25 18:14:07 +02:00
Filip Skokan
bfc3991e08 style: disable lint for now until tools catch up to private fields 2019-04-23 18:09:45 +02:00
Filip Skokan
6a32da6937 chore(release): 1.0.0 2019-04-23 14:31:28 +02:00
Filip Skokan
2c20b44649 chore: dev dependency updates 2019-04-23 14:30:51 +02:00
Filip Skokan
dafeced271 docs: fix readme typos 2019-04-23 14:30:51 +02:00
Filip Skokan
857dc2b51b fix: fail to import invalid PEM formatted strings and buffers 2019-04-23 14:30:51 +02:00
Filip Skokan
23b874cc20 feat: add JWK key_ops support, fix .algorithms() op returns
BREAKING CHANGE: key.algorithms(op) un+wrapKey was split into correct
wrapKey/unwrapKey/deriveKey returns

BREAKING CHANGE: keystore.all and keystore.get `operation` option was
removed, `key_ops: string[]` supersedes it
2019-04-23 14:30:51 +02:00
Filip Skokan
4ace4be99d test: check kid/thumbprint is not the same when kid is provided 2019-04-23 14:30:50 +02:00
Filip Skokan
a8ef20e450 refactor: use private instance fields where possible 2019-04-23 14:30:50 +02:00
Filip Skokan
1159b0df4e feat: add key.toPEM() export function with optional encryption 2019-04-23 14:30:50 +02:00
Filip Skokan
2dbd3ed43a feat: add OKP Key and EdDSA sign/verify support
BREAKING CHANGE: node.js minimal version is now v12.0.0 due to its
added EdDSA support (crypto.sign, crypto.verify and eddsa key objects)

resolves #12
2019-04-23 14:30:49 +02:00
Filip Skokan
d51cfb5a7e chore(release): 0.12.0 2019-04-07 14:13:27 +02:00
Filip Skokan
e21fea106b revert: add EC P-256K JWK and ES256K sign/verify support
BREAKING CHANGE: removing ES256K alg and EC P-256K crv support until the
IETF WG decides on what the final names will be.
2019-04-07 14:13:10 +02:00
Filip Skokan
9e763ac296 chore(release): 0.11.5 2019-04-04 11:10:27 +02:00
Filip Skokan
65db7e0ddd feat: add key.thumbprint always returning the JWK Thumbprint (RFC7638) 2019-04-04 11:04:06 +02:00
Filip Skokan
2dd7053a4a feat: add key.secret<boolean> and key.type<string> for completeness 2019-04-01 20:26:47 +02:00
Filip Skokan
70b944634a
ci: update .travis.yml to avoid stages and include nightly 2019-03-29 22:50:45 +01:00
Filip Skokan
293198177a ci: change how codecov comments on PRs 2019-03-29 09:33:06 +01:00
Filip Skokan
e296204929 ci: change how codecov reports states 2019-03-29 09:29:33 +01:00
Filip Skokan
264444b642 chore(release): 0.11.4 2019-03-28 23:45:50 +01:00
Filip Skokan
946d9df1ca fix: remove unintended exposure of private material via enumerables 2019-03-28 23:45:20 +01:00
Filip Skokan
988bbafdd6 refactor: skip validating jws disjoint when header's missing 2019-03-28 23:32:02 +01:00
Filip Skokan
2ad22792ff refactor: use exported KeyObject when available 2019-03-28 20:51:00 +01:00
Filip Skokan
764b86309c fix: properly restrict EC curves in generate(Sync) 2019-03-28 09:42:27 +01:00
Filip Skokan
3854431380 docs: cleanup docs/readme.md
[skip ci]
2019-03-27 15:12:21 +01:00