We just switched from cjose to rhonabwy and our JWE tests didn't work any more.
I then compared your implementation with the implementation of cjose and found the difference in the calculation of the authentication tag.
In your implementation the key length is fixed to 16 bytes, in the implentation of cjose the key length is calculated by dividing the original key length by two.
This behaviour matches the examples found here:
We just switched from cjose to rhonabwy and our JWE tests didn't work any more. I then compared your implementation with the implementation of cjose and found the difference in the calculation of the authentication tag. In your implementation the key length is fixed to 16 bytes, in the implentation of cjose the key length is calculated by dividing the original key length by two. This behaviour matches the examples found here:
With this patch our JWE tests do work again.