jose

JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes.

MIT License

Downloads
47.9M
Stars
4.9K
Committers
32

Bot releases are hidden (Show)

jose -

Published by panva about 5 years ago

Features

  • add RSA-OAEP-256 support (when a node version supports it) (28d7cf8), closes #29
jose -

Published by panva about 5 years ago

Bug Fixes

  • properly pad calculated RSA primes (dd121ce)
jose -

Published by panva about 5 years ago

Bug Fixes

  • use the correct ECPrivateKey version when importing EC JWK (24acd20)

Features

Notes

Electron v6.x runtime is supported to the extent of the crypto engine BoringSSL feature parity with standard Node.js OpenSSL. The following is disabled in Electron runtime because of its lack of support.

  • JWE A128KW, A192KW and A256KW algs are not available, this also means that other JWAs depending on those are not working, those are ECDH-ES+A128KW, ECDH-ES+A192KW, ECDH-ES+A256KW, PBES2-HS256+A128KW, PBES2-HS384+A192KW, PBES2-HS512+A256KW)
  • OKP curves Ed448, X25519 and X448 are not supported
  • EC curve secp256k1 is not supported
jose -

Published by panva about 5 years ago

Bug Fixes

  • importing x5c in electron requires the input split (181fd09)
jose -

Published by panva about 5 years ago

Bug Fixes

  • correctly pad integers when importing RSA JWK (1dc7f35)
jose -

Published by panva about 5 years ago

Features

  • validate JWTs according to a JWT profile - ID Token (6c98b61)

It is now possible to pass a profile to JWT.verify and have the JWT validated according to it. This makes sure you pass all the right options and that required claims are present, prohibited claims are missing and that the right JWT typ is used.

More profiles will be added in the future.

jose -

Published by panva over 5 years ago

Bug Fixes

  • honour the JWT.sign jti option (36c9ce2), closes #33
jose -

Published by panva over 5 years ago

Features

  • add secp256k1 EC Key curve and ES256K (211d7af)
jose -

Published by panva over 5 years ago

Features

  • compute private RSA key p, q, dp, dq, qi when omitted (6e3d6fd), closes #26
  • add support for JWK x5c, x5t and x5t#S256 (9d46c48)
  • instances of JWKS.KeyStore are now iterable (e.g. for ... of) (2eae293)

Bug Fixes

  • limit calculation of missing RSA private components (5b53cb0)
  • reject rsa keys without all factors and exponents with a specific message (b0ff436)

Deprecations

  • 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

jose -

Published by panva over 5 years ago

Bug Fixes

  • add missing keystore.toJWKS() .d.ts definition (c7a8606), closes #25
jose -

Published by panva over 5 years ago

Bug Fixes

  • oct key ts "k" type fix (0750d2c)
jose -

Published by panva over 5 years ago

Bug Fixes

  • fail to import invalid PEM formatted strings and buffers (857dc2b)

Features

  • add JWK key_ops support, fix .algorithms() op returns (23b874c)
  • add key.toPEM() export function with optional encryption (1159b0d)
  • add OKP Key and EdDSA sign/verify support (2dbd3ed), closes #12

BREAKING CHANGES

  • key.algorithms(op) un+wrapKey was split into correct wrapKey/unwrapKey/deriveKey returns
  • keystore.all and keystore.get operation option was removed, key_ops: string[] supersedes it
  • node.js minimal version is now v12.0.0 due to its added EdDSA support (crypto.sign, crypto.verify and eddsa key objects)
jose -

Published by panva over 5 years ago

Reverts

  • add EC P-256K JWK and ES256K sign/verify support (e21fea1)

BREAKING CHANGES

  • removing ES256K alg and EC P-256K crv support until the IETF WG decides on what the final names will be.
jose -

Published by panva over 5 years ago

Features

  • add key.secret and key.type for completeness (2dd7053)
  • add key.thumbprint always returning the JWK Thumbprint (RFC7638) (65db7e0)
jose -

Published by panva over 5 years ago

Bug Fixes

  • properly restrict EC curves in generate(Sync) (764b863)
  • remove unintended exposure of private material via enumerables (946d9df)
jose -

Published by panva over 5 years ago

Bug Fixes

  • throw on unsupported EC curves (cfa4222)

Features

  • add EC P-256K JWK and ES256K sign/verify support (2e33e1c)
jose -

Published by panva over 5 years ago

  • internal symbol method is now really a symbol (925d47c)
  • key.toJWK() fixed on windows (57f1692), closes #17
jose -

Published by panva over 5 years ago

Bug Fixes

  • properly restrict RS key algorithms by the key's bit size (9af295b)
jose -

Published by panva over 5 years ago

Bug Fixes

  • all JWA defined RSA operations require key of 2048 or more (cc70c5d)
  • use correct salt length for RSASSA-PSS (e936d54)

BREAKING CHANGES

  • all JWA defined RSA based operations require key size of 2048 bits or more.
jose -

Published by panva over 5 years ago

Bug Fixes

  • do not list "dir" under wrap/unwrapKey operations (17b37d3)

Features

  • keystore .all and .get operation option (d349ba9)

BREAKING CHANGES

  • "dir" is no longer returned as wrap/unwrapKey key operation
Package Rankings
Top 0.63% on Npmjs.org
Top 8.17% on Proxy.golang.org
Top 19.68% on Repo1.maven.org
Top 0.67% on Deno.land