Commit graph

26 commits

Author SHA1 Message Date
Filip Skokan
70ff22227a fix: contactKDF iteration count fixed for key sizes larger than 256 bits 2020-01-25 16:43:53 +01:00
Filip Skokan
e3ad39fea0 test: add test for rfc7518#appendix-C 2020-01-25 10:15:35 +01:00
Filip Skokan
62bdee7b29 refactor: improve error message when JWE "enc" value is invalid 2019-12-06 16:09:49 +01:00
Filip Skokan
8976027c97 refactor: improve error message when key use mismatches the operation 2019-12-06 15:35:15 +01:00
Filip Skokan
5e1009a63e feat: allow JWK.asKey inputs for sign/verify/encrypt/decrypt operations 2019-11-27 22:04:14 +01:00
Filip Skokan
c3eb8450b9 feat: return the CEK from JWE.decrypt operation with { complete: true } 2019-11-23 12:06:15 +01:00
Filip Skokan
1db9fc9cd1 refactor: don't swallow invalid encoding errors 2019-09-25 22:18:47 +02:00
Filip Skokan
06758102b2 refactor: rename node_support to runtime_support 2019-09-10 12:14:15 +02:00
Filip Skokan
67a8601b09 feat: added Node.js lts/dubnium support for runtime supported features 2019-08-22 20:40:02 +02:00
Filip Skokan
e7ad82cbbc feat: electron v6.x support 2019-07-27 21:19:14 +02:00
Filip Skokan
418e311c8d chore: update dev deps, code lint 2019-07-21 18:05:57 +02:00
Filip Skokan
211d7af5db feat: add secp256k1 EC Key curve and ES256K
This is as per
- https://tools.ietf.org/html/draft-ietf-cose-webauthn-algorithms-01
- https://mailarchive.ietf.org/arch/msg/cose/91MouVA43DefbpQOB7l5daCEeIc
2019-07-08 22:04:29 +02:00
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
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
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
2ad441831d refactor: use import rather then new 2019-03-11 21:28:45 +01:00
Filip Skokan
3d8b3a5fe8 test: re-enable lint, test with min node, remove BLNS 2019-03-06 21:50:25 +01:00
Filip Skokan
e9f5fdcfc8 feat: verify and decrypt complete option returns the matched key as well 2019-02-26 22:45:02 +01:00
Filip Skokan
0a6027d62a refactor: add .d.ts and simplify errors 2019-02-25 21:27:39 +01:00
Filip Skokan
546840d55c feat: throw JOSEMultiError when general formats and keystore use 2019-02-24 14:05:57 +01:00
Filip Skokan
77fe241aa7 feat: add decrypt/verify complete and algorithm options 2019-02-22 22:26:33 +01:00
Filip Skokan
962c1f5021 feat: b64 (rfc7797) support 2019-02-21 22:51:32 +01:00
Filip Skokan
7bc3cc4c71 feat: resolving alg/enc, crit members, add tests 2019-02-20 23:12:08 +01:00
Filip Skokan
869438c798 refactor: jwe/jws serializer detection 2019-02-19 23:30:57 +01:00
Filip Skokan
505fe3c35d test: enc/dec input check tests 2019-02-17 09:29:44 +01:00
Filip Skokan
ac1bb358d7 test: jwe cookbook decrypt 2019-02-09 19:26:02 +01:00