Use correct iv size (#281)
Use a 12 byte IV for GCM based algorithms and 16 byte IV for CBC based ones. This makes a JWE compatible with other libraries based on OpenSSL which can only use a 12 byte IV for GCM.
Would be nice if this could be merged as it fixes #281, @mpdavis?
Please fix it, this problem is very annoying
Confirming this issue is preventing validation of generated JWEs for non-CBC algorithms.
Folks - is there a concern for resolving this issue?
I've opened the following issue for jose here: https://github.com/panva/jose/issues/678
However, the primary maintainer of that package (who also opened this issue) has identified that python-jose is not following the RFC spec for JWE. It seems like this package should follow the specification. If there is no concern for following the JWE spec to adhere to the IV length requirements for AES GCM modes, can we merge this?
There are only two block cipher modes supported in backends/cryptography_backend.py today: https://github.com/twwildey/python-jose/blob/master/jose/backends/cryptography_backend.py#L424
As such, this change should be safe to merge. Can we please illustrate our concerns/problems so that this can be fixed promptly?
(This replicates my comment from https://github.com/mpdavis/python-jose/issues/281 here)
@panva @mikhaililin21027 Any advice on how we can fix these linting issues that are blocking a merge?
Any advice on how we can fix these linting issues that are blocking a merge?
I'm not a maintainer here.
I've created another PR with an equivalent change: https://github.com/mpdavis/python-jose/pull/355
I have merged changes from the other PR. As such, I am closing this PR in favor of https://github.com/mpdavis/python-jose/pull/355.