I'm curious about this and wanted to see if anyone understands it.
I am encoding a payload using the jose-jwt
nuget in .NET:
Jose.JWT.Encode(
payload,
keyBytes,
JweAlgorithm.A256GCMKW,
JweEncryption.A256GCM,
extraHeaders: extraHeaders)
and this returns a token that looks correct.
When I use JOSE to decrypt the same payload:
Jose.JWT.Decode(payload, keyBytes, JweAlgorithm.A256GCMKW, JweEncryption.A256GCM);
It throws an error:
BCrypt.BCryptDecrypt(): authentication tag mismatch
Is this normal? Is the JWE encryption supposed to be unable to be decrypted or can someone explain why this error is happening?
Thanks